Wojciech Banaś

Results 19 comments of Wojciech Banaś

I looked into it. The problem is keepalive. You are not keeping the connection with any packages. Therefore, the connection is closed. Below is an example of how to do...

I'm just looking, and I see that the errors continue to appear. So this is not the solution I wrote above.

This code works ``` from umqtt.robust2 import MQTTClient def mqtt_connect(): mqtt_client = MQTTClient(mqtt_client_id, broker, 1883, mqtt_user, mqtt_pass, keepalive=60) mqtt_client.set_last_will(last_will_topic, 'Disconnected', retain=True) mqtt_client.connect() mqtt_client.publish(last_will_topic, 'Connected', retain=True) return mqtt_client def mqtt_reconnect(): print('Could...

In theory, you're right. In practice, the sent packet has 15 seconds to reach the server, and then we have 15 seconds to receive a response from the server. In...

It is interesting that I am not now repeat the problem. I have keepalive set to 11 seconds and check_msg() every 10 seconds. And everything is working.

The solution to this problem may be this implementation (micropython-umqtt.robust2==2.2.0): ``` import utime from umqtt.robust2 import MQTTClient def mqtt_connect(): mqtt_client = MQTTClient(mqtt_client_id, broker, 1883, mqtt_user, mqtt_pass, keepalive=60) mqtt_client.set_last_will(last_will_topic, 'Disconnected', retain=True)...

There is another variable that can affect the triggering of restarts (indirectly). Set "message_timeout=2*keepalive".

umqtt.simple does not report a lack of response from the server for a certain period of time (sometimes it can just hang). The error reported with umqtt.robust2 mentioned only occurs...

It did not work for me either. But I found the cause of this problem. I am using pyenv by default. Calling the python interpreter without specifying an absolute path,...