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
Service: http hosting binary images #19
Comments
@smadds maybe you could provide an alternative approach (using Github releases). I described it here: |
Looking at your suggestion again, @wiktorschmidt, I read it as making a secure connection to create a local copy on a trusted machine on the local network. Is this correct? |
@smadds that's a nice gesture of yours. I went ahead and included your URL in an automatic upgrade example over in the wiki: https://github.com/arendst/Sonoff-Tasmota/wiki/openHAB I'll also subscribe to this thread to stay up to date with changes. |
@smadds sorry I wasn't clear What I meant is that instead of linking to Thanks for putting it together! |
@wiktorschmidt Interesting! Regarding the openHAB solution above: I will stay with the direct link for now. JSON parsing is an easy job in openHAB but would definitely make the example less comprehensible. |
@ThomDietrich absolutely - this would have to be implemented by @smadds to make sense. Obviously parsing JSON is not a good idea on the openHAB side :) One can also look at https://github.com/carolynvs/github-release-proxy - this solves the http/https problem quite elegantly. |
At the end of the day it would probably be best if @arendst hosted an "official" build behind a static http url. |
@ThomDietrich it IS hosted by @arendst on github. The only problem is that it's only available via https |
@wiktorschmidt no, @smadds is providing a local copy. At least that's what he says in his first posting ;) |
Not sure about local, @ThomDietrich, my HTTP copies are hosted on a cloud VPS. Yes, happy for anyone to access them as a contribution to this excellent project. Oh the power of issuing an mqtt "cmnd/sonoffs/update" ! |
UPDATED 23rd Feb: NOW JUST COMPILING THE BASIC VERSION
|
Starting with version 3.9.12 there is no need to compile specifically for the ESP8285 if the image is uploaded by webpage or OTA. If the device is configured for Sonoff 4CH OR Sonoff Touch, both ESP8285, the downloaded ESP8266 firmware image is updated with the specific ESP8285 DOUT option before it gets written to the device flash during reboot. For serial uploaded images it is still MANDATORY to use the DOUT flag during compiling and uploading to ESP8285 devices. |
Do I still need to compile separate images for devices with 1M memory and ones with 4M memory? |
Well if you want to... |
Hm, @smadds, looking at your hosted link, the binary is the 3.9.16 sw, but TASMOTA is already up in 3.9.20 ... ? Cheers! |
My apologies, I was replacing the platformio script with one that compiled to more targets, and that ran in to a dependency problem when new features were added. Theo has confirmed that the other versions are no longer needed, so I have dropped this. From now the http://sonoff.maddox.co.uk/tasmota/sonoff.ino.bin is up to date (and should keep up to date!), but I have dropped all of the other versions (including the legacy version). |
No problem! I was just confused when I updated and realized that I had actually downgraded to 3.9.16 instead of upgrading ... Thanks for the service! ;) |
@smadds Upgrade article updated accordingly. Thanks! |
I have added an MQTT server to this VPS. It's pretty locked down (no publishing accepted) and has just one topic to subscribe to: If you have mosquitto-clients installed, the following should return the version I am serving: Node-red snippet for simple auto-upgrade. Fill in your destination MQTT server. Hoping this will be useful to trigger auto updates for some users. |
Hey @smadds, would you be willing to host additional builds for the available variations? |
Hi @ThomDietrich, yes - happy to. The only question is how to get them there. If Theo @arendst could add variations to his Platformio script, that would ensure the variations are updated with new releases (I now collect & host everything from the /api/arduino folder). I realise this would make the release time longer, and there could be a lot of different requests. Alternatively I could compile different versions on my server, but I don't know the compiler well enough (at the moment!) to know how to pass selective compilation directives. |
Hi. I've followed the link in the wiki and followed the build method as described by quickpi which uses atom/platformio. For the life me i cant figure out how to use it to create my own firmware.bin file. Am i right that you guys use the arduino ide to create the firmware.bin file, if so, how.? I can't use the stock firmware.bin file because my dragons stubbornly refuse to honour the poweronstate setting so i need to tinker with the code and create my own firmware.bin to update with using OTA. c.f. issue #284 I'd thought platformio should be able to do the job but at present I can only make it program my dragons using serial. Regards |
If platformio allows cross-compilation under linux then I could do it, @CommodoreWhite . I say that because the RPi does not currently cross compile, and platformio needs a host RPi board to compile on. |
Really don't understand what RaspberryPie has got to do with anything. I always do software development on Windows. Are you sure you're responding to the right message?
Regards, Confused of Suffolk
Sent from BlueMail
…On 20 Apr 2017 09:09, at 09:09, Simon ***@***.***> wrote:
If platformio allows cross-compilation under linux then I could do it,
@CommodoreWhite . I say that because the RPi does not currently cross
compile, and platformio needs a host RPi board to compile on.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#19 (comment)
|
platformio creates firmware.bin files, arduino IDE creates sonoff.ino.bin
…On Thu, 20 Apr 2017, CommodoreWhite wrote:
Really don't understand what RaspberryPie has got to do with anything. I always do software development on Windows. Are you sure you're responding to the right message?
Regards, Confused of Suffolk
Sent from BlueMail
On 20 Apr 2017 09:09, at 09:09, Simon ***@***.***> wrote:
> If platformio allows cross-compilation under linux then I could do it,
> @CommodoreWhite . I say that because the RPi does not currently cross
> compile, and platformio needs a host RPi board to compile on.
>
> --
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub:
> #19 (comment)
|
Aha! During a compile of tasmota i saw firmware.bin being created but never found it once the compile had completed so i assumed it was created as an intermediate file and then promptly deleted. Any chance you could give me a clue where platformio leaves it? Thanks.
Sent from BlueMail
…On 20 Apr 2017 09:51, at 09:51, David Lang ***@***.***> wrote:
platformio creates firmware.bin files, arduino IDE creates
sonoff.ino.bin
On Thu, 20 Apr 2017, CommodoreWhite wrote:
> Really don't understand what RaspberryPie has got to do with
anything. I always do software development on Windows. Are you sure
you're responding to the right message?
>
> Regards, Confused of Suffolk
>
> Sent from BlueMail
>
> On 20 Apr 2017 09:09, at 09:09, Simon ***@***.***>
wrote:
>> If platformio allows cross-compilation under linux then I could do
it,
>> @CommodoreWhite . I say that because the RPi does not currently
cross
>> compile, and platformio needs a host RPi board to compile on.
>>
>> --
>> You are receiving this because you were mentioned.
>> Reply to this email directly or view it on GitHub:
>>
#19 (comment)
>
>
>
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#19 (comment)
|
no idea, I haven't tried using it yet.
On Thu, 20 Apr 2017, CommodoreWhite wrote:
Aha! During a compile of tasmota i saw firmware.bin being created but never found it once the compile had completed so i assumed it was created as an intermediate file and then promptly deleted. Any chance you could give me a clue where platformio leaves it? Thanks.
k
|
No, just misread your msg, @CommodoreWhite. Thought quickpi was a variant of the RPi board. |
Ok. Quickpi is a guy who created a YouTube video showing how to compile and
upload tasmota using platformio and is recommended on the tasmota wiki.
Any clue where platformio stashes the firmware.bin file?
…On 20 Apr 2017 10:26 am, "Simon" ***@***.***> wrote:
No, just misread your msg, @CommodoreWhite
<https://github.com/CommodoreWhite>. Thought quickpi was a variant of the
RPi board.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFyj0b-CaGv7Qhm3IbaQIurVdQqf-aV0ks5rxySzgaJpZM4L2OtB>
.
|
Sorry, messages crossed in the post thanks for your timely responses anyway.
Peter
…On 20 Apr 2017 10:37 am, "Peter White" ***@***.***> wrote:
Ok. Quickpi is a guy who created a YouTube video showing how to compile
and upload tasmota using platformio and is recommended on the tasmota wiki.
Any clue where platformio stashes the firmware.bin file?
On 20 Apr 2017 10:26 am, "Simon" ***@***.***> wrote:
> No, just misread your msg, @CommodoreWhite
> <https://github.com/CommodoreWhite>. Thought quickpi was a variant of
> the RPi board.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#19 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AFyj0b-CaGv7Qhm3IbaQIurVdQqf-aV0ks5rxySzgaJpZM4L2OtB>
> .
>
|
.pioenvs/sonoff/firmware.bin |
hi Theo @arendst What do you mean by "Removed pre-compiled versions from repository as they are available within the release" in release 5.1.4 ? Are they somewhere else in Github, or do you mean that they can be compiled locally? It's a shame not to have the "vanilla" build, as I was using those to copy for distribution via http. |
They are somewhere else on Github! Look via the releases tab at the top of the page: https://github.com/arendst/Sonoff-Tasmota/releases |
Yes, I found them. Just got to figure a way of automatically copying them from there. Was much easier copying *.bin from a cloned github folder |
OK, I have updated my script to copy over the 4 releases based on the release version number. Should cope with future version changes, but won't spot any extra builds. If I'm missing one, please let me know! Apologies to anyone who tried to use the .bin versions of 5.14 over the last few hours from my server - the MQTT flag will have updated but not the binaries. Please re-flash now. |
@smadds Not sure what you are doing but you should always be able to retrieve the latest release and binaries linked to those via the github json responses. A simple example can be seen here: https://github.com/yann25/Sonoff-Tasmota_autoflash/blob/master/Sonoff-Tasmota_autoflash/tasmota_autoflash.py#L34 |
Thanks, @ThomDietrich. I've updated my bash script with the api command. Was fairly simple - although at the moment has not got the error checking your Python script has: The folder http://sonoff.maddox.co.uk/tasmota/ will now have a copy of the all assets from the latest release by the time my MQTT topic is updated. |
Wonderful. |
Wiki updated |
I appreciate this is an old thread, and the following is slightly off topic. I came across this thread while looking how to get notification about tasmota releases. FYI: I also found out you can get a RSS feed from github of the tasmota releases using: Thanks @smadds for host the binaries via http / mqtt notification mechanism. |
You're right, @nburrows72 ! Looks like my script logic is faulty and I'm comparing the release ID with the latest commit id - no matter how many times I pull the latest release they won't match after an interim update has been made. Anyone with better git & shell experience than me like to suggest a better way to compare local and remote release IDs? This is my current code:
If not I'll have a look when I get a minute... |
High @smadds |
Hi @JueBag I tried upgrading some devices to 5.13 last night and the normal OTA did not work for me either. My script copies all the release files from Github, and sonoff-minimal is definitely there (http://sonoff.maddox.co.uk/tasmota/sonoff-minimal.bin) I found I had to upload the minimal image first then do the ota to the normal sonoff.bin. I have just tried ota from 5.13 to 5.13.1 and that failed too. Theo - is there something we can change to automate this process (e.g. can we store the rom type so that minimal does not overwrite it and so a new version can be automatically fetched after the minimal has loaded?) |
I've been trying to get it wrong but I failed... Everything works as expected: Starting off with a sonoff-NL.bin active on the device:
Then changing the otaurl to the default one (sonoff.bin) which is too big to OTA in one go:
And here we are - from Dutch to English in OtaMagic style - no user intervention.
|
Same is true for upgrading from 5.12.0 to 5.13.1.
NOTE: As OtaMagic is introduced first in release 5.12.0 this only works starting from release 5.12.0 as it uses code introduced in 5.12.0. Previous versions can only be upgraded by manual OTA uploading the minimal version first before uploading the final version. |
Just checked with serial monitor and indeed it worked fine from 5.13.0 to 5.13.1. Can I suggest an update to the onscreen text? "Device will restart in a few seconds" is now a bit optimistic! Suggest something like: Device upgrade in progress. This involves uploading and installing 2 firmware updates, so please be patient - it could take 2-3 minutes. |
Did the test myself from 5.13.0 to 5.13.1, it worked! However I had to change from the (old?) filename (sonoff.ino.bin) to the new one (sonoff.bin). Was this the reason it didn't work before? Anyhow, thanks for the effort!👍 |
Change led multiple color sep from dot to space
All this information is added to the wiki at: https://github.com/arendst/Sonoff-Tasmota/wiki/Upgrade#firmware-binary-sources Thanks a lot 👍 |
UPDATED 2nd July
Now checking for new version every 10 minutes and if so copying all assets from the latest release, as listed here:
and host them in this folder:
then updating the version number on my mqtt server (see comment below)
Also copying sonoff.bin to sonoff.ino.bin for backward compatibility.
UPDATED 6th April
Now copying everything (*) from /api/arduino folder to hosted area. Currently this adds http://sonoff.maddox.co.uk/tasmota/sonoff-minimal.ino.bin, in case anyone is doing 2-stage uploads.UPDATED 23rd Feb
Not sure if this is useful for anyone, but I am hosting the binary image on an http server to allow Sonoffs to update via URL (Github insists on https which is beyond the standard configuration of firmware).
Every 10 minutes I check for a new version, and if so pull the update and compile to the following URL:
> http://sonoff.maddox.co.uk/tasmota/sonoff.ino.binEvery hour, on the hour I get the latest binary from> https://github.com/arendst/Sonoff-Tasmota/raw/master/api/arduino/sonoff.ino.binand host it at> http://sonoff.maddox.co.uk/tasmota/sonoff.ino.binI was wary of doing this with the old version of the software, due to the number of tweaks needed in the config file before compiling. Still, if you want the raw mqtt-ota version from> https://github.com/arendst/Sonoff-MQTT-OTA-Arduino/raw/master/api/arduino/sonoff.ino.binit's also available at> http://sonoff.maddox.co.uk/mqtt-ota/sonoff.ino.binThe text was updated successfully, but these errors were encountered: