ZWavejs2mqtt

Hi
Just deployed the docker on a remote raspberry with Hassos on a VM.
I have got the entities auto discovered.
Just fibaro223 show one swith instead of 2. will have to check however they are recognized properly by the docker as 223.

Really happy so far. let’s see how stable it is.

I can leave with a panel on the side to manage the hardware if it works.

2 Likes

Proud of the fact that the dev (one person) behind this and zwave2mqtt is an italian :smiley:

OT:
Small tip for the ones using a remote PI with dockers.
In Portainer on you hassos You can monitor those dockers too
Activate Docker API on the remote pi
add endpoint using docker api in portainer

If you want more detailed info you can also install portainer and portainer agent on the PI

For reference can you please post your docker run command to set up the container?

Thanks for starting the ball rolling on this topic.

Sure.
Here it is:

version: '3.7'
services:
  zwavejs2mqtt:
    container_name: zwavejs2mqtt
    image: zwavejs/zwavejs2mqtt:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    networks:
      - zwave
    devices:
      - '/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0'
    volumes:
      - ./store:/usr/src/app/store
    ports:
      - '8091:8091'
networks:
  zwave:
# volumes:
#   zwavejs2mqtt:
#     name: zwavejs2mqtt
:

Substitute your usb device on the left hand side of the device row or , if you have an aeon stick, leave it as is.
follow instrctions here to setup the environment . Do not forget to enable hass autodiscovery to have entities pop up in HA. Have patience it takes time at first start then it is cached.
https://zwave-js.github.io/zwavejs2mqtt/#/

Install docker compose
then create a directory and within it a subdirectory named store (or whatever you like just remember modifiyng it in the file above).
then create docker-compose.yml as up
then docker-compose up docker-compose.yml -d

The API for the JS ZWAVE implementation seems to me really rich and well documented
https://zwave-js.github.io/node-zwave-js/#/

In your docker-compose i see that you’ve added some options that aren’t included in the official docker run command:

tty: true
stop_signal: SIGINT
networks:
  - zwave

Would you mind explaining why you added those and what they do? I think I understand the “networks:” but I’m not sure why you included it.

I don’t use docker-compose so if those are for that functionality then I can ignore them.

Honestly… I do not know.
I followed the dev instructions here
https://zwave-js.github.io/zwavejs2mqtt/#/getting-started/quick-start

There you have also the instructions to use the run option of docker

I’m interested to see how well this works for you. For reference, what are you using now? I’m interested in trying this out to see what all the hubbub is about.

1 Like

I’m only going to be using it on a test HA Supervised install that only has on node paired to it to start with.

I have been running OZW beta on that instance and it was OK with that one node.

But…

I do see the concern in the other thread that development has slowed to a crawl (if not stopped) and issues aren’t getting fixed. I’ve added a new device to the config (and started to add another one) but even those simple things take forever to get merged.

So I figured I’d give this a try and see what it has to offer.

1 Like

Sorry, I still don’t see any of those options used on that page.

It looks like they aren’t really necessary?

Hi @petro I am using a vm in proxmox on an intel i7 4core 6thgen with hassio supervised since the pc is in the basement and life “happens” at the floors above I have a raspberry in the leaving room working as a “satellite antenna” as I call it…
So dongles : zigbee & zwave & bluetooth on a raspberry II
zigbee bare metal
zwave in a docker

Zwave: 15 nodes. mostly switches fibaro 222, 223, fibaro sensor, one eversense contact, one fibaro plug.
Network security enabled
Aeon stick

BTW a bit OT I know: It would really be nice (I saw there is an open request for it) to have remserial / socat /ser2net support in supervised for this use case. Getting the data in is a p in the… right now. As you can see I am forced to go through mqtt.

I have looked for alpine packages of remserial and could not find remserail (plus I installed some extra package but I think it gets wiped out after restart, Is that correct ? Is the only way to have persistent install through addons? Apologies I am new to Supervised after years of core).

1 Like

One more question…for now… :wink:

for some reason I can’t het HA to discover my devices.

I have the correct prefix set in both zwavejs and in HA and discovery is enabled in both but for some reason nothing is showing up in HA yet.

I have verified that zwavejs is talking to the broker and I can see the messages show up there.

Is there anything special you needed to do to get your devices to be discovered?

Have you allowed your MQTT system options to automatically add new devices? Try restarting HA once your Z-Wave network is loaded. What settings do you currently have?

In my settings in zwavejs2mqtt in the gateway section I have homeassistant as prefix for discovery and homeassistant discovery enabled.

Than in entites list I find the entites under the mqtt integration

yes

done a couple of times.

mqtt:
  broker: 192.168.1.11
  port: 1883
  client_id: home-assistant-3
  username: !secret MQTT_user  
  password: !secret MQTT_password
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'homeassistant/status'
    payload: 'online'
  will_message:
    topic: 'homeassistant/status'
    payload: 'offline'

EDIT:

Wait…it actually did show up.

I expected to get a discovery notification in the sidebar that I would need to act on (like all other discovered entities) but instead it just got silently added to the system (but with a totally un-helpful name/entity id - I’ll have to work on that bit).

1 Like

You can set the name published in the gateway control panel.
Either manufacturer name (You will get duplicates if you have multiple devices) or nodeID_progressive.
I prefer the node notation

Yeah, I’m playing around with that right now.

I think what I’ll need to do is turn off discovery in HA once I add nodes, update the info in the control panel to make all the node info to match my existing config then turn discovery back on.

Otherwise the original (non-helpful) data seems to be pretty “sticky”.

I see what you mean…
I restarted the container for the first time and the HA configured devices are greyed out and the discovered MQTT devices are again there.

How to get rid of them… please let me know

Restart HA and it should allow you to delete the no longer existing entities. Have you enabled the Retained discovery? I believe that option should prevent this from happening.

1 Like