Page 2 of 6

Re: MQTT Audo-discovery

Posted: Monday 20 December 2021 17:50
by rron
jvdz wrote: Monday 20 December 2021 17:35 You need to set the prefix the same at both sides, so change the domoticz prefix in ZWAVEJS2MQTT to homeassistant as well when that is what you have defined in domoticz/mqtt.
That topic prefix is used to exchange the device CONFIG topics & payload for auto discovery!
Still the same error
Schermafdruk van 2021-12-20 17-48-00.png
Schermafdruk van 2021-12-20 17-48-00.png (128.4 KiB) Viewed 3500 times
Schermafdruk van 2021-12-20 17-48-26.png
Schermafdruk van 2021-12-20 17-48-26.png (202.74 KiB) Viewed 3500 times

Code: Select all

 2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (18/38/0/currentValue/{"time":1640003037730,"value":99,"nodeName":"Wasmachine","nodeLocation":"Zolder"})!
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 18/38/0/currentValue, Message: {"time":1640003037730,"value":99,"nodeName":"Wasmachine","nodeLocation":"Zolder"})
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (23/38/1/currentValue/{"time":1639954365610,"value":0,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})!
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 23/38/1/currentValue, Message: {"time":1639954365610,"value":0,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (23/38/2/currentValue/{"time":1639821438142,"value":99,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})!
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 23/38/2/currentValue, Message: {"time":1639821438142,"value":99,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"}) 

Re: MQTT Audo-discovery

Posted: Monday 20 December 2021 18:01
by jvdz
OK... now check mqtt for the config messages send.
They should be in topic homeassistant and clean out all retained message in the wrong place topic domoticz.
See https://www.domoticz.com/wiki/MQTT#Debugging_MQTT

Re: MQTT Audo-discovery

Posted: Monday 20 December 2021 19:45
by rron
jvdz wrote: Monday 20 December 2021 18:01 OK... now check mqtt for the config messages send.
They should be in topic homeassistant and clean out all retained message in the wrong place topic domoticz.
See https://www.domoticz.com/wiki/MQTT#Debugging_MQTT
I cannot see any config message in MQTT explorer.

Re: MQTT Audo-discovery

Posted: Monday 20 December 2021 22:22
by heggink
rron wrote: Monday 20 December 2021 17:50
jvdz wrote: Monday 20 December 2021 17:35 You need to set the prefix the same at both sides, so change the domoticz prefix in ZWAVEJS2MQTT to homeassistant as well when that is what you have defined in domoticz/mqtt.
That topic prefix is used to exchange the device CONFIG topics & payload for auto discovery!
Still the same errorSchermafdruk van 2021-12-20 17-48-00.pngSchermafdruk van 2021-12-20 17-48-26.png

Code: Select all

 2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (18/38/0/currentValue/{"time":1640003037730,"value":99,"nodeName":"Wasmachine","nodeLocation":"Zolder"})!
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 18/38/0/currentValue, Message: {"time":1640003037730,"value":99,"nodeName":"Wasmachine","nodeLocation":"Zolder"})
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (23/38/1/currentValue/{"time":1639954365610,"value":0,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})!
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 23/38/1/currentValue, Message: {"time":1639954365610,"value":0,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (23/38/2/currentValue/{"time":1639821438142,"value":99,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})!
2021-12-20 17:47:14.732 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 23/38/2/currentValue, Message: {"time":1639821438142,"value":99,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"}) 
If this is your zwavejs config then that still uses domoticz as the prefix instead of homeassistant. Looks like you changed the name, not the prefix (on the second line).

Re: MQTT Audo-discovery

Posted: Monday 20 December 2021 22:49
by jvdz
You really need to get rid of all those homeassistant topic message as they all seem to be status update messages which should not be the case. They should be standard in the ZWAVE topic. Did you change that default too?
Also check your domoticz topic for any retained messages from the ZWAVEJS2MQTT gateway and get rid of those too.
Review your ZWAVEJS2MQTT and set the discovery topic to homeassistant and set the status update topic to zwave and ensure this config becomes active.
After that you should see the config payload in MQTTExplorer.

EDIT: Just checked the ZWAVEJS2MQTT settings and these need to be checked (these are the defaults as far as I remember):
MQTT
Name: A unique name that identifies the Gateway.
Host url: The url of the broker. Insert the protocol if present, example: tls://localhost. Mqtt supports these protocols: mqtt, mqtts, tcp, tls, ws and wss
Port: Broker port
Reconnect period: Milliseconds between two reconnection tries
Prefix: zwave

Home Assistant
WS Server: Enable Z-Wave JS websocket server. This can be used by the official Home Assistant Z-Wave integration to automatically create entities
MQTT discovery: Enable this to use MQTT discovery. This is an alternative to the official integration. (more about this here)
Discovery Prefix: homeassistant

Re: MQTT Audo-discovery

Posted: Tuesday 21 December 2021 21:49
by rron
jvdz wrote: Monday 20 December 2021 22:49 You really need to get rid of all those homeassistant topic message as they all seem to be status update messages which should not be the case. They should be standard in the ZWAVE topic. Did you change that default too?
Also check your domoticz topic for any retained messages from the ZWAVEJS2MQTT gateway and get rid of those too.
Review your ZWAVEJS2MQTT and set the discovery topic to homeassistant and set the status update topic to zwave and ensure this config becomes active.
After that you should see the config payload in MQTTExplorer.

EDIT: Just checked the ZWAVEJS2MQTT settings and these need to be checked (these are the defaults as far as I remember):
MQTT
Name: A unique name that identifies the Gateway.
Host url: The url of the broker. Insert the protocol if present, example: tls://localhost. Mqtt supports these protocols: mqtt, mqtts, tcp, tls, ws and wss
Port: Broker port
Reconnect period: Milliseconds between two reconnection tries
Prefix: zwave

Home Assistant
WS Server: Enable Z-Wave JS websocket server. This can be used by the official Home Assistant Z-Wave integration to automatically create entities
MQTT discovery: Enable this to use MQTT discovery. This is an alternative to the official integration. (more about this here)
Discovery Prefix: homeassistant
Still the same errors. I red different topics and combined the setting mentioned. This is what I have now:
Schermafdruk van 2021-12-21 21-46-45.png
Schermafdruk van 2021-12-21 21-46-45.png (252.47 KiB) Viewed 3427 times
Schermafdruk van 2021-12-21 21-47-06.png
Schermafdruk van 2021-12-21 21-47-06.png (231.68 KiB) Viewed 3427 times
Schermafdruk van 2021-12-21 21-47-33.png
Schermafdruk van 2021-12-21 21-47-33.png (236.5 KiB) Viewed 3427 times

Re: MQTT Audo-discovery

Posted: Tuesday 21 December 2021 22:19
by jvdz
MQTT PREFIX in ZWAVEJS2MQTT is still wrong! That sends the status updates and they should not go into the same topic as the autodiscovery (homeassistant)!
As stated in my previous post: That should be ZWAVE which it is by default. ;)

Re: MQTT Audo-discovery

Posted: Wednesday 22 December 2021 17:51
by rron
jvdz wrote: Tuesday 21 December 2021 22:19 MQTT PREFIX in ZWAVEJS2MQTT is still wrong! That sends the status updates and they should not go into the same topic as the autodiscovery (homeassistant)!
As stated in my previous post: That should be ZWAVE which it is by default. ;)
I wiiltry again and let you know. Thanks for your help.

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 13:52
by rron
jvdz wrote: Tuesday 21 December 2021 22:19 MQTT PREFIX in ZWAVEJS2MQTT is still wrong! That sends the status updates and they should not go into the same topic as the autodiscovery (homeassistant)!
As stated in my previous post: That should be ZWAVE which it is by default. ;)
Still errors :shock: I think I changed everything you said.But the mqtt devices are in domoticz and working.When I restart the messages appear again.
Schermafdruk van 2021-12-24 13-47-54.png
Schermafdruk van 2021-12-24 13-47-54.png (161.71 KiB) Viewed 3359 times
Schermafdruk van 2021-12-24 13-48-25.png
Schermafdruk van 2021-12-24 13-48-25.png (199.37 KiB) Viewed 3359 times

Code: Select all

 2021-12-24 13:45:00.003 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (23/38/1/currentValue/{"time":1640349720033,"value":61,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})!
2021-12-24 13:45:00.003 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 23/38/1/currentValue, Message: {"time":1640349720033,"value":61,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})
2021-12-24 13:45:00.203 Error: MQTT: MQTT_Discovery: Something other then 'config' received on discovery topic! (23/38/2/currentValue/{"time":1640349720096,"value":99,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})!
2021-12-24 13:45:00.203 Error: MQTT: MQTT_Discovery: Invalid/Unhandled data received! (Topic: 23/38/2/currentValue, Message: {"time":1640349720096,"value":99,"nodeName":"Kamer dimmer","nodeLocation":"Huiskamer"})
2021-12-24 13:45:07.985 MQTT: General/Current (Magnetron_electric_a_value) 

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 13:55
by mark.sellwood
I'm following this too as I'm trying with no luck to get Auto Discovery working with both Z-Wave & Zigbee.

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 13:58
by rron
mark.sellwood wrote: Friday 24 December 2021 13:55 I'm following this too as I'm trying with no luck to get Auto Discovery working with both Z-Wave & Zigbee.
Well itś working only with a lot off error messages in the logfile. I cann't see what is wrong.

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 14:14
by mark.sellwood
I haven't got that far, all I get is errors, I think I haven t configured ZWaveJS2MQTT correctly, so looking to see what others have done so I can follow.

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 14:51
by McMelloW
rron wrote: Friday 24 December 2021 13:58 Well itś working only with a lot off error messages in the logfile. I cann't see what is wrong.
I left the fields Topic In Prefix: & Topic Out Prefix: empty and only Auto Discovery Prefix: contains text. It works OK for me.

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 14:57
by rron
McMelloW wrote: Friday 24 December 2021 14:51
rron wrote: Friday 24 December 2021 13:58 Well itś working only with a lot off error messages in the logfile. I cann't see what is wrong.
I left the fields Topic In Prefix: & Topic Out Prefix: empty and only Auto Discovery Prefix: contains text. It works OK for me.
I also tried that but that doesn't change the error messages. The message are only in the startup cyclus and after some time the are gone. If you change something the error is visible again. :?:

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 15:12
by McMelloW
Restart of Domoticz

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 15:19
by rron
McMelloW wrote: Friday 24 December 2021 15:12 Restart of Domoticz
Done several times, no luck. Is it possible to post your settings? Perhaps I have overlocked something.

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 15:25
by jvdz
Did you remove all retained OLD wrong Messages from topic "HOMEASSISTANT" or else you will still be getting these errors each time you start Domoticz?

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 15:28
by rron
jvdz wrote: Friday 24 December 2021 15:25 Did you remove all retained OLD wrong Messages from topic "HOMEASSISTANT" or else you will still be getting these errors each time you start Domoticz?
Where can I find this?

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 15:31
by jvdz
rron wrote: Friday 24 December 2021 15:28
jvdz wrote: Friday 24 December 2021 15:25 Did you remove all retained OLD wrong Messages from topic "HOMEASSISTANT" or else you will still be getting these errors each time you start Domoticz?
Where can I find this?
jvdz wrote: Monday 20 December 2021 18:01 OK... now check mqtt for the config messages send.
They should be in topic homeassistant and clean out all retained message in the wrong place topic domoticz.
See https://www.domoticz.com/wiki/MQTT#Debugging_MQTT
So, Just clean out TOPIC HOMEASSISTANT and probably also DOMOTICZ, as you had them initially in the wrong places. ;)

Re: MQTT Audo-discovery

Posted: Friday 24 December 2021 15:38
by rron
jvdz wrote: Friday 24 December 2021 15:31
rron wrote: Friday 24 December 2021 15:28
jvdz wrote: Friday 24 December 2021 15:25 Did you remove all retained OLD wrong Messages from topic "HOMEASSISTANT" or else you will still be getting these errors each time you start Domoticz?
Where can I find this?
jvdz wrote: Monday 20 December 2021 18:01 OK... now check mqtt for the config messages send.
They should be in topic homeassistant and clean out all retained message in the wrong place topic domoticz.
See https://www.domoticz.com/wiki/MQTT#Debugging_MQTT
So, Just clean out TOPIC HOMEASSISTANT and probably also DOMOTICZ, as you had them initially in the wrong places. ;)
In the plugin?