zwavejs2mqtt

For Z-Wave related questions in Domoticz

Moderator: leecollings

PieterS
Posts: 195
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by PieterS »

jvdz wrote: Wednesday 05 January 2022 21:31 Dejavu ... I've explained this issue in another thread not too long ago :) : viewtopic.php?p=284027#p284027
Thx
Synology with Domoticz build (V2024.7) in Docker
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

PieterS wrote: Thursday 06 January 2022 10:36
jvdz wrote: Wednesday 05 January 2022 21:31 Dejavu ... I've explained this issue in another thread not too long ago :) : viewtopic.php?p=284027#p284027
Thx
Were you able to get all working with the correct topic names? :)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
PieterS
Posts: 195
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by PieterS »

Were you able to get all working with the correct topic names?
Thank you for your interest. To be honest. Not yet. A bit confused.. Several topics about this subject in this forum.. Using Domoticz for quite a few years but seem to be a starter for this technology. :?

Questions raised as:
Can I the old use MQTT client together with Autodiscover because a use a lot of ESP8266 devices, a OTGW, several PV-inverters which use MQTT to send data?
I disabled those hardware for now in Domoticz.

So: Finally I deleted the container with zwavejs2mqtt and did a fresh install, version 6.2.0. The only settings I changed were the serial port and host url..

I created a new hardware entry called MQTT Client Gateway in Domoticz, filled in address and port, emptied fields with domoticz/in and domoticz/out and filled in Auto Discovery Prefix zwave.

Code: Select all

2022-01-06 15:31:07.162 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Invalid/Unhandled data received! (Topic: nodeID_20/status, Message: {"time":1641479456579,"value":true,"status":"Alive","nodeId":20})
2022-01-06 15:33:18.078 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Something other then 'config' received on discovery topic! (nodeID_9/49/0/Power/{"time":1641479598075,"value":34.8})!
2022-01-06 15:33:18.078 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Invalid/Unhandled data received! (Topic: nodeID_9/49/0/Power, Message: {"time":1641479598075,"value":34.8})
2022-01-06 15:33:18.178 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Something other then 'config' received on discovery topic! (nodeID_9/49/0/Power/{"time":1641479598089,"value":58.3})!
2022-01-06 15:33:18.178 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Invalid/Unhandled data received! (Topic: nodeID_9/49/0/Power, Message: {"time":1641479598089,"value":58.3})
Image

No idea what how to get further. Maybe you can help me out?
Synology with Domoticz build (V2024.7) in Docker
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

The AutoDiscovery topic is HOMEASSISTANT I guess when looking at your image of MQTTExplorer. It is like I described a few posts down of my previous linked thread: viewtopic.php?p=284050#p284050 :)
zwave is the status/state topic of ZWVAEJS2MQTT, but Domoticz will subscribe to those automatically as they are defines in the HOMEASSISTANT CONFIG topic for each device.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
PieterS
Posts: 195
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by PieterS »

Thnx for reply.
I would like to focus to Domoticz now. HA for later, if this in Domoticz works and I understand the principle.
Is it a problem if I disable MQTT discovery in zwavejs2mqtt..?? Hope not. So I did.

This are my settings now.
Image
фото
Image
фото
I restarted zwavejs2mqtt and deleted the zwave and Homeassistant entries in MQTT Explorer.
I stopped the container in Docker for HomeAssistant. No restart..
After a while this is my view:
Image
фото
Still no luck..

Code: Select all

2022-01-06 16:33:13.066 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Something other then 'config' received on discovery topic! (nodeID_9/49/0/Power/{"time":1641483193063,"value":50})!
2022-01-06 16:33:13.066 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Invalid/Unhandled data received! (Topic: nodeID_9/49/0/Power, Message: {"time":1641483193063,"value":50})
2022-01-06 16:33:14.064 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Something other then 'config' received on discovery topic! (nodeID_9/49/0/Power/{"time":1641483194062,"value":61.6})!
2022-01-06 16:33:14.064 Error: MQTT client Gateway Autodiscovery: MQTT_Discovery: Invalid/Unhandled data received! (Topic: nodeID_9/49/0/Power, Message: {"time":1641483194062,"value":61.6})
What to do about it?
Synology with Domoticz build (V2024.7) in Docker
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

I guess you are missing the point I am making as I am talking about Domoticz too! The default MQTT discovery topic NAME is homeassistant..... as that is where this whole discovery topic originates ! So what have you now set the discovery topic to in zwvaejs2mqtt?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

To explain things a bit more, the autodiscovery that has just been implemented in domoticz originates from homeassistant. Both zwavejs2mqtt and zigbee2mqtt (and some others) have implemented homeassistant autodiscovery. This allows homeassistant to automatically create devices. Now, domoticz has also implemented this protocol so that domoticz can ALSO automatically create devices (and listen for updates or send commands to them).

In zwavejs2mqtt and zigbee12mqtt, you need to configure the topic for these systems send the autodiscovery messages to. The default is homeassistant but you can change it if you want. I use both zigbee and zwave so I have 2 separate MQTT devices in domoticz, one for zwave and one for zigbee. WHatever topic you define on one side (zwave or zigbee), you need to configure on the domoticz side as well.

In zwavejs2mqtt, the topic is called "prefix". in zigbee2mqtt, it's called "homeassistant discovery topic". For both, you need to set the switch ON for the discovery. In zwavejs, it's called "MQTT Discovery" which, in your case, is OFF so it won't send mesages.

The whole principle behind MQTT is that it's a message broker: you can send messages to it using a topic and you can subscirbe to messages using a topic. Multiple subscribers can subscibe to the same messages so both domoticz and homeassistant could use the same zwavejs2mqtt and zigbee2mqtt systems. If you have no homeassistant, that's fine. In that case, only domoticz listens to these "homeassistant"-autodiscovery messages.

Hope that's more clear now.

Herman
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
PieterS
Posts: 195
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by PieterS »

jvdz wrote: Thursday 06 January 2022 17:36 I guess you are missing the point I am making as I am talking about Domoticz too! The default MQTT discovery topic NAME is homeassistant..... as that is where this whole discovery topic originates ! So what have you now set the discovery topic to in zwvaejs2mqtt?
To be honest, sure. But as I mentioned before: i am a starter. Not familiar with the term Prefix in relation to Mqtt in Domoticz.
Seems to be trial & error.. :oops: Sorry.
I found the term Discovery prefix in the Home Assistant part (which was disabled) I had to leave that set default?
So I enabled the HomeAssistant-part in zwavejs2mqtt.
So some screens to answer your (further) question(s):
Image
фото
Image
фото
Image
фото

@Jos en @Herman: Thanks for your patience
Synology with Domoticz build (V2024.7) in Docker
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

Ok, So the first screencapture shows the MQTT Topic prefix : homeassistant -> This is the MQTT topic used for the AD CONFIG package which ALSO need to be defined exactly the same in the DOMOTICZ MQTT Hardware definition in field "Auto Discovery Prefix"!
You have there the zwave prefix, which is used for the state update mqtt message from ZWAVEJS2MQTT.
SO simply make this one change and you will be in business! :)
Schermafbeelding 2022-01-06 194457.png
Schermafbeelding 2022-01-06 194457.png (212.21 KiB) Viewed 1981 times
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
PieterS
Posts: 195
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by PieterS »

H Jos,

We made it! :D Took a while, sorry for unconvience. But I made progress! Almost there! :o

Now I made a first step. Next is to get more devices. Quite a few passed by in the log, but only two items are discovered as (new) Devices in Setup. Even after refresh, restart Domoticz and restart zwavejs2mqtt. :?

Code: Select all

2022-01-06 21:27:17.283 Status: MQTT client Gateway Autodiscovery: Connecting to 192.168.1.18:1883
2022-01-06 21:27:17.484 Status: MQTT client Gateway Autodiscovery: connected to: 192.168.1.18:1883
2022-01-06 21:27:17.484 Status: MQTT client Gateway Autodiscovery: Default input topic disabled in settings...
2022-01-06 21:27:17.985 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_9/nodeID_9_switch (unique_id: zwavejs2mqtt_0xc6026e04_9-37-0-currentValue)
2022-01-06 21:27:18.085 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_9/nodeID_9_electricity_power (unique_id: zwavejs2mqtt_0xc6026e04_9-49-0-Power)
2022-01-06 21:27:18.186 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_9/nodeID_9_electric_kwh_value (unique_id: zwavejs2mqtt_0xc6026e04_9-50-0-value-65537)
2022-01-06 21:27:18.286 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_9/nodeID_9_electric_w_value (unique_id: zwavejs2mqtt_0xc6026e04_9-50-0-value-66049)
2022-01-06 21:27:18.387 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_9/nodeID_9_over-current_status (unique_id: zwavejs2mqtt_0xc6026e04_9-113-0-Power_Management-Over-current_status)
2022-01-06 21:27:18.588 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_11/nodeID_11_climate (unique_id: zwavejs2mqtt_0xc6026e04_Node11_climate)
2022-01-06 21:27:18.688 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_11/nodeID_11_battery_level (unique_id: zwavejs2mqtt_0xc6026e04_11-128-0-level)
2022-01-06 21:27:18.789 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_11/nodeID_11_battery_islow (unique_id: zwavejs2mqtt_0xc6026e04_11-128-0-isLow)
2022-01-06 21:27:18.890 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_20/nodeID_20_rgb_dimmer (unique_id: zwavejs2mqtt_0xc6026e04_20-51-0-currentColor)
2022-01-06 21:27:18.990 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_20/nodeID_20_switch (unique_id: zwavejs2mqtt_0xc6026e04_20-37-0-currentValue)
2022-01-06 21:27:19.091 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_20/nodeID_20_electric_kwh_value (unique_id: zwavejs2mqtt_0xc6026e04_20-50-0-value-65537)
2022-01-06 21:27:19.191 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_20/nodeID_20_electric_w_value (unique_id: zwavejs2mqtt_0xc6026e04_20-50-0-value-66049)
2022-01-06 21:27:19.292 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_20/nodeID_20_electric_v_value (unique_id: zwavejs2mqtt_0xc6026e04_20-50-0-value-66561)
2022-01-06 21:27:19.392 Status: MQTT client Gateway Autodiscovery: discovered: nodeID_20/nodeID_20_electric_a_value (unique_id: zwavejs2mqtt_0xc6026e04_20-50-0-value-66817)
2022-01-06 21:27:19.570 Status: Incoming connection from: 192.168.1.43
Image
фото
This is what passes by in the broker:
Image
фото
Synology with Domoticz build (V2024.7) in Docker
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: zwavejs2mqtt

Post by jvdz »

All sensor devices will only actually be created when an status update comes in as that contains the value type and is needed for the apropriate sensor type to be created. Lights and switches will be immediately created.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
PieterS
Posts: 195
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: zwavejs2mqtt

Post by PieterS »

Thanks a lot for your replies!
In the mean time I changed the MQTT Home Assistant prefix in the OTGW so the last screenshot is not actual any more..
Synology with Domoticz build (V2024.7) in Docker
commentator
Posts: 54
Joined: Thursday 23 June 2016 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: NL
Contact:

Re: zwavejs2mqtt

Post by commentator »

looks nice this as alternative for openzwave
Can someone here tell me:
Is it updating the powerlevels as they should be (if turned on a switch there is power an if off the power is gone -> in ozw this is not always showing correct state)
OZW has a controlpanel to click on check state , is this also available in this zwavejs?
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

All my power plugs, into even the cheap Chinese ones, all report fine for me (better than OZW).

Zwavejs2mqtt has a control panel to completely interview every node, reinterview, ... In my case, I could finally configure nodes in a way that I could never do using OZW.

But, YMMV wrt domoticz support since there is still the odd device issue here and there.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
dens1975
Posts: 26
Joined: Monday 12 February 2018 17:03
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by dens1975 »

Hi, I installed the docker container, disabled my openzwave usb, reboot domoticz, reinsert my Zwave.me stick and can connect to the control panel but is says it can't open my device. Any ideas?

Driver: Failed to open the serial port: Error: No such file or directory, cannot open /dev/tty/ACM0
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

It should be /dev/ttyACM0 not /dev/tty/ACM0 right?

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
dens1975
Posts: 26
Joined: Monday 12 February 2018 17:03
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by dens1975 »

heggink wrote: Saturday 19 February 2022 23:08 It should be /dev/ttyACM0 not /dev/tty/ACM0 right?

Sent from my SM-G980F using Tapatalk
Sorry typo, yes it is set ttyACM0
Knipsel.JPG
Knipsel.JPG (24.49 KiB) Viewed 1625 times
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: zwavejs2mqtt

Post by heggink »

Are you running zigbee2mqtt in a docker? If so, did you map that device in the docker container?

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
dens1975
Posts: 26
Joined: Monday 12 February 2018 17:03
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: zwavejs2mqtt

Post by dens1975 »

I figured out that I have to start the container with high privilege than it works, thanks!
harrykausl
Posts: 177
Joined: Sunday 13 November 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Germany
Contact:

Re: zwavejs2mqtt

Post by harrykausl »

Can anybody tell me, which devices fpr the eurotronics spirit woll be created. I use the setpoint for normal temperatur, mode to switch between off and on and level and the level mode to get opening of the velve. Will thes devices be all available in zwavej2mqtt? Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest