velocityzen / homebridge-platform-zwave

Homebridge Platform for Z-Wave nodes. Deprecated! Use node-red instead.
MIT License
13 stars 6 forks source link

Unable to make it work with Homebridge in Docker #15

Open cyanezp opened 3 years ago

cyanezp commented 3 years ago

Hi!

I'm using openHAB since a few years and now I'm exploring new options, so I was trying to get your plugin to work with homebridge running on docker using the following instructions:

https://github.com/oznu/docker-homebridge https://github.com/velocityzen/homebridge-platform-zwave#readme

Here are my configuration files:

docker-compose.yaml

version: '2'
services:
  homebridge:
    image: oznu/homebridge:latest
    container_name: homebridge
    restart: always
    network_mode: host
    environment:
      - PGID=1000
      - PUID=1000
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=8080
    volumes:
      - ./homebridge:/homebridge
    devices:
      - /dev/ttyACM0:/dev/ttyACM0

config.json

{
    "bridge": {
        "name": "Homebridge 1D25",
        "username": "*****",
        "port": 53021,
        "pin": "*****"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8080,
            "platform": "config"
        },
        {
            "platform": "zWavePlatform",
            "name": "Z-Wave Platform",
            "zwave": {
                "devicePath": "/dev/ttyACM0"
            }
        }
    ]
}

startup.sh

#!/bin/sh

#
# Docker Homebridge Custom Startup Script - oznu/homebridge
#
# This script can be used to customise the environment and will be executed as
# the root user each time the container starts.
#

apk add --no-cache openzwave openzwave-dev

console log

homebridge    | Initialising OpenZWave 1.6.974 binary addon for Node.JS.
homebridge    |     OpenZWave Security API is ENABLED
homebridge    |     ZWave device db    : etc/openzwave/
homebridge    |     User settings path : /homebridge/node_modules/homebridge-platform-zwave/node_modules/openzwave-shared/build/Release/../../
homebridge    |     Option Overrides : --ConsoleOutput false --Logging false --SaveConfiguration false
homebridge    | 2020-09-28 12:52:55.010 Error, Cannot find a path to the configuration files at etc/openzwave/, Using /etc/openzwave/ instead...
homebridge    | 2020-09-28 12:52:55.011 Info, Reading /etc/openzwave/options.xml for Options
homebridge    | 2020-09-28 12:52:55.011 Info, Reading /homebridge/node_modules/homebridge-platform-zwave/node_modules/openzwave-shared/build/Release/../../options.xml for Options
homebridge    | 2020-09-28 12:52:55.011 Info, Options:
homebridge    | 2020-09-28 12:52:55.011 Info,   appendlogfile: false
homebridge    | 2020-09-28 12:52:55.011 Info,   associate: true
homebridge    | 2020-09-28 12:52:55.011 Info,   assumeawake: true
homebridge    | 2020-09-28 12:52:55.011 Info,   autoupdateconfigfile: true
homebridge    | 2020-09-28 12:52:55.011 Info,   configpath: /etc/openzwave/
homebridge    | 2020-09-28 12:52:55.011 Info,   consoleoutput: false
homebridge    | 2020-09-28 12:52:55.011 Info,   customsecuredcc: 0x62,0x4c,0x63
homebridge    | 2020-09-28 12:52:55.011 Info,   drivermaxattempts: 5
homebridge    | 2020-09-28 12:52:55.011 Info,   dumptriggerlevel: 1
homebridge    | 2020-09-28 12:52:55.011 Info,   enablesis: true
homebridge    | 2020-09-28 12:52:55.011 Info,   enforcesecurereception: true
homebridge    | 2020-09-28 12:52:55.011 Info,   exclude:
homebridge    | 2020-09-28 12:52:55.011 Info,   include:
homebridge    | 2020-09-28 12:52:55.011 Info,   includeinstancelabel: true
homebridge    | 2020-09-28 12:52:55.011 Info,   interface:
homebridge    | 2020-09-28 12:52:55.011 Info,   intervalbetweenpolls: false
homebridge    | 2020-09-28 12:52:55.011 Info,   language:
homebridge    | 2020-09-28 12:52:55.011 Info,   logfilename: OZW_Log.txt
homebridge    | 2020-09-28 12:52:55.011 Info,   logging: false
homebridge    | 2020-09-28 12:52:55.011 Info,   networkkey:
homebridge    | 2020-09-28 12:52:55.011 Info,   notifyondriverunload: false
homebridge    | 2020-09-28 12:52:55.011 Info,   notifytransactions: false
homebridge    | 2020-09-28 12:52:55.011 Info,   performreturnroutes: false
homebridge    | 2020-09-28 12:52:55.011 Info,   pollinterval: 30000
homebridge    | 2020-09-28 12:52:55.011 Info,   queueloglevel: 9
homebridge    | 2020-09-28 12:52:55.011 Info,   refreshallusercodes: false
homebridge    | 2020-09-28 12:52:55.011 Info,   reloadafterupdate: AWAKE
homebridge    | 2020-09-28 12:52:55.011 Info,   retrytimeout: 10000
homebridge    | 2020-09-28 12:52:55.011 Info,   saveconfiguration: false
homebridge    | 2020-09-28 12:52:55.011 Info,   saveloglevel: 8
homebridge    | 2020-09-28 12:52:55.012 Info,   securitystrategy: SUPPORTED
homebridge    | 2020-09-28 12:52:55.012 Info,   suppressvaluerefresh: false
homebridge    | 2020-09-28 12:52:55.012 Info,   userpath: /homebridge/node_modules/homebridge-platform-zwave/node_modules/openzwave-shared/build/Release/../../
homebridge    | [9/28/2020, 12:52:56 PM] [Config] Homebridge Config UI X v4.27.1 is listening on :: port 8080
homebridge    | [9/28/2020, 12:53:15 PM] [Z-Wave Platform] Failed to setup Z-Wave network constroller undefined

After several tries with different configurations, I'm always getting the same result: [Z-Wave Platform] Failed to setup Z-Wave network constroller undefined

I've also tested ozwcp docker image (openzwave/openzwave-control-panel) and it shows me the right information of my z-wave network

docker run --rm --name ozwcp -p 8008:8008 --device /dev/ttyACM0:/dev/ttyACM0 openzwave/openzwave-control-panel
Node Id Basic Type Generic Type Product Name Location Value Last Heard Status
1 *LB Static Controller Static PC Controller AEON Labs ZW090 Z-Stick Gen5 US 1:35:19 PM Ready
2 LBR Routing Slave Binary Power Switch Vision Security ZL7431 In-Wall Switch Single Relay off 1:35:34 PM Ready
3 LBR Routing Slave Binary Power Switch Vision Security ZL7432 In-Wall Switch, Dual Relay off 1:35:34 PM Ready
4 LBR+ Z-Wave+ node Always On Slave On/Off Power Switch Unknown: id=011a Unknown: type=0111, id=0606 off 1:35:35 PM Ready
5 LBR+ Z-Wave+ node Always On Slave On/Off Power Switch Unknown: id=011a Unknown: type=0111, id=0606 off 1:35:35 PM Ready

Am I missing something?

Thanks!

vpulim commented 3 years ago

I'm seeing the exact same issue. My setup was working fine until recently.