Page 16 of 23
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 10:36
by PieterS
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 11:16
by jvdz
PieterS wrote: ↑Thursday 06 January 2022 10:36
Thx
Were you able to get all working with the correct topic names?

Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 15:45
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})
No idea what how to get further. Maybe you can help me out?
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 15:51
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
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 16:36
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.
фото
фото
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:
фото
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?
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 17:36
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?
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 18:07
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
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 19:35
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..

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):
фото
фото
фото
@Jos en @Herman: Thanks for your patience
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 19:43
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 (212.21 KiB) Viewed 2195 times
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 22:03
by PieterS
H Jos,
We made it!

Took a while, sorry for unconvience. But I made progress! Almost there!
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
фото
This is what passes by in the broker:
фото
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 22:09
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.
Re: zwavejs2mqtt
Posted: Thursday 06 January 2022 22:25
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..
Re: zwavejs2mqtt
Posted: Friday 07 January 2022 19:29
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?
Re: zwavejs2mqtt
Posted: Friday 07 January 2022 20:09
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
Re: zwavejs2mqtt
Posted: Saturday 19 February 2022 17:11
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
Re: zwavejs2mqtt
Posted: Saturday 19 February 2022 23:08
by heggink
It should be /dev/ttyACM0 not /dev/tty/ACM0 right?
Sent from my SM-G980F using Tapatalk
Re: zwavejs2mqtt
Posted: Sunday 20 February 2022 14:00
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 (24.49 KiB) Viewed 1839 times
Re: zwavejs2mqtt
Posted: Sunday 20 February 2022 14:49
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
Re: zwavejs2mqtt
Posted: Sunday 20 February 2022 18:39
by dens1975
I figured out that I have to start the container with high privilege than it works, thanks!
Re: zwavejs2mqtt
Posted: Friday 25 February 2022 16:24
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!