Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Added OTA updater option from esp8266 #587

Merged
merged 7 commits into from
Nov 8, 2018
Merged

WIP: Added OTA updater option from esp8266 #587

merged 7 commits into from
Nov 8, 2018

Conversation

sidey79
Copy link
Contributor

@sidey79 sidey79 commented Apr 9, 2018

Added OTA update support in config portal page

…Windeler but modified in some pieces to fit current library version
@sidey79 sidey79 changed the title WIP: Added OTA updater option from esp8266. Code is manly taken from Kolja… WIP: Added OTA updater option from esp8266 Apr 9, 2018
@sidey79
Copy link
Contributor Author

sidey79 commented Apr 10, 2018

@tablatronix
I Would like to know, if this is a feature you are willing to merge, before i put more work on it.
Otherwise, i can also provide an additional class which is a parent from your class.

@tablatronix
Copy link
Collaborator

I doubt it needs to be in core. Unless its very lightweight

@tablatronix
Copy link
Collaborator

I thought about refactoring menu and routes, so you can easily add menuoptions and routes, with callouts then you can just add this stuff fairly easily without modifying the lib.

@tablatronix tablatronix added this to the future milestone Apr 10, 2018
@tablatronix tablatronix added the enhancement Feature Request label Apr 10, 2018
@sidey79
Copy link
Contributor Author

sidey79 commented Apr 11, 2018

The libs needed seems to be already included per default in esp8266 core.

But there are some additional strings needed for the pages. Not sure if this is lightweight enough.

If you provide callbacks i could separate the update stuff in another class. But it would need some access to the server object.

@tablatronix
Copy link
Collaborator

#461

@sidey79
Copy link
Contributor Author

sidey79 commented Apr 11, 2018

In general, the pull request works on eps8266. But i haven't tested it on an ESP32.

Im also not sure, what breaks the example tests.

@liebman
Copy link
Contributor

liebman commented Apr 11, 2018

This is the error:

In file included from /home/travis/build/tzapu/WiFiManager/examples/AutoConnectWithStaticIP/AutoConnectWithStaticIP.ino:2:0:
/usr/local/share/arduino/libraries/WiFiManager/WiFiManager.h:46:25: fatal error: Updater.h: No such file or directory

Maybe that does not exist for the esp32 or has a different name?

@sidey79
Copy link
Contributor Author

sidey79 commented Apr 11, 2018

@liebman
Copy link
Contributor

liebman commented Apr 11, 2018

You should install the esp32 Arduino and test compile as there are some class differences.....

/usr/local/share/arduino/libraries/WiFiManager/WiFiManager.cpp: In member function 'void WiFiManager::handleUpdating()':
/usr/local/share/arduino/libraries/WiFiManager/WiFiManager.cpp:2419:3: error: 'stopAll' is not a member of 'WiFiUDP'
   WiFiUDP::stopAll();
   ^
/usr/local/share/arduino/libraries/WiFiManager/WiFiManager.cpp:2421:34: error: 'class EspClass' has no member named 'getFreeSketchSpace'
   uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
                                  ^

@tablatronix
Copy link
Collaborator

tablatronix commented Apr 11, 2018

I would file that as a bug with esp32 thats messed up, and yeah ota for esp32 is fairly different, Although converging the 2 is probably on the roadmap

@sidey79
Copy link
Contributor Author

sidey79 commented Apr 13, 2018

I corrected the compile errors with esp32.

I haven't tested the ota feature on an ESP32. But on 8266 it works

@tablatronix tablatronix changed the base branch from development to ota November 8, 2018 18:44
@tablatronix tablatronix changed the base branch from ota to development November 8, 2018 18:45
@tablatronix tablatronix changed the base branch from development to ota November 8, 2018 18:46
@tablatronix tablatronix merged commit 205d30e into tzapu:ota Nov 8, 2018
@tablatronix
Copy link
Collaborator

Merged into ota branch for testing.
i had to fix your urls they were backwards and didnt work.

I an probably going to pull this out into an example with user code insread of core, but this is working and testable, I added todos to code

@tablatronix
Copy link
Collaborator

you need to fix your strings menu_ids it is missing the update token _nummenutokens index must match HTTP_PORTAL_MENU index

@tablatronix
Copy link
Collaborator

3e2f8ae

@sidey79
Copy link
Contributor Author

sidey79 commented Nov 18, 2018

sorry, i forgot to check this

@sidey79 sidey79 deleted the dev-ota-updater branch November 18, 2018 21:04
@sidey79
Copy link
Contributor Author

sidey79 commented Dec 31, 2018

I'm not sure what ist open to geht this also in the Development branch.

One thing which ist absolutely a must ist a password protection i think.

@tablatronix
Copy link
Collaborator

There is an ota branch for this, it works

@sidey79
Copy link
Contributor Author

sidey79 commented Dec 31, 2018

I know. I'm testing the ota branch currently in my project.
But what ist your plan? Die you want to maintain this as a seperate Version or merge it into the development branch?

@tablatronix
Copy link
Collaborator

it has not been tested well and probably needs some minor improvements

@tablatronix tablatronix mentioned this pull request Dec 12, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants