kpine / zwave-js-server-docker

A minimal docker container for zwave-js-server
MIT License
52 stars 10 forks source link

WARNING (MainThread) [homeassistant.config_entries] Config entry 'Z-Wave JS' for zwave_js integration not ready yet: Failed to connect: Cannot connect to host localhost:3055 ssl:default [Connect call failed ('127.0.0.1', 3055)]; Retrying in background #34

Closed andreabl closed 1 year ago

andreabl commented 1 year ago

The latest (aa585edc0749) gives me connection failed from Home Assistant. Tried to go back to kpine/zwave-js-server:1.30.0-11.9.0 and that works just fine.

Here's my docker-compose-file:

version: '3'
services:
  zwave-js-server:
    container_name: zwave-js-server
    image: kpine/zwave-js-server:1.30.0-11.9.0
    # NOT WORKING:
    # image: kpine/zwave-js-server:latest
    restart: unless-stopped
    environment:
      - S2_ACCESS_CONTROL_KEY=blabla
      - S2_AUTHENTICATED_KEY=blabla
      - S2_UNAUTHENTICATED_KEY=blabla
      - S0_LEGACY_KEY=blabla
    devices:
      - /dev/serial/by-id/usb-*-if00:/dev/zwave
    volumes:
      - /docker/zwave_js_server_home/cache:/cache
    ports:
      - '8091:8091'
      - '3055:3000'

    labels:
      - "com.centurylinklabs.watchtower.enable=true"
kpine commented 1 year ago

Could you attach the driver debug logs?

kpine commented 1 year ago

FYI, I'm not able to reproduce, so I'll need debug driver logs to provide any assistance.

andreabl commented 1 year ago

I've added this to my ha-config:

logger:
  default: warning
  logs:
    homeassistant.components.zwave_js: debug

But I get no debug log lines in the log file. What am I missing? :-)

kpine commented 1 year ago

The driver logs are from Z-Wave JS. Use env vars to enable.

https://github.com/kpine/zwave-js-server-docker#environment-variables

kpine commented 1 year ago

image

kpine commented 1 year ago

Or just set LOGLEVEL env var to debug and capture the container logs.

andreabl commented 1 year ago

Got it. Not sure if I can expose my debug file openly. Can I share it through other means to keep my paranoia at rest?

andreabl commented 1 year ago

zwave_2023-08-07.log

Ok. I'll take my chances. See attached.

kpine commented 1 year ago

There's usually nothing private in the logs, especially these logs that are very short full of errors. 😅

I think you'll need to report an issue at node-zwave-js. This looks identical to https://github.com/zwave-js/node-zwave-js/issues/6131, and users of the HA ZUI add-on are also reporting errors https://github.com/hassio-addons/addon-zwave-js-ui/issues/553. With so many cases, it most likely points to a problem in the driver.

2023-08-07T21:50:05.572Z CNTRLR   Waiting for the controller to reconnect...
2023-08-07T21:50:05.573Z DRIVER   all queues idle
2023-08-07T21:50:07.073Z CNTRLR   Re-opening serial port...
2023-08-07T21:50:08.082Z CNTRLR   Waiting for the Serial API to start...
2023-08-07T21:50:08.807Z SERIAL « 0x01140004000e0e3202217400193cb50000000000001a                      (22 bytes)
2023-08-07T21:50:08.810Z SERIAL » [ACK]                                                                   (0x06)
2023-08-07T21:50:08.814Z CNTRLR   [Node 014] is unknown - discarding received command...
2023-08-07T21:50:08.817Z DRIVER « [Node 014] [REQ] [ApplicationCommand]                              [discarded]
                                  └─[MeterCCReport]
                                      type:       Electric
                                      scale:      W
                                      rate type:  Consumed
                                      value:      1653.941
                                      time delta: 0 seconds
2023-08-07T21:50:13.084Z CNTRLR   Did not receive notification that Serial API has started, checking if it respo
                                  nds...
bcov77 commented 1 year ago

I can second this error. Lucky for me today was the day I tried to set up Z-Wave for the first time...

andreabl commented 1 year ago

Thanks for the quick feedback and helpful assistance, kpine! Much appreciated! I'll submit an issue with node-zwave-js unless someone beats me to it, looking at all these reports of problems, I think that is very likely!

andreabl commented 1 year ago

Hi. I rebuilt this image with the just-released node-zwave-js 11.9.2 version (https://github.com/zwave-js/node-zwave-js/commit/9061cf56bb8bbf4e664a3058434b3c4fcf39435a) and it works on my setup at least. I'm not creating a pull-request as the change is so trivial, assuming it easier for you to just bump versions yourself and release. :-) Thanks for all the help.