Closed fredrike closed 4 years ago
Do you have a remote mqtt-server ? If not it seems strange that the internet connection should affect the local mqtt-connection, but i'll try to test.
I have a local mqtt-server but I've encountered that the plugin stops working a couple of times now, doing a manual (software) reboot of the TellStick fixes it. I'm not sure what is happening to the mqtt server.
Hmm ok strange, i have not seen this. Very solid for me and i use it daily, receiving and sending commands. Up-time of my tellstick at current is 18 days. And i think that's because it updated itself.
You feel like it is connected to internet outages ? A capture of "telldus/#" topic could maybe shed some light but as it looses connection to mqtt it might not.
The code should have reconnect functionality. I'll try to test this more extensively but according to the paho-mqtt docs it should reconnect automatically.
Reconnect seems to be working as intended. I've 'tcpkill'ed the connection and it reconnects as expected. I've also blocked (iptables -j DROP) my tellstick from connecting to the mqtt for a couple of minutes and then removed the block and it still reconnects as expected.
So there must be something else going on.
I'll take a look at the logs when the problem occurs again.
Thanks for the fast reply!
Great, good luck keep me posted! I'll close this for now, reopen if you find something :)
I found the issue!
For some reason the telldus publish telldus/telldus/available offline
and don't seem to update to online
.
telldus/telldus/available offline
telldus/telldus/debug {"scale": 2, "battery": null, "valueType": 256, "value": 0.0, "deviceId": 2, "type": "sensorValueUpdated"}
telldus/telldus/debug sensorState {'scale': 2, 'lastUpdated': 1584094573, 'value': '0.0'}
telldus/telldus/debug {"scale": 2, "battery": null, "valueType": 256, "value": 0.0, "deviceId": 1, "type": "sensorValueUpdated"}
telldus/telldus/debug sensorState {'scale': 2, 'lastUpdated': 1584094574, 'value': '0.0'}
telldus/telldus/debug {"scale": 0, "battery": 254, "valueType": 1, "value": 6.5, "deviceId": 11, "type": "sensorValueUpdated"}
telldus/telldus/debug sensorState {'scale': 0, 'lastUpdated': 1584094577, 'value': '6.5'}
telldus/telldus/debug {"protocol": "fineoffset", "id": 255, "values": [{"scale": 0, "type": 1, "value": 6.5}], "model": "temperature", "data": 68455366565, "class": "sensor"}
telldus/telldus/debug {"scale": 0, "battery": 254, "valueType": 1, "value": 8.6999999999999993, "deviceId": 121, "type": "sensorValueUpdated"}
telldus/telldus/debug sensorState {'scale': 0, 'lastUpdated': 1584094578, 'value': '8.7'}
telldus/telldus/debug {"protocol": "fineoffset", "id": 199, "values": [{"scale": 0, "type": 1, "value": 8.6999999999999993}, {"scale": 0, "type": 2, "value": 66}], "model": "temperaturehumidity", "data": 328302281419, "class": "sensor"}
When the TellStick lose internet connection the plugin seems to hang and not reconnect to the mqtt-server. It would be great if the plugin would try to reconnect if it lose connection.