Ich habe auch Probleme mit dem Docker Container.
Das HM-MOD-RPI-PCB wird nicht initialisiert.
GPIO’s werden nicht gesetzt. : Error: Could not export GPIO with index 1 for device “hm-mod-rpi-pcb”. Failed to write to export file: Read-only file system
12/23/17 23:43:19.414 Info: Setting up physical interfaces and GPIOs...
12/23/17 23:43:19.415 Error in file Systems/IPhysicalInterface.cpp line 647 in function virtual void BaseLib::Systems::IPhysicalInterface::exportGPIO(uint32_t): Error: Could not export GPIO with index 1 for device "hm-mod-rpi-pcb". Failed to write to export file: Read-only file system
12/23/17 23:43:19.415 Error in file Systems/IPhysicalInterface.cpp line 554 in function virtual void BaseLib::Systems::IPhysicalInterface::setGPIOPermission(uint32_t, int32_t, int32_t, bool): Error: Failed to get path for GPIO with index 1 and device "hm-mod-rpi-pcb".
12/23/17 23:43:19.416 Failed to open direction file for GPIO with index 1 and device "hm-mod-rpi-pcb": Unable to retrieve path.
12/23/17 23:43:19.416 Info: Dropping privileges to user homegear (106) and group homegear (108)
12/23/17 23:43:19.417 Info: Homegear is (now) running as user with id 106 and group with id 108.
12/23/17 23:43:19.422 Starting script engine server...
12/23/17 23:43:19.430 Initializing licensing controller...
12/23/17 23:43:19.430 Loading licensing controller data...
12/23/17 23:43:19.430 Loading devices...
12/23/17 23:43:19.431 Loading XML RPC devices...
12/23/17 23:43:20.281 Loading device 5
12/23/17 23:43:20.282 Module HomeMatic BidCoS: Info: Central address set to 0xFD0001.
12/23/17 23:43:20.283 Info: Not initializing device family HomeMatic Wired, because no physical interface was found.
12/23/17 23:43:20.283 Info: Disposing family module mod_homematicwired.so
12/23/17 23:43:20.283 Info: Not initializing device family Insteon, because no physical interface was found.
12/23/17 23:43:20.283 Info: Disposing family module mod_insteon.so
12/23/17 23:43:20.284 Info: Not initializing device family MAX!, because no physical interface was found.
12/23/17 23:43:20.284 Info: Disposing family module mod_max.so
12/23/17 23:43:20.284 Info: Not initializing device family Philips hue, because it is disabled in it's configuration file.
12/23/17 23:43:20.284 Info: Disposing family module mod_philipshue.so
12/23/17 23:43:20.284 Loading XML RPC devices...
12/23/17 23:43:20.294 Loading device 1
12/23/17 23:43:20.295 Loading XML RPC devices...
12/23/17 23:43:20.296 Loading device 2
12/23/17 23:43:20.297 Loading XML RPC devices...
12/23/17 23:43:20.298 Loading device 3
12/23/17 23:43:20.299 Info: Not initializing device family Beckhoff, because no physical interface was found.
12/23/17 23:43:20.299 Info: Disposing family module mod_beckhoff.so
12/23/17 23:43:20.299 Info: Not initializing device family KNX, because no physical interface was found.
12/23/17 23:43:20.299 Info: Disposing family module mod_knx.so
12/23/17 23:43:20.299 Info: Not initializing device family EnOcean, because no physical interface was found.
12/23/17 23:43:20.299 Info: Disposing family module mod_enocean.so
12/23/17 23:43:20.300 Info: Not initializing device family Intertechno, because no physical interface was found.
12/23/17 23:43:20.300 Info: Disposing family module mod_intertechno.so
12/23/17 23:43:20.300 Loading XML RPC devices...
12/23/17 23:43:20.302 Loading device 4
12/23/17 23:43:20.302 Initializing RPC client...
12/23/17 23:43:20.302 Starting XML RPC server RPCServer1 listening on :::2001...
12/23/17 23:43:20.305 Starting XML RPC server RPCServer2 listening on :::2002, SSL enabled...
12/23/17 23:43:20.306 RPC Server (Port 2001): Info: RPC Server started listening on address :: and port 2001
12/23/17 23:43:20.344 Starting XML RPC server RPCServer3 listening on :::2003, SSL enabled, authentication enabled...
12/23/17 23:43:20.344 RPC Server (Port 2002): Info: RPC Server started listening on address :: and port 2002
12/23/17 23:43:20.377 Starting CLI server...
12/23/17 23:43:20.378 RPC Server (Port 2003): Info: RPC Server started listening on address :: and port 2003
12/23/17 23:43:20.378 Initializing event handler...
12/23/17 23:43:20.378 Loading events...
12/23/17 23:43:20.379 Starting flows server...
12/23/17 23:43:20.393 Starting IPC server...
12/23/17 23:43:20.398 Start listening for packets...
12/23/17 23:43:20.650 RPC Server (Port 2001): Info: Connection from ::ffff:192.168.0.1:36422 accepted. Client number: 8
12/23/17 23:43:20.651 RPC Server (Port 2001): Info: RPC server client id for client number 8 is: 0
12/23/17 23:43:20.676 Script Engine Server: Info: Spawning new script engine process.
12/23/17 23:43:21.748 Info: Setting allowed core file size to "4294967295" for user with id 106 and group with id 108.
12/23/17 23:43:21.748 Info: Core file size now is "4294967295".
12/23/17 23:43:21.748 Info: Setting maximum thread priority to "0" for user with id 106 and group with id 108.
12/23/17 23:43:21.748 Info: Maximum thread priority now is "0".
12/23/17 23:43:21.780 Script Engine Server: Info: Connection accepted. Client number: 9
12/23/17 23:43:21.781 Script Engine Server: Info: Client with pid 390 successfully registered.
12/23/17 23:43:21.781 Script Engine Server: Info: Script engine process successfully spawned. Process id is 390. Client id is: 0.
12/23/17 23:43:21.789 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:192.168.0.1. Closing connection.
12/23/17 23:43:22.400 Could not set thread priority. The executing user does not have enough privileges. Please run "ulimit -r 100" before executing Homegear.
12/23/17 23:43:22.400 Error in file Systems/IPhysicalInterface.cpp line 332 in function virtual void BaseLib::Systems::IPhysicalInterface::openGPIO(uint32_t, bool): Failed to open value file for GPIO with index 1 and device "hm-mod-rpi-pcb": Unable to retrieve path.
12/23/17 23:43:22.400 Failed to set GPIO with index "1": Device not open.
12/23/17 23:43:22.401 Module Sonos: Event server "My-Sonos-1234": Info: Started listening on address 172.17.0.2 and port 7373
12/23/17 23:43:22.402 Startup complete. Waiting for physical interfaces to connect.
12/23/17 23:43:22.402 All physical interfaces are connected now.
12/23/17 23:43:22.402 Starting UPnP server...
12/23/17 23:43:22.404 Info: UPnP server: Binding to address: 172.17.0.2
12/23/17 23:43:22.404 UPnP Server: Info: Started listening.
12/23/17 23:43:22.501 Failed to set GPIO with index "1": Device not open.
Docker Aufruf:
docker run -d --rm -v /homegear-data/etc:/etc/homegear:Z -v /homegear-data/lib:/var/lib/homegear:Z -v /homegear-data/log:/var/log/homegear:Z -p 2001:2001 -p 2002:2002 -p 2003:2003 --device=/dev/ttyAMA0 --name homegear homegear/rpi-homegear:stable
Native funktioniert Homegear auf dem Raspberry mit dem Funkmodul ohne Probleme.
Nur im Dockercontainer funktioniert das Modul nicht.
Ist der Aufruf --device=/dev/ttyAMA0 richtig damit das Modul an den Docker Containter durchgereicht wird?
Die Änderungen in /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
und in /boot/config.txt
dtoverlay=pi3-miniuart-bt
enable_uart=1
dtparam=spi=on
dtparam=i2c_arm=on
muss auf dem Host (Raspberry) und nicht im Docker Container erfolgen, oder ?
Muss auf dem Host ebenfalls ein Homegear User vorhanden sein?
Gibt es hier jemanden der diese Konstellation Raspberry PI3 mit Raspbian dem HM-MOD-RPI-PCB Modul
und Homegear im Docker Container erfolgreich am Laufen hat?
26.12.17: Lösung: Der Docker Aufruf war falsch!.
docker run -d --privileged --rm -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /homegear-data/etc:/etc/homegear:Z -v /homegear-data/lib:/var/lib/homegear:Z -v /homegear-data/log:/var/log/homegear:Z -p 2001:2001 -p 2002:2002 -p 2003:2003 --device=/dev/ttyAMA0 --name homegear homegear/rpi-homegear:stable
Die Option --privileged muss noch gesetzt sein, dass die GPIOs gesetzt werden können.
-v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro setzt noch die Zeit und Zeitzone im Docker Container (wird lokal vom Raspberry ausgelesen).
Hardware:
Raspberry Pi 3, HM-MOD-RPI-PCB Modul, Raspbian Stretch Lite