-
Notifications
You must be signed in to change notification settings - Fork 307
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
Added OTA checksum verification #189
Conversation
I would not unsubscribe from |
Thanks for your feedback. Staying subscribed is actually what I was preferring when I was poking around in the code. I only left dynamic subscribe/unsubscribe in because that's what you had chosen for BTW, the delay in my little test script is just for me to be able to observe what's going on looking at two terminals. I don't think the delay is needed. A real implementation would obviously evaluate Homie's status responses. |
Well we chose this because the payload was retained, so to receive it we had to subscribe only when receiving the Great! LGTM 👍 |
Unzipped files in SPIFFS, Streams, PROGMEM strings, callback/chunked responses may have template placeholders like %TEMPLATE_VAR% inside. If callback is specified in Async...Response constructor call, it will be used to replace these with actual strings. The prototype of callback is String(const String&), i.e. it gets variable name and returns its value. Template variables' delimiter is currently percent sign ('%'). Maximal placeholder length is 32 chars (chosen somewhat arbitrarily, it may be stored on stack during processing). It is not guaranteed that placeholders longer than that will be processed. Signed-off-by: Alexandr Zarubkin <me21@yandex.ru> # Conflicts: # src/WebResponses.cpp
…, updates documentation. (homieiot#213) * Removed unnecessary memmove from chunked response generation. * Added simple template processor to AsyncFileResponse. Unzipped files in SPIFFS, Streams, PROGMEM strings, callback/chunked responses may have template placeholders like %TEMPLATE_VAR% inside. If callback is specified in Async...Response constructor call, it will be used to replace these with actual strings. The prototype of callback is String(const String&), i.e. it gets variable name and returns its value. Template variables' delimiter is currently percent sign ('%'). Maximal placeholder length is 32 chars (chosen somewhat arbitrarily, it may be stored on stack during processing). It is not guaranteed that placeholders longer than that will be processed. Signed-off-by: Alexandr Zarubkin <me21@yandex.ru>
See #172
Here is a little test script for triggering OTA updates with a checksum: