HI i have an update on my progress:
commenting out the following libraries:
//#include <TimeLib.h>
//#include <WidgetRTC.h>
//#include <Wire.h>```
helped and everything works
i cannot see the reason for that though
HI i have an update on my progress:
commenting out the following libraries:
//#include <TimeLib.h>
//#include <WidgetRTC.h>
//#include <Wire.h>```
helped and everything works
i cannot see the reason for that though
As you have found the update doesnât need to be in setup() or loop().
We have used all the libraries you refer to at some point and still done http updates but not necessarily https updates.
In our current project that works with https we donât have any of the 4 libraries you refer to but we do have a header associated with time.
You could perhaps now try to identify if it is one of the particular libraries that is a problem by commenting out each in turn. You should also check the free heap on an ongoing basis to see if it simply too small by the time you try the https update.
Hi Costas and @Oleg_Pugach
I have been following this thread with interest.
I have also been reviewing the following: https://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html
âŚwhich shows how you can add a PHP script so you can do a smart check periodically and automatically push an update when an updated file is available.
PersonallyI am having a little trouble getting to work but wondering if you guys have ?
@mars are you using http or https?
We use a fairly simple version control and âtimer loopâ system, all in the sketch to push our updates, so PHP scripts are not required.
I see - but if you use a timer loop it would mean you updated every timer is activated - assuming of course there is a file there to be updated and if not it would simply not update at all. I assume that is how you manage it.
I am using http for now - then I will graduate to https
@mars our updates are achieved in 2 ways (a Blynk button and with the timer loop).
Timer loop duration can be every few seconds or once a year, whatever suits your needs.
There are always files on the server and we never remove them but our âcleverâ bit of version control coding ensures it will only flash an update when there is an actual update available i.e. if we set the timer at 20 seconds it wouldnât keep flashing the same firmware over and over again.
It just takes a bit of string manipulation in the sketch.
I have my devices check for firmware updates every night.
When they reboot (which they do after installing an update) they send me a Pushover message with their MAC address and firmware compile date/time. That way I know that theyâve successfully picked-up the new firmware and I can delete/rename the old file.
I use a free webserver from www.hostinger.co.uk and organise the updates in folders that are specific to the MAC address of the device Iâm updating. For example:
/public_html/A0-B1-C2-D3-E4-F5/update.bin
There are obviously more elegant ways of doing it, but i find that this works well for devices that arenât under my direct control and I know 100% that a device is running and has the latest firmware without the user having to get involved at all.
Pete.
@PeteKnight nice touch with the Push messages and MAC but we have thousands of devices connected (I wish) hence the version control that negates the need to delete / rename any files.
nice method !
can I ask how do you read the firmware compile date/time and check ?
If you could share that code snippet it would be a great learning item.
regards
mars000
Iâm not able to check the firmware compile date/time of the HTTP OTA update before applying it, I just build a string with currently installed firmware compile date/time and send it to myself , along with the device MAC address, using a Pushover message each time the device boots. I find its handy to know when a device has rebooted for some reason, whether thatâs because its just installed an OTA update or for some other reason.
I use the built-in ISO C/C++ special macros of __ DATE __ and __ TIME __
http://forum.arduino.cc/index.php?topic=158014.0
If Iâve deployed an HTTP update for a device then the Pushover message acts as confirmation that it successfully picked-up and installed the update and as a reminder to me to manually go and delete/rename the update.
Pete.
Hey,
What if the GitHub repository where the file has been uploaded is a private repository?
How shall we access the file through URL in ESPHTTP Code in that case?
How did you get this â21 99 13 84 63 72 17 13 B9 ED 0E 8F 00 A5 9B 73 0D D0 56 58â fingerprint?
Thanks for your help.
If you read this topic then itâs explainedâŚ
Pete.