Search found 7 matches

by dnoha
Sun Nov 07, 2021 6:28 pm
Forum: General Discussion and Questions
Topic: MQTT breaks infinite loop
Replies: 11
Views: 6918

Re: MQTT breaks infinite loop

Only not sure why mqtt_as client receives only messages with "/set" section.
Clipboard02.jpg
Clipboard02.jpg (10.33 KiB) Viewed 1063 times
Anything else is not received by my app?
by dnoha
Sun Nov 07, 2021 6:23 pm
Forum: General Discussion and Questions
Topic: MQTT breaks infinite loop
Replies: 11
Views: 6918

Re: MQTT breaks infinite loop

Ok, I have done it with .create_task. Now I have transfered everything as coro routines :D . I works reliabliy (tested for hours in good wifi, still need to test in bad wifi). # STARTING CORO ROUTINES print('STARTING CORO ROUTINES') event_loop = asyncio.get_event_loop() event_loop.create_task(blink(...
by dnoha
Mon Nov 01, 2021 5:58 pm
Forum: General Discussion and Questions
Topic: MQTT breaks infinite loop
Replies: 11
Views: 6918

Re: MQTT breaks infinite loop

I'm probably not using mqtt_as properly? Probably problematic part is connection section: # START CONNECTION TO MQTT (ASYNC) asyncio.run(main(client)) Main use of this program is controlling fridge temeprature. But main try while true loop thus not start until mqtt connection is established. That's ...
by dnoha
Mon Oct 11, 2021 6:36 pm
Forum: General Discussion and Questions
Topic: MQTT breaks infinite loop
Replies: 11
Views: 6918

Re: MQTT breaks infinite loop

It works ! Thank you for Your time compiling this. Actually, until now I was'nt aware of *.mpy binaries :oops: I thought that only option is to build custom firmware. Btw, now I need to learn also uasyncio .. One thing to note is that "stop/restart backend" (within Thonny) thus not start program, bu...
by dnoha
Sat Oct 09, 2021 12:05 pm
Forum: General Discussion and Questions
Topic: MQTT breaks infinite loop
Replies: 11
Views: 6918

Re: MQTT breaks infinite loop

Thank You for this input, peterhinch/micropython-mqtt looks good, but this might be obsticle for user like me: on the ESP8266. It must either be cross compiled or (preferably) built as frozen bytecode I have choosen Micropython hoping for simplicity. Compilig firmware probably is not too hard if you...
by dnoha
Thu Oct 07, 2021 6:06 pm
Forum: General Discussion and Questions
Topic: MQTT breaks infinite loop
Replies: 11
Views: 6918

MQTT breaks infinite loop

I just can't figure out why this breaks run after few seconds or minutes? Device is D1 Mini V3.0.0. It works better when serial cable is not plugged into PC. WiFi coverage is really good at test spot. I'm pretty sure that there is something with MQTT connection, but don't know how to test and repair...
by dnoha
Sat Jan 11, 2020 11:55 am
Forum: General Discussion and Questions
Topic: 'Long press' changed after firmware upgrade?
Replies: 2
Views: 2545

'Long press' changed after firmware upgrade?

I had one loop to determine if button at GPIO0 was just pressed or hold for more seconds. With old firmware, my NodeMCU device reset automatically if button (GPIO0) was hold for more then 8 sec. Therefore I counted 6 seconds (with sound feedback to user after each second), and after that switch AP m...