ota: detect Tasmota magic numbers when booting #2370
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some magic to allow seamless Tasmota OTA upgrades
ref.
SetOption78 1
https://tasmota.github.io/docs/Commands/#setoptions
The original idea from Esphome:
https://github.com/esphome/esphome/blob/0e59243b83913fc724d0229514a84b6ea14717cc/esphome/core/esphal.cpp#L275-L287
Does not seem to be working atm. Will need to re-check with the esphome builder, c/p did not work and I tried building with gcc-10
Specific things we want to do is to have 'version' byte between 2 'marker' bytes:
https://github.com/arendst/Tasmota/blob/217addc2bb2cf46e7633c93e87954b245cb96556/tasmota/settings.ino#L218-L262 https://github.com/arendst/Tasmota/blob/0dfa38df89c8f2a1e582d53d79243881645be0b8/tasmota/i18n.h#L780-L782
Hopefully settings reset helps reliably and does not break things, since I crash 99% of the time after doing:
And OTA'ing the binary. Right after softAP is brought up, everything halts and device resets after some time
(might be interesting to check with the esp8266/Arduino#7010, since this is a pretty reliable source of WDTs...)