Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lumimqtt keeps losing connection #38

Open
bruno-dogancic opened this issue Aug 14, 2023 · 1 comment
Open

lumimqtt keeps losing connection #38

bruno-dogancic opened this issue Aug 14, 2023 · 1 comment

Comments

@bruno-dogancic
Copy link

Dear @devbis ,

Thank you for this nice piece of software it keeps usage of an old product.

I have some problems, where lumimqtt loses connection, sometimes it manages to get back and other times it just keeps disconnected; at such occasions I restart the device, but this is not practical as it also servers as a router to my zigbee network.

I've seen people adding cron tasks to mitigate similar problems, any suggestion?

Running version is 1.0.16

Below are the errors, if more info is needed, please advise me on how to attain

INFO:lumimqtt.light:Change light from ON 255 #39ff1f to OFF 0 #39ff1f
ERROR:lumimqtt.lumimqtt:Connection lost. Will retry in 10 seconds
ERROR:lumimqtt.lumimqtt:Connection closed
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 367, in _periodic_publish
    await self._publish_sensor(sensor, value)
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 392, in _publish_sensor
    await self._client.publish(
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 301, in publish
    await self._wait((PacketType.PUBACK, packet_id))
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 367, in _wait
    return await future
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 504, in _connect_forever
    await connect_result.disconnect_reason
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 815, in _keepalive_mechanism_task
    raise ServerDiedError()
aio_mqtt.exceptions.ServerDiedError
INFO:lumimqtt.lumimqtt:Connected to 192.168.1.135 with client id 'lumimqtt_0x38839a639cf0'
ERROR:lumimqtt.lumimqtt:Connection lost. Will retry in 10 seconds
ERROR:lumimqtt.lumimqtt:Connection closed
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 377, in _periodic_publish
    await self._publish_light(light)
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 402, in _publish_light
    await self._client.publish(
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 301, in publish
    await self._wait((PacketType.PUBACK, packet_id))
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 367, in _wait
    return await future
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 481, in _connect_forever
    await self._client.publish(
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 301, in publish
    await self._wait((PacketType.PUBACK, packet_id))
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 367, in _wait
    return await future
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 815, in _keepalive_mechanism_task
    raise ServerDiedError()
aio_mqtt.exceptions.ServerDiedError
ERROR:lumimqtt.lumimqtt:Connection lost. Will retry in 10 seconds
ERROR:asyncio:Future exception was never retrieved
future: <Future finished exception=ServerDiedError()>
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 377, in _periodic_publish
    await self._publish_light(light)
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 402, in _publish_light
    await self._client.publish(
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 301, in publish
    await self._wait((PacketType.PUBACK, packet_id))
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 367, in _wait
    return await future
  File "/usr/lib/python3.9/site-packages/lumimqtt/lumimqtt.py", line 481, in _connect_forever
    await self._client.publish(
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 301, in publish
    await self._wait((PacketType.PUBACK, packet_id))
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 367, in _wait
    return await future
  File "/usr/lib/python3.9/site-packages/aio_mqtt/client.py", line 815, in _keepalive_mechanism_task
    raise ServerDiedError()
aio_mqtt.exceptions.ServerDiedError
INFO:lumimqtt.lumimqtt:Connected to 192.168.1.135 with client id 'lumimqtt_0x38839a639cf0'
INFO:lumimqtt.lumimqtt:Wait for network interruptions...
@blackie333
Copy link

Have similar problem with 2 devices, not sure if related to HA/host restart or just some time passing.
Would be nice to know some workaround or solution. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants