Search found 16 matches

by bergpb
Sat Jul 06, 2019 5:46 pm
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

After a lot of tests, a solution to put sleep_ms(500) in code works fine.
I put too a check_status when a publish to a topic in every 500ms.
Now esp32 is online about some last 3 hours:
Here is the code:

Code: Select all

while True:
    c.check_msg()
    check_status(c)
    gc.collect()
    sleep_ms(500)
by bergpb
Thu Jul 04, 2019 1:47 am
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

Same using check_msg(), after some time code freeze and after press ctrl+c return this: Disconnecting... Traceback (most recent call last): File "main.py", line 5, in <module> File "mqtt.py", line 149, in connect File "mqtt.py", line 143, in main File "mqtt.py", line 140, in main File "mqtt.py", lin...
by bergpb
Wed Jul 03, 2019 2:15 pm
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

I will try with check_msg() and return if works.
by bergpb
Wed Jul 03, 2019 12:52 am
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

After freeze and press ctrl+c i have this output: ------------------------------------------------------------- Disconnecting... Traceback (most recent call last): File "main.py", line 5, in <module> File "mqtt.py", line 149, in connect File "mqtt.py", line 143, in main File "mqtt.py", line 140, in ...
by bergpb
Tue Jul 02, 2019 10:06 am
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

@python coder and @kevinkk525 codes just freeze and dont receive any updates anymore.
I try to press ctrl+c to get error.
by bergpb
Mon Jul 01, 2019 11:41 pm
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

Hey, sorry for late answer.
This is my code:
https://pyfiddle.io/fiddle/135928ff-8e1 ... a9/?i=true
by bergpb
Mon Jul 01, 2019 1:46 pm
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

Re: MQTT code freeze after some time.

Hello, i'm use this library: https://github.com/micropython/micropyt ... qtt.simple,
and this https://docs.micropython.org/en/latest/ ... ujson.html.
I'm use ujson to get a js from outher publisher device and execute based on command received.
by bergpb
Mon Jul 01, 2019 1:05 pm
Forum: ESP32 boards
Topic: MQTT code freeze after some time.
Replies: 17
Views: 903

MQTT code freeze after some time.

Hello, i have a mqtt code with subscribe method i my ESP32 with latest micropython build.
After some time, code froze and i cant receive more updates from subscribe.
I try to put gc.collect in code to clean garbage but not works.
Any solutions to this?
by bergpb
Wed Apr 17, 2019 2:50 am
Forum: General Discussion and Questions
Topic: Microdot - Web Framework to Micropython
Replies: 1
Views: 420

Microdot - Web Framework to Micropython

The impossibly small web framework for MicroPython...

https://github.com/miguelgrinberg/microdot

The first web framework to micropython?