M5 Stick C + UIFlow + MQTT

  • Hey,

    My setup

    • M5 Stick C
    • flashed and run with UI Flow 1.2.3


    I am able to setup connection to my local MQTT server - connection is fast, and durable (doesn't disconnect in general). However after I am connected M5 loose MQTT messages (doesn't receive them, or it doesn't handle them). At times it handles every message (lets say for about 10s), but later it doesn't handles any. Also at times it receive a message but it triggers the callback (the block of code) 5 - 10 s later.

    My feeling is that M5 get's the messages but for some reason those are lost within the device.

    I have similar setup with Wemos D1 (ESP8266) and there is no problem with MQTT.

    I can only imagine that code written in plain C / C++ would be more robust, but I like the UI Flow env a lot and I would like to keep using it.

    Do you have any hint what could be the reason of my problem and how could I try to fix it?

  • Ok, looks like I have solved the problem. I had to add empty infinite loop in order to not stop the device.


    0_1558263171783_Screenshot 2019-05-19 at 11.42.06.png

    After FIX

    0_1558263221235_Screenshot 2019-05-19 at 12.52.27.png

  • @michalt Thank you for sharing this solution.

    I had a similar "1 Shot" event like what you are describing but with the buttons.