Possible Problems with MQTT?

  • Hello,
    I'm currently working on a Project that requires me to monitor a door and post everytime the door gets opened or closed.
    I came up with the following Setup on an Atom Lite using the UIFlow IDE v1.11.1: 0_1674576135767_door_aws_1.PNG 1_1674576135767_door_aws_2.PNG
    On aws I'm subscribed to the Topic:"isDoorOpen/+/data" so i can collect data from different devices.
    My Problem is that it seems to be very inconsistent. I download the code to the Atom and it restarts and enters the App mode. At this Point everything seems to be working well, the LED changes and i see the messages on aws. But as soon as I try to attach everything to a door like this: ![0_1674576432603_20230124_165205.jpg](Uploading 100%) it doesnt seem to work. The LED sometimes stays red or the LED changes from red to green, detecting the motions correctly but doesnt post anything to aws.

    Are there any known bugs or complications that could cause this? Or anything wrong with my code?

    Thank you!

  • For this connection is Wifi needed .. and this step is missing in your flow. Just my first idea. During the connection via USB there isn´t a connection via wifi needed.

  • @mchott I configurated the Wifi connection using the M5burner. I will try to implement it in my code thoug, see if that makes a difference

  • Hello @bmtd111

    I think the WiFi connection configured via M5Burner only works as long as code is temporarily run on a device. In app mode though the WiFi connection might be lost if not executed within the UIFlow.

    Please see this thread.


  • @bmtd111 You have to define the wifi connection in your scetch too .. because the configuration of M5Burner is just used during connection with the computer via USB.

  • If the Atom is not connected to the host computer as it is when testing, you will need to add the WIFI AP and Password blocks to the start of the program.