Which ip address should I use for zwavejs?

“installation_type”: “Home Assistant Container”,
“version”: “2023.3.1”,
zwave-js-ui: 8.9.0.2d95700
zwave-js: 10.10.0

I have HA and zwavejs running on a truenas scale server using their “true charts”. When I first got zwavejs running, HA immediately saw it and I added without problem.

This morning I rebooted and discovered that HA is using the kubernetes 172.16.. address:
image

Should this be configured to use localhost instead? I’m pretty ignorant of how k8s/docker/etc networking goes. When I go into the zwavejs docker shell i see it’s listening on 0.0.0.0:3000.

Is it possible to change this in the HA ui? When I click configure it just gives me a blank screen with the same error.

To reconfigure, repeat the installation of the integration (do not remove the existing one), and this time configure it with a host name. Typically in a k8s config there would be a Service to connect to. You may need to ask for support at that project. If it connects successfully, it will say “already configured”.

1 Like

TrueCharts apps are unique - Maybe this will help.

1 Like

Helpful link. You can use the calculator at the bottom to compute the hostname. Fill in the correct app name.

image

I’m not familiar with TrueCharts, but I am familiar with Helm, and I would guess that ws is the name of the websocket service, and 10046 is the exposed port.

3 Likes

Thanks all! I ended up figuring it out and was going to come back and post what I found but you all have.

So, to summarize:
Truenas Scale True Charts have the port number of each service, in this case, 8091 for the main zwavejs UI and 10046 for the WS server. The dns name to use can be derived from the name generator above. Truetool --dns is supposed to show this but it didn’t show the optional ws service dns name. I found another post where someone mentioned it. So, even if you set the port to 3000 in the zwavejs ui, k8s sets it to whatever you use when setting up the app.

zwavejs2mqtt uses zwavejs2mqtt.ix-zwavejs2mqtt.svc.cluster.local:8091 and zwavejs2mqtt-ws.ix-zwavejs2mqtt.svc.cluster.local:10046 internally, between apps.

In other news, I’ve put off getting familiar with k8s long enough :slight_smile:

3 Likes

Thanks a lot @freshcoast for the hint !
I was searching arround for few days on how to have a persistant link between both containers. Using static IP and port 3000 was not a solution as it failed down after every server reboot or every container restart.

The key was to use in the ZWav-JS HA integration was the following parameter :
URL ws://zwavejs2mqtt-ws.ix-zwavejs2mqtt.svc.cluster.local:10046
and to keep default parameter settings in zwavejs2mqtt container (no hostname configured and port 3000.

1 Like