🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Code runs well via the WebTerminal but not when device is restarted

    UiFlow 2.0
    2
    2
    721
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dd-template
      last edited by

      Hello,
      I am trying to get an AtomS3U to run the code developed in UIFlow2 automatically upon restart.
      The device is flashed with the Alpha29-AtomS3U firmware.
      When I run the program from the UIFlow2 V2.0.0 WebTerminal, it works fine.
      When uploading the program on the device (over Wifi or through the web terminal), the upload works.
      But when restarting the device it does not work anymore.

      Here is the error message I get:
      Traceback (most recent call last):
      File "main.py", line 49, in <module>
      File "main.py", line 29, in setup
      File "umqtt/simple.py", line 68, in connect
      OSError: [Errno 118] EHOSTUNREACH

      So it works when the program is run from the web interface but not when restarting the device.

      Would someone have an idea what might be the reason?
      Will likely be obvious to some of you. 😄

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        You need to Add the Wifi connection blocks to your code so that the Atom can connect to a wifi network.
        When run from the website, the wifi is already activated by the UIFlow connection code.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post