hassio-addons/addon-zwave2mqtt

MQTT Connection Issue after changing settings

nellering opened this issue · 7 comments

Problem/Motivation

Changing MQTT settings causes the addon to no longer connect to MQTT.

Expected behavior

Settings can be changed without restarting after.

Actual behavior

Logs show issues connecting to MQTT after changing MQTT settings. Restarting the add-on seems to fix the problem.

2019-11-29T17:16:08.908Z z2m:Zwave zwave node 27: changed: 49-1-1:Temperature:19.4 -> 19.4
2019-11-29T17:16:08.909Z z2m:Mqtt Error while publishing a value client disconnecting
OpenZWave Detail, Node027, Received: 0x01, 0x0c, 0x00, 0x04, 0x00, 0x1b, 0x06, 0x31, 0x05, 0x01, 0x22, 0x00, 0xc2, 0x3f
OpenZWave Detail,
OpenZWave Info, Node027, Received SensorMultiLevel report from node 27, instance 1, Temperature: value=19.4C
OpenZWave Detail, Node027, Refreshed Value: old value=19.4, new value=19.4, type=decimal
OpenZWave Detail, Node027, Changes to this value are not verified
OpenZWave Detail, Node027, Notification: ValueChanged

Steps to reproduce

  1. Click on settings
  2. Change a setting in MQTT and click save.
  3. Go to logs, see error "z2m:Mqtt Error while publishing a value client disconnecting"

Proposed changes

Unknown - It seems to be related to this: https://github.com/OpenZWave/Zwave2Mqtt/issues/64

👋 Thanks for opening your first issue here! If you're reporting a 🐛 bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

Seeing the same when changing a setting. In my case it shows in the logs it stopped the stick. Above issue referred has incorrect link, presume OpenZWave/Zwave2Mqtt#64 (comment) is the answer. Have not verified myself yet.

Seems i cannot always reproduce this. Did a fresh one and played with the settings and could not find an issue. Changed the rights on the zwcfg file but has had no impact. I think it is a combination of changing nodes & settings. If i bump into it again i'll try and see if i can piggy back the steps.

Update: got one again.

2019-12-28T14:15:54.948Z z2m:Zwave zwave node 63: changed: 50-2-32:Exporting:false -> false
2019-12-28T14:15:54.949Z z2m:Zwave zwave node 63: changed: 50-2-0:Energy:0 -> 0
[28/Dec/2019:15:16:07 +0100] 200 -(192.168.1.72) POST /api/settings HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36)
2019-12-28T14:16:07.897Z z2m:Gateway Closing Gateway...
POST /api/settings 200 16.429 ms - 63
2019-12-28 15:16:08.003 Info, mgr,     Manager::WriteConfig completed for driver with home ID of 0xd16d03da
2019-12-28 15:16:08.003 Info, mgr,     Driver for controller /dev/ttyACM1 pending removal
2019-12-28 15:16:08.003 Detail, Notification: DriverRemoved
2019-12-28 15:16:08.003 Always, ***************************************************************************
2019-12-28 15:16:08.003 Always, *********************  Cumulative Network Statistics  *********************
2019-12-28 15:16:08.003 Always, *** General
2019-12-28 15:16:08.003 Always, Driver run time: . .  . 0 days, 0 hours, 26 minutes
2019-12-28 15:16:08.003 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 2354
2019-12-28 15:16:08.004 Always, Total messages successfully received: . . . . . . . . . . 2354
2019-12-28 15:16:08.004 Always, Total Messages successfully sent: . . . . . . . . . . . . 750
2019-12-28 15:16:08.004 Always, ACKs received from controller:  . . . . . . . . . . . . . 876
2019-12-28 15:16:08.004 Always, *** Errors
2019-12-28 15:16:08.004 Always, Unsolicited messages received while waiting for ACK:  . . 0
2019-12-28 15:16:08.004 Always, Reads aborted due to timeouts:  . . . . . . . . . . . . . 0
2019-12-28 15:16:08.004 Always, Bad checksum errors:  . . . . . . . . . . . . . . . . . . 0
2019-12-28 15:16:08.004 Always, CANs received from controller:  . . . . . . . . . . . . . 0
2019-12-28 15:16:08.004 Always, NAKs received from controller:  . . . . . . . . . . . . . 0
2019-12-28 15:16:08.004 Always, Out of frame data flow errors:  . . . . . . . . . . . . . 0
2019-12-28 15:16:08.004 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 0
2019-12-28 15:16:08.004 Always, Messages dropped and not delivered: . . . . . . . . . . . 23
2019-12-28 15:16:08.004 Always, ***************************************************************************
2019-12-28 15:16:08.004 Detail, WriteMsg Wait Timeout m_currentMsg=00000000```

So after changing the setting of the payload, above message was shown.

Same problem here ... But i don't use the addon (zwave2mqtt works on a standalone RPi), only for mosquitto.
Capture1

v0.5.0 is released, does that improve things?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.