suchmememanyskill / CYD-Klipper

An implementation of a wireless Klipper status display on an ESP32 + screen
https://suchmememanyskill.github.io/CYD-Klipper/
GNU General Public License v3.0
248 stars 33 forks source link

[FR] OTA Update #25

Closed Misterke closed 9 months ago

Misterke commented 9 months ago

I know the README even mentions there is no OTA support, but I don't understand why there isn't. XTouch has OTA support and that just requires some place on the Internet hosting the bin file and a JSON version file, so why force everyone through manual updates?

If there is any good reason why OTA updating would not be possible, then at least clearly mention that reason in the README instead of just mention that it isn't included.

suchmememanyskill commented 9 months ago

@Misterke i don't know how it works, that's the simple answer. If you can point me to how it works in xtouch's repo, i'd be very grateful

Misterke commented 9 months ago

@Misterke i don't know how it works, that's the simple answer. If you can point me to how it works in xtouch's repo, i'd be very grateful

Well, I have not dug completely into how xtouch does it, but quickly browsing through the code, I'd say:

I hope that helps and would allow you to add something similar to the Klipper version. I'm still awaiting an extra CYD for use for Klipper and haven't even looked at your code yet, so I have no idea whether it is similar to how the xtouch code is structured. If it is, then adding the same mechanism could be pretty easy.

suchmememanyskill commented 9 months ago

@Misterke Do note that for cyd-klipper, no sd card is needed. This kind of hampers my ability to do this as the firmware package is larger than all available system memory.

I could stream data directly to update the device, but then no validation will take place

N3m3515 commented 9 months ago

why not add a check if an sd card is present and if so display an ota button and use the sdcard for that?

suchmememanyskill commented 9 months ago

why not add a check if an sd card is present and if so display an ota button and use the sdcard for that?

Because i don't want to require additional hardware for any feature

N3m3515 commented 9 months ago

fair enough

dronecz commented 9 months ago

There are some projects, which are based on GitHub releases. To name a few:

Maybe something like this could be implemented and not require additional hardware.

suchmememanyskill commented 9 months ago

Ota hopefully implemented in https://github.com/suchmememanyskill/CYD-Klipper/commit/64266b1ff83683fd4f2198f9cce34f08afe4acbe

An update button will appear in the settings if there's an update. There's also a toggle for automatic updates, that will update if needed right after connecting to wifi