Using mqtt3.thingspeak.com, initially everything works well. but it appears the connection is disconnected after a period of inactivity. Is this expected? Is there a workaround? is some kind of keepalive expected?
Traceback (most recent call last):
File "microdot_asyncio.py", line 368, in dispatch_request
File "microdot_asyncio.py", line 432, in _invoke_handler
File "main.py", line 39, in toggle_led
File "umqtt/simple.py", line 134, in publish
OSError: [Errno 128] ENOTCONN
4 Comments
Time DescendingI would not expect that if your Wi-Fi connection is strong and constant. In our example code, we may not be sensitive to that effect, however.
In this MQTT Arduino example, if the connection is lost a new one is recreated. I don’t remember the reconnection happening consistently when we tested that code, but I’m not sure the time frame that you are seeing the reconnection required. How long in general do you wait before you see this issue?
Sign in to participate

