Hallo zusammen,
ich habe FHEM auf einem RasPi am laufen und folgendes Problem:
Wenn ich an einen der USB Ports einen USB/Serial Konverter anschliesse und FHEM anschliessend neu starte dann kann ich nicht mehr ins WEB Interface, solange bis ich den USB to Serial Adapter wieder entferne und den Raspi neu starte.
Der Adapter wird vom RasPi erkannnt und installiert, das sieht zumindest gut aus
[ 458.082096] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
[ 458.188567] usb 1-1.2: New USB device found, idVendor=10c4, idProduct=ea60
[ 458.188591] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber =3
[ 458.188609] usb 1-1.2: Product: CP2102 USB to UART Bridge Controller
[ 458.188646] usb 1-1.2: Manufacturer: Silicon Labs
[ 458.188662] usb 1-1.2: SerialNumber: 0001
[ 458.217853] usbcore: registered new interface driver cp210x
[ 458.218016] usbserial: USB Serial support registered for cp210x
[ 458.218210] cp210x 1-1.2:1.0: cp210x converter detected
[ 458.218744] usb 1-1.2: cp210x converter now attached to ttyUSB1
Irgend eine Idee warum ich nicht mehr rein komme wenn er dran hängt?
Edit:
Folgendes sieht man im fhem-log:
2015.04.12 21:40:41 1: Including fhem.cfg
2015.04.12 21:40:41 3: telnetPort: port 7072 opened
2015.04.12 21:40:42 3: WEB: port 8083 opened
2015.04.12 21:40:42 3: WEBphone: port 8084 opened
2015.04.12 21:40:42 3: WEBtablet: port 8085 opened
2015.04.12 21:40:42 2: eventTypes: loaded 70 events from ./log/eventTypes.txt
2015.04.12 21:40:42 3: Opening nanoCUL device /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A$
2015.04.12 21:40:42 3: Setting nanoCUL baudrate to 38400
2015.04.12 21:40:42 3: nanoCUL device opened
2015.04.12 21:40:45 3: nanoCUL: Possible commands: BCFiAZEkGMKUYRTVWXefltx
2015.04.12 21:40:46 3: [STV] defined with host: MySamsungTV port: 55000 MAC: b8:27:eb:c3:c$
2015.04.12 21:40:46 3: FHEM2FHEM opening myFHME2FHEM at fritz.box:7072
2015.04.12 21:40:46 3: FHEM2FHEM device opened (myFHME2FHEM)
2015.04.12 21:40:46 1: Including ./log/fhem.save
2015.04.12 21:40:46 1: usb create starting
2015.04.12 21:40:47 3: Probing CUL device /dev/ttyAMA0
2015.04.12 21:40:47 3: Probing TCM_ESP3 device /dev/ttyAMA0
2015.04.12 21:40:47 3: Probing FRM device /dev/ttyAMA0
2015.04.12 21:41:04 3: Probing TCM_ESP3 device /dev/ttyUSB1
2015.04.12 21:41:04 3: Probing TCM_ESP2 device /dev/ttyUSB1
2015.04.12 21:41:05 3: Probing FHZ device /dev/ttyUSB1
2015.04.12 21:41:05 3: Probing TRX device /dev/ttyUSB1
2015.04.12 21:41:05 3: Probing ZWDongle device /dev/ttyUSB1
2015.04.12 21:41:06 3: Probing FRM device /dev/ttyUSB1
Versucht FHEM hier das Device (ttyUSB1) zu installieren und es klappt nicht? Mehr einträge kommen danach nicht mehr im log...
Danke!
So einen (kleinen) Schritt weiter bin ich gekommen.
Wenn ich den USB auto create ausschalte kann FHEM zumindest wieder booten.
Allerdings kann ich das Device auch nicht manuell einbinden:
define Heizung /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 99_VCONTROL.cfg 180
Liefert immer
Unknown module /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
egal ob ich über ID oder
direkt /dev/ttyUSB0 gehe.
Irgendeine Idee? :o
Du hast einen Modulnamen vergessen:
define Heizung /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 99_VCONTROL.cfg 180
Zwischen den Namen "Heizung" und Deinem Gerät "/dev/serial...." muß noch ein Modulnamen stehen. Kann Dir nur nicht helfen, welches Modul Du brauchst ...
Oh mein Gott ::)
Danke, das wars. Manchmal sieht man den Wald vor lauter Bäumen nicht ...
(das Modul ist VCONTROL)
Nicht dafür und noch viel Spaß mit dem System 8)
Hallo, auch wenn hier schon lange keiner mehr etwas geschrieben hat, ich habe mir aber gerade ein neues System mit einem Pi 2b+ aufgebaut und bin auch noch ziemlich neu im Gebiet fhem.
Bei mir passiert das gleiche. Wenn ich meinen Pi an meine Viessmann Heizung (Vitodens 222W mit Vitotronic 200, TYP HO1B) via optolink USB-Adapter anschließe und den pi dann Starte, komme ich nicht auf die Fhem Weboberfläche. Erst wenn ich den Optolink aus der Heizung ziehe, kurz warte und ihn dann wieder einstecke (in das V zwischen den beiden LED´s), kann ich wieder auf die Weboberfläche zugreifen.
Das System ist frisch aufgesetzt (alle updates sowohl von Raspbian und Fhem wurden bereits durchgeführt!)
Die 89_VCONTROL.pm habe ich von /opt/fhem/FHEM, in das /opt/fhem Verzeichnis kopiert. Ebenfalls habe ich eine V200WO1B.cfg (aus einem anderen Thread: https://forum.fhem.de/index.php/topic,20280.0.html) Datei in das Verzeichnis /opt/fhem kopiert. Weiter habe ich noch nichts in Fhem konfiguriert.
Mein Fhemlog zeigt diese Einträge:
Auszug aus dem Logfile:
2016.04.05 01:37:41 1: Including fhem.cfg
2016.04.05 01:37:41 3: telnetPort: port 7072 opened
2016.04.05 01:37:41 3: WEB: port 8083 opened
2016.04.05 01:37:41 3: WEBphone: port 8084 opened
2016.04.05 01:37:41 3: WEBtablet: port 8085 opened
2016.04.05 01:37:41 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2016.04.05 01:37:41 1: Including ./log/fhem.save
2016.04.05 01:37:41 1: usb create starting
2016.04.05 01:37:42 3: Probing CUL device /dev/ttyAMA0
2016.04.05 01:37:42 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.04.05 01:37:42 3: Probing FRM device /dev/ttyAMA0
2016.04.05 01:37:48 3: Probing TCM_ESP3 device /dev/ttyUSB0
2016.04.05 01:37:48 3: Probing TCM_ESP2 device /dev/ttyUSB0
2016.04.05 01:37:48 3: Probing FHZ device /dev/ttyUSB0
2016.04.05 01:37:48 3: Probing TRX device /dev/ttyUSB0
2016.04.05 01:37:49 3: Probing ZWDongle device /dev/ttyUSB0
2016.04.05 01:37:49 3: Probing FRM device /dev/ttyUSB0
2016.04.05 01:37:54 1: usb create end
2016.04.05 01:37:54 2: SecurityCheck: WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword. Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2016.04.05 01:37:54 0: Featurelevel: 5.7
2016.04.05 01:37:54 0: Server started with 9 defined entities (fhem.pl:11144/2016-03-29 perl:5.014002 os:linux user:fhem pid:2515)
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 262.
2016.04.05 01:38:38 1: PERL WARNING: "state" variable @_ masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 262.
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $name masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 263.
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 284.
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $name masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 285.
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $timer masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 301.
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 310.
2016.04.05 01:38:38 1: PERL WARNING: "state" variable @_ masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 310.
2016.04.05 01:38:38 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/89_VCONTROL.pm line 318.
2016.04.05 01:38:38 1: reload: Error:Modul 89_VCONTROL deactivated:
syntax error at ./FHEM/89_VCONTROL.pm line 133, near "cfg
Das Modul 89_VCONTROL kann nicht geladen werden, ich weiß aber nicht warum. Programmiertechnisch bin ich nicht so gut, lediglich einige Unix Grundkenntnisse sind vorhanden.
Fhemeinfo:
Fhem info:
Release : 5.7 FeatureLevel: 5.7
OS : linux
Arch : arm-linux-gnueabihf-thread-multi-64int
Perl : v5.14.2
uniqueID : **************************
upTime : 00:32:01
Defined modules:
FHEMWEB : 3
FileLog : 1
autocreate : 1
eventTypes : 1
notify : 1
telnet : 1
Transmitting this information during an update: no
You can change this via the global attribute sendStatistics
Das define in der Fhem Kommandozeile kann ich mir somit sparen. Dort erscheint dann die Fehlermeldung: Cannot load Module VCONTROL
Hier trotzdem der Befehl, den ich eingegeben habe:
define Heizung VCONTROL /dev/ttyUSB0 V200WO1B.cfg 180
Hier mein dev Verzeichnis, der optolink wird als ttyUSB0 deklariert:
pi@raspberrypi2 /dev $ ls
autofs fuse loop7 ppp ram4 sndstat tty16 tty28 tty4 tty51 tty63 vc-mem vcsa5
block gpiomem loop-control ptmx ram5 stderr tty17 tty29 tty40 tty52 tty7 vcs vcsa6
btrfs-control hwrng MAKEDEV pts ram6 stdin tty18 tty3 tty41 tty53 tty8 vcs1 vcsm
bus input mapper ram0 ram7 stdout tty19 tty30 tty42 tty54 tty9 vcs2 vhci
cachefiles kmsg mem ram1 ram8 tty tty2 tty31 tty43 tty55 ttyAMA0 vcs3 xconsole
char log memory_bandwidth ram10 ram9 tty0 tty20 tty32 tty44 tty56 ttyprintk vcs4 zero
console loop0 mmcblk0 ram11 random tty1 tty21 tty33 tty45 tty57 ttyUSB0 vcs5
cpu_dma_latency loop1 mmcblk0p1 ram12 raw tty10 tty22 tty34 tty46 tty58 uhid vcs6
cuse loop2 mmcblk0p2 ram13 rfkill tty11 tty23 tty35 tty47 tty59 uinput vcsa
disk loop3 net ram14 root tty12 tty24 tty36 tty48 tty6 urandom vcsa1
fb0 loop4 network_latency ram15 serial tty13 tty25 tty37 tty49 tty60 vc-cma vcsa2
fd loop5 network_throughput ram2 shm tty14 tty26 tty38 tty5 tty61 vchiq vcsa3
full loop6 null ram3 snd tty15 tty27 tty39 tty50 tty62 vcio vcsa4
pi@raspberrypi2 /dev $
lsusb zeigt folgendes:
pi@raspberrypi2 ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 008: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 009: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
pi@raspberrypi2 ~ $
Meine fhem.cfg
attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global motd SecurityCheck:\
\
WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth.\
telnetPort has no associated allowed device with password/globalpassword.\
\
Restart FHEM for a new check if the problem is fixed,\
or set the global attribute motd to none to supress this message.\
attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global verbose 3
define telnetPort telnet 7072 global
define WEB FHEMWEB 8083 global
attr WEB editConfig 1
define WEBphone FHEMWEB 8084 global
attr WEBphone stylesheetPrefix smallscreen
define WEBtablet FHEMWEB 8085 global
attr WEBtablet stylesheetPrefix touchpad
# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
define autocreate autocreate
attr autocreate filelog ./log/%NAME-%Y.log
define eventTypes eventTypes ./log/eventTypes.txt
# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create
Kann mir von Euch jemand Helfen, oder mir einen Tipp geben, wo ich noch suchen kann. Vielen Dank im Voraus.
Gruß, Maik
Ich denke mal mit deiner Frage bist du in dem von dir selbst verlinkten Unterforum besser aufgehoben. Bin jetzt kein perl experte aber anscheinend sind da einige Variablen doppelt definiert oder sowas in der Richtung
Zitat von: perezma am 05 April 2016, 02:38:19
Die 89_VCONTROL.pm habe ich von /opt/fhem/FHEM, in das /opt/fhem Verzeichnis kopiert.
Warum ? Module gehören unterhalb FHEM ( da wo es war )
Gibt es unter FHEM eine 89_VCONTROL.pm
und eine 99_VCONTROL.pm ? wenn ja die 99_VCONTROL.pm löschen
Zitat von: perezma am 05 April 2016, 02:38:19
Erst wenn ich den Optolink aus der Heizung ziehe,
die Lösung dafür steht doch schon hier im Thread, bzw. in deiner config :
# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create
Danke für Eure Antworten.
Die Fehler sind vermutlich dadurch entstanden, dass ich ein jessielite image verwendet hatte. Dies scheint dann doch einige Komponenten nicht integriert zu haben, die für das Modul von Fhem von Nöten sind. Lange Rede, kurzer Sinn, mit dem jessie image läuft jetzt alles so wie es soll.
Danke nochmals und einen schönen Abend noch.
Gruß,
Maik