The clean install didnāt helpā¦
Last night Iāve removed all (if I did it right) retained messages through MQTT Explorer, restarted the Mosquitto addon afterwards. Still having the unavailable states popping up every now and then.
Here are the logs from Mosquitto addon:
1644800861: āāā Username/password checking enabled.
1644800861: āāā TLS-PSK checking enabled.
1644800861: āāā Extended authentication not enabled.
1644800861: Opening ipv4 listen socket on port 1883.
1644800861: Opening ipv6 listen socket on port 1883.
1644800861: Opening websockets listen socket on port 1884.
1644800861: Warning: Mosquitto should not be run as root/administrator.
1644800861: mosquitto version 1.6.12 running
1644800861: New connection from 127.0.0.1 on port 1883.
1644800861: Socket error on client <unknown>, disconnecting.
1644800861: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644800861: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644800862: New connection from 172.30.32.1 on port 1883.
[02:07:42] INFO: Successfully send discovery information to Home Assistant.
[02:07:42] INFO: Successfully send service information to the Supervisor.
1644800862: New client connected from 172.30.32.1 as 2pyIfrI8LgHzD5rt3upqvR (p2, c1, k60, u'esp32switchbot').
1644800941: Socket error on client 2pyIfrI8LgHzD5rt3upqvR, disconnecting.
1644800963: New connection from 172.30.32.1 on port 1883.
1644800963: New client connected from 172.30.32.1 as 6dpNR4nUlm4p0xwn4cU6yJ (p2, c1, k60, u'esp32switchbot').
1644801432: Client ESP32SwitchBot disconnected due to protocol error.
1644801432: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644801432: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644801664: New connection from 192.168.2.31 on port 1883.
1644801664: New client connected from 192.168.2.31 as mqtt-explorer-2d92a234 (p2, c1, k60, u'esp32switchbot').
1644802041: Client mqtt-explorer-2d92a234 disconnected.
1644802662: Saving in-memory database to /data/mosquitto.db.
1644804463: Saving in-memory database to /data/mosquitto.db.
1644805603: Socket error on client ESP32SwitchBot, disconnecting.
1644805603: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644805603: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644805813: Client ESP32SwitchBot disconnected due to protocol error.
1644805813: New connection from 192.168.2.24 on port 1883.
1644805813: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644806264: Saving in-memory database to /data/mosquitto.db.
1644808065: Saving in-memory database to /data/mosquitto.db.
1644809866: Saving in-memory database to /data/mosquitto.db.
1644810255: Client ESP32SwitchBot disconnected due to protocol error.
1644810255: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644810255: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644811667: Saving in-memory database to /data/mosquitto.db.
1644812446: Socket error on client ESP32SwitchBot, disconnecting.
1644812446: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644812446: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644812626: Client ESP32SwitchBot disconnected due to protocol error.
1644812626: New connection from 192.168.2.24 on port 1883.
1644812626: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644813468: Saving in-memory database to /data/mosquitto.db.
1644814097: Socket error on client ESP32SwitchBot, disconnecting.
1644814097: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644814097: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644814126: Socket error on client ESP32SwitchBot, disconnecting.
1644814127: New connection from 192.168.2.24 on port 1883.
1644814127: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644814156: Client ESP32SwitchBot disconnected due to protocol error.
1644814157: New connection from 192.168.2.24 on port 1883.
1644814157: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644815269: Saving in-memory database to /data/mosquitto.db.
1644816887: Client ESP32SwitchBot disconnected due to protocol error.
1644816888: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644816888: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644817070: Saving in-memory database to /data/mosquitto.db.
1644818871: Saving in-memory database to /data/mosquitto.db.
1644820672: Saving in-memory database to /data/mosquitto.db.
1644820849: Invalid QoS in PUBLISH from ESP32SwitchBot, disconnecting.
1644820849: Socket error on client ESP32SwitchBot, disconnecting.
1644820849: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644820849: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644820939: Invalid QoS in PUBLISH from ESP32SwitchBot, disconnecting.
1644820939: Socket error on client ESP32SwitchBot, disconnecting.
1644820939: New connection from 192.168.2.24 on port 1883.
1644820939: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644822259: Socket error on client ESP32SwitchBot, disconnecting.
1644822260: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644822260: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644822473: Saving in-memory database to /data/mosquitto.db.
1644823881: Socket error on client ESP32SwitchBot, disconnecting.
1644823881: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644823881: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644824274: Saving in-memory database to /data/mosquitto.db.
1644824390: Socket error on client ESP32SwitchBot, disconnecting.
1644824390: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644824390: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644824723: Client ESP32SwitchBot disconnected due to protocol error.
1644824723: New connection from 192.168.2.24 on port 1883.
{"result": "ok", "data": {}}1644824723: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644824724: Client ESP32SwitchBot disconnected due to protocol error.
1644824730: New connection from 192.168.2.24 on port 1883.
1644824730: New client connected from 192.168.2.24 as ESP32SwitchBot (p2, c1, k300, u'esp32switchbot').
1644826075: Saving in-memory database to /data/mosquitto.db.
1644827876: Saving in-memory database to /data/mosquitto.db.
1644829677: Saving in-memory database to /data/mosquitto.db.
1644831478: Saving in-memory database to /data/mosquitto.db.
1644833279: Saving in-memory database to /data/mosquitto.db.
1644835080: Saving in-memory database to /data/mosquitto.db.
1644836881: Saving in-memory database to /data/mosquitto.db.
1644838682: Saving in-memory database to /data/mosquitto.db.
1644840483: Saving in-memory database to /data/mosquitto.db.
1644842284: Saving in-memory database to /data/mosquitto.db.
1644844085: Saving in-memory database to /data/mosquitto.db.
1644845886: Saving in-memory database to /data/mosquitto.db.
Here is the history from HA:
Turned off
3:40:04 PM - 1 hour ago
Became unavailable
3:40:04 PM - 1 hour ago
Turned off
8:45:30 AM - 8 hours ago
Became unavailable
8:45:24 AM - 8 hours ago
Turned off
8:45:24 AM - 8 hours ago
Became unavailable
8:45:23 AM - 8 hours ago
Turned off
8:39:51 AM - 8 hours ago
Became unavailable
8:39:50 AM - 8 hours ago
Turned off
8:31:21 AM - 9 hours ago
Became unavailable
8:31:21 AM - 9 hours ago
Turned off
8:04:20 AM - 9 hours ago
Became unavailable
8:04:19 AM - 9 hours ago
Turned off
7:42:19 AM - 9 hours ago
Became unavailable
7:42:19 AM - 9 hours ago
Turned off
7:40:49 AM - 9 hours ago
Became unavailable
7:40:49 AM - 9 hours ago
Turned off
6:34:48 AM - 11 hours ago
Became unavailable
6:34:47 AM - 11 hours ago
Turned off
5:49:17 AM - 11 hours ago
Became unavailable
5:49:16 AM - 11 hours ago
Turned off
5:48:47 AM - 11 hours ago
Became unavailable
5:48:46 AM - 11 hours ago
Turned off
5:48:18 AM - 11 hours ago
Became unavailable
5:48:17 AM - 11 hours ago
Turned off
5:23:46 AM - 12 hours ago
Became unavailable
5:23:46 AM - 12 hours ago
Turned off
5:20:46 AM - 12 hours ago
Became unavailable
5:20:46 AM - 12 hours ago
Turned off
4:44:15 AM - 12 hours ago
Became unavailable
4:44:15 AM - 12 hours ago
Turned off
3:30:13 AM - 14 hours ago
Became unavailable
3:30:13 AM - 14 hours ago
Turned off
3:26:43 AM - 14 hours ago
Became unavailable
3:26:43 AM - 14 hours ago
Turned off
2:17:12 AM - 15 hours ago
Became unavailable
2:17:12 AM - 15 hours ago
Turned off
2:07:42 AM - 15 hours ago
Became unavailable
2:07:34 AM - 15 hours ago
Turned off
1:54:54 AM - 15 hours ago
Became unavailable
1:54:44 AM - 15 hours ago
Turned off
1:26:13 AM - 16 hours ago
Turned on
1:26:13 AM - 16 hours ago
Turned off
12:48:23 AM - 16 hours ago
Became unavailable
12:48:13 AM - 16 hours ago
Turned off
12:28:39 AM - 17 hours ago
Became unavailable
12:28:32 AM - 17 hours ago
In the screenshot below, thereās one retained message that I canāt deleteā¦ If I click the X or send a blank message with retain flag to the topic, nothing happens. Also, whatās up with the topic retainedmessages/count under %SYS/broker?
What I did notice last night in the lastwill topic, there were online payloads at a regular interval, but when the state goed unavailable thereās 3 payloads at the same timestamp, in the following order: online - offline - online. Then it goes back to 1 payload per timestamp.
By now Iām really stuck here and donāt know what to do to make this work. I hope you know the solution! Could the last will message of the MQTT integration be a problem in this case?