seaky / nspanel_pro_tools_apk

283 stars 4 forks source link

MQTT connect failure #110

Open Notrial opened 1 week ago

Notrial commented 1 week ago

I'm on latest release. NSPanel on 1.7. Can't get MQTT to connect, says failure.

This is the MQTT log for the NSPanel:

1719407183: New connection from 192.168.1.192 on port 1883. 1719407183: Invalid protocol version 5 in CONNECT from 192.168.1.192. 1719407183: Sending CONNACK to 192.168.1.192 (0, 1) 1719407183: Socket error on client , disconnecting.

Any clues?

seaky commented 1 week ago

Hi,

What kind of MQTT server do you use? Currently mqtt server should support v5 protocol. Pervious app version v2.1 is still suppors v3 but the new app version requires v5. Btw v5 was released in 2019.

Notrial commented 1 week ago

Yeah it does seem I've neglected MQTT container with updates (running in Docker on Unraid).

image
seaky commented 6 days ago

From technical perspective I had to upgrade from v3 to v5 because internal zigbee server uses v5 protocol, so in order to support zigbee router mode I had to make this decision even though I dont really need v5 protocol features.

Notrial commented 5 days ago

Quick update. I setup a new broker and that did solve the connection issue. However, in the Home Assistant integration, I see quite a few sensors with unknown/unavailable state. I also see the two relay buttons (that don't exist on NSPanel pro). Please see the screenshot below. Is this still work in progress?

image

seaky commented 5 days ago

Did you enable mqtt publish event?

For Events if you enabled the publish events it should work! You can check the event messages by MQTTX os MQTTExplorer on windows.

The diagnostic is different topic somtimes the HA does not recognize or process the events dispite it had been sent. In this case try to enable disable mqtt connection.

Notrial commented 5 days ago

Awesome, that did the trick. Everything works as intended now! Thank you so much for your help and awesome app/integration.