Originally posted by enigmatheatre
View Post
Announcement
Collapse
No announcement yet.
ESP8266 OTA using the API sketch (code included)
Collapse
X
-
Edit: It looks like I needed to install Python 2.7.14 and a nice reboot. I was able to update the board over the air. This is a real cool feature, especially when I can not reach the shed anymore because the snow.
Happy Holidays.
Thank you for your help. I updated all my boards to the latest version and as you noted in your picture, I can see the board via IP address. When I compile it and try to upload is where I get that message. It looks like that is looking for python.exe.
Thanks,
AldoLast edited by alphatech; December 19, 2017, 10:44 PM.
Leave a comment:
-
Originally posted by aldo View PostEdit: I think I have it figured out. one question remains, how do I know which library I should install and which the program requires, I get this error when I compile the LCD program
WARNING: library LiquidCrystal_I2C claims to run on [avr] architecture(s) and may be incompatible with your current board which runs on [esp8266] architecture(s).
Edit: I was able to manage to update the boards ot at least one for now. I copied the old board code and replaced it with the new code by making sure I would not overwrite replace any of enigmatheatre code.
By the way, what do you suggest for the default location for libraries and board code, could I store the code on a NAS so every pc has access to the board code?
Can anyone please let me know how to update over the air with the new code when they have a chance?
By mistake I updated yesterday to the release Beta V.146 prematurely. Absolutely not an issue, unfortunately I can not find any documentation on what to do to update my boards. Also, how do I use the great new feature OTA?
Thanks,
Aldo
The OTA update is done through the IDE, but you must have uploaded the OTA capable sketch by USB first. You will see the OTA boards listed when you select port under tools from the IDE.
Leave a comment:
-
Originally posted by aldo View PostWhen I try to upload the sketch over the air, I get the following message, any help would greatly be appreciated.
java.io.IOException: Cannot run program "python.exe": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:2 6)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.j ava:129)
at cc.arduino.packages.uploaders.GenericNetworkUploader.uploadU singPreferences(GenericNetworkUploader.java:99)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java :709)
at processing.app.SketchController.exportApplet(SketchControlle r.java:682)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2 190)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 8 more
An error occurred while uploading the sketch
Leave a comment:
-
When I try to upload the sketch over the air, I get the following message, any help would greatly be appreciated.
java.io.IOException: Cannot run program "python.exe": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:2 6)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.j ava:129)
at cc.arduino.packages.uploaders.GenericNetworkUploader.uploadU singPreferences(GenericNetworkUploader.java:99)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java :709)
at processing.app.SketchController.exportApplet(SketchControlle r.java:682)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2 190)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 8 more
An error occurred while uploading the sketch
Leave a comment:
-
Edit: I think I have it figured out. one question remains, how do I know which library I should install and which the program requires, I get this error when I compile the LCD program
WARNING: library LiquidCrystal_I2C claims to run on [avr] architecture(s) and may be incompatible with your current board which runs on [esp8266] architecture(s).
Edit: I was able to manage to update the boards ot at least one for now. I copied the old board code and replaced it with the new code by making sure I would not overwrite replace any of enigmatheatre code.
By the way, what do you suggest for the default location for libraries and board code, could I store the code on a NAS so every pc has access to the board code?
Can anyone please let me know how to update over the air with the new code when they have a chance?
By mistake I updated yesterday to the release Beta V.146 prematurely. Absolutely not an issue, unfortunately I can not find any documentation on what to do to update my boards. Also, how do I use the great new feature OTA?
Thanks,
AldoLast edited by alphatech; December 19, 2017, 12:44 PM.
Leave a comment:
-
Originally posted by enigmatheatre View PostFYI OTA update is available in Beta V.146 for normal and API sketches available in the updater.
Greig.
Robert
Leave a comment:
-
FYI OTA update is available in Beta V.146 for normal and API sketches available in the updater.
Greig.
Leave a comment:
-
Logbuilder,
Thank you for the info! I've fallen in love with the NodeMCU over the arduino. I wish I had more than one analog pin, but still a reliable, compact product.
With the OTA option I'm looking into using the Nextion serial touchscreen like this project uses:
https://community.home-assistant.io/...lacement/25464
This ends up being single gang with a customer 3D printed switch plate. If this works like I think I can replace my clunky UPB scene keypads with LCD touchscreens. The thing holding me back before was how to update .... OTA fixes that issue!
Thanks again, and I hope this ends up in the standard and API plugin sketches in the future.
Guy
Leave a comment:
-
Originally posted by zwolfpack View PostLooks like I'm SOL with the Sparkfun boards. Apparently the flash on these is too small to accommodate OTA.
Leave a comment:
-
Looks like I'm SOL with the Sparkfun boards. Apparently the flash on these is too small to accommodate OTA.
Leave a comment:
-
Originally posted by vasrc View PostHaven't messed with C for a bazillion years ..
Z
Leave a comment:
-
Originally posted by logbuilder View PostI didn't have to set up anything in regards to partitions. I'm guessing it is handled in the ArduinoOTA library. I just set the board type to ESP32 Dev Module and compiled and flashed with cable. Then, it showed up in the IDE network ports just as expected. Tested loading several sketches OTA and no problem.
Right now, I have my main sketch which all the nodes run. However, I do have to set board specific parms and compile for that target board. I need to clean that up. First step would be to isolate all those board specific defines to a .h that lives in each board's folder which gets included at compile. That would help a bunch when changing the base sketch such that all boards need to be updated now. That might be as far as I need to go but I see the value in a generic sketch. Intentionally loading from the IDE seems like a natural process. Not sure I want any reloading without my direction.
Haven't thought this out enough but off the top of my head next step would be to get those board specific items in the eeprom on the board. Then a totally generic app could be loaded which looks in eeprom and tailors itself. I think that is where you are going when you mention NVS but not sure what that acronym means in this context (non-volatile storage?).
To be honest, I'm just tickled I don't have to go to each device to do updates. I have them in three different buildings around my property and some in not so easy to get to locations.
ETA: My ESP32 is a ESP-WROOM-32S V1.1 and I use the Arduino IDE.
Yup, NVS is non-volatile. Look at the Preferences code, it works really well, not as cryptic as EEPROM is (which is still there).
I was also looking at having an Init sketch that burns in the defaults (to NVS) and let it go from there, but like I said, it's not easy (at least for me) to get it out of NVS (or EEPROM for that matter) and into the device prior to setup() (mainly for IP addr, and MQTT broker configs info).
Primary problem seems to be replacing all of the #define values with variables. Not sure if it's Adruino or just C? Haven't messed with C for a bazillion years ..
Z
Leave a comment:
-
Originally posted by vasrc View PostDoesn't work on my ESP32 (Rev 1) for some reason, keep getting the dreaded error[4]. Thinking my partitions aren't defined correctly as I don't see two OTA partitions. How do you partition yours?
I think I'll just clear the flash memory and start over..
Originally I had it retrieving the new bin from my webserver whenever I sent it a command (ie Pull vs Push). But I'm leaning towards pushing it now.
My biggest headache is trying to figure out a way to pull the device config (ie IPaddr, MQTT broker, DeviceID, DigIn, DigOut, Analog pin #'s, etc) from the NVS when it starts up so I can send it generic sketches. Can't get it to work outside of setup().
Z
Right now, I have my main sketch which all the nodes run. However, I do have to set board specific parms and compile for that target board. I need to clean that up. First step would be to isolate all those board specific defines to a .h that lives in each board's folder which gets included at compile. That would help a bunch when changing the base sketch such that all boards need to be updated now. That might be as far as I need to go but I see the value in a generic sketch. Intentionally loading from the IDE seems like a natural process. Not sure I want any reloading without my direction.
Haven't thought this out enough but off the top of my head next step would be to get those board specific items in the eeprom on the board. Then a totally generic app could be loaded which looks in eeprom and tailors itself. I think that is where you are going when you mention NVS but not sure what that acronym means in this context (non-volatile storage?).
To be honest, I'm just tickled I don't have to go to each device to do updates. I have them in three different buildings around my property and some in not so easy to get to locations.
ETA: My ESP32 is a ESP-WROOM-32S V1.1 and I use the Arduino IDE.
Leave a comment:
-
Originally posted by logbuilder View PostWas curious whether the OTA code would work on the ESP32.
Surprisingly, it worked fine with no changes.
I think I'll just clear the flash memory and start over..
Originally I had it retrieving the new bin from my webserver whenever I sent it a command (ie Pull vs Push). But I'm leaning towards pushing it now.
My biggest headache is trying to figure out a way to pull the device config (ie IPaddr, MQTT broker, DeviceID, DigIn, DigOut, Analog pin #'s, etc) from the NVS when it starts up so I can send it generic sketches. Can't get it to work outside of setup().
Z
Leave a comment:
Leave a comment: