Code runs well via the WebTerminal but not when device is restarted
-
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] EHOSTUNREACHSo 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. 😄 -
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.