Skip to content
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

Closed
smadds opened this issue Feb 3, 2017 · 48 comments
Closed

Service: http hosting binary images #19

smadds opened this issue Feb 3, 2017 · 48 comments
Labels
enhancement Type - Enhancement that will be worked on

Comments

@smadds
Copy link

smadds commented Feb 3, 2017

UPDATED 2nd July
Now checking for new version every 10 minutes and if so copying all assets from the latest release, as listed here:

https://github.com/arendst/Sonoff-Tasmota/releases/latest

and host them in this folder:

http://sonoff.maddox.co.uk/tasmota/

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.bin

Every hour, on the hour I get the latest binary from
> https://github.com/arendst/Sonoff-Tasmota/raw/master/api/arduino/sonoff.ino.bin
and host it at
> http://sonoff.maddox.co.uk/tasmota/sonoff.ino.bin

I 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.bin
it's also available at
> http://sonoff.maddox.co.uk/mqtt-ota/sonoff.ino.bin

@arendst arendst added the enhancement Type - Enhancement that will be worked on label Feb 3, 2017
@wiktorschmidt
Copy link

@smadds maybe you could provide an alternative approach (using Github releases). I described it here:
arendst/Sonoff-MQTT-OTA-Arduino#260

@smadds
Copy link
Author

smadds commented Feb 4, 2017

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?

@ThomDietrich
Copy link
Contributor

@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 hope that is fine with you. Thanks!

I'll also subscribe to this thread to stay up to date with changes.

@wiktorschmidt
Copy link

@smadds sorry I wasn't clear

What I meant is that instead of linking to
https://github.com/arendst/Sonoff-Tasmota/raw/master/api/arduino/sonoff.ino.bin
you can link to the automatically compiled (via TravisCI) firmware.bin file that can be found here:
https://github.com/arendst/Sonoff-Tasmota/releases/latest
is a little bit more tricky as there is no "direct link" to the bin file - you need to extract it from JSON via github API: https://api.github.com/repos/arendst/Sonoff-Tasmota/releases/latest it's assets[0].browser_download_url

Thanks for putting it together!

@ThomDietrich
Copy link
Contributor

ThomDietrich commented Feb 5, 2017

@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.

@wiktorschmidt
Copy link

@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.

@ThomDietrich
Copy link
Contributor

ThomDietrich commented Feb 5, 2017

At the end of the day it would probably be best if @arendst hosted an "official" build behind a static http url.

@wiktorschmidt
Copy link

@ThomDietrich it IS hosted by @arendst on github. The only problem is that it's only available via https

@ThomDietrich
Copy link
Contributor

@wiktorschmidt no, @smadds is providing a local copy. At least that's what he says in his first posting ;)

@smadds
Copy link
Author

smadds commented Feb 5, 2017

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" !

@smadds
Copy link
Author

smadds commented Feb 11, 2017

UPDATED 23rd Feb:

NOW JUST COMPILING THE BASIC VERSION

Just to say that I have extended the number of .bin files available by using platformio on the server to locally compile the Tasmota branch for different boards. The script now looks every 10 minutes for a change in version number and recompiles the targets if required.

I have added nodemcu and ESP8285 (sonoff touch etc.) to the standard sonoff versions. The URLS are:-

If anyone needs another target that platformio is capable of compiling on Linux then let me know. (RPi is NOT currently available as it needs compiling on an RPi)

The old branch is still being copied from the github repository hourly as before.

@arendst
Copy link
Owner

arendst commented Feb 11, 2017

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.

@jaysuk
Copy link

jaysuk commented Feb 11, 2017

Do I still need to compile separate images for devices with 1M memory and ones with 4M memory?

@arendst
Copy link
Owner

arendst commented Feb 11, 2017

Well if you want to...
I use 1M images on all my sonoff related hardware so also on ESP12Es, Wemos and the Pow which has 4M too.

@ecsfang
Copy link

ecsfang commented Feb 22, 2017

Hm, @smadds, looking at your hosted link, the binary is the 3.9.16 sw, but TASMOTA is already up in 3.9.20 ... ?
Has your script stopped running?

Cheers!
Thomas

@smadds
Copy link
Author

smadds commented Feb 23, 2017

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).

@ecsfang
Copy link

ecsfang commented Feb 23, 2017

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! ;)

@ThomDietrich
Copy link
Contributor

@smadds Upgrade article updated accordingly. Thanks!
https://github.com/arendst/Sonoff-Tasmota/wiki/Upgrade

@smadds
Copy link
Author

smadds commented Feb 27, 2017

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: sonoff-version. The URL is sonoff.maddox.co.uk using the standard port 1883 with no authentication needed.

If you have mosquitto-clients installed, the following should return the version I am serving:
mosquitto_sub -h sonoff.maddox.co.uk -t 'sonoff-version'

Node-red snippet for simple auto-upgrade. Fill in your destination MQTT server.
[{"id":"b98cc023.961a1","type":"mqtt in","z":"c7b98f5c.062d2","name":"","topic":"sonoff-version","qos":"2","broker":"8edbb6bf.360598","x":220,"y":100,"wires":[["d2472e07.9e253","4c06ac4a.c78644"]]},{"id":"d2472e07.9e253","type":"debug","z":"c7b98f5c.062d2","name":"","active":true,"console":"false","complete":"false","x":410,"y":60,"wires":[]},{"id":"b7f1c70e.9d6888","type":"mqtt out","z":"c7b98f5c.062d2","name":"","topic":"sonoffs/upgrade","qos":"","retain":"","broker":"","x":600,"y":100,"wires":[]},{"id":"4c06ac4a.c78644","type":"change","z":"c7b98f5c.062d2","name":"Payload=1","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":100,"wires":[["b7f1c70e.9d6888"]]},{"id":"8edbb6bf.360598","type":"mqtt-broker","z":"","broker":"sonoff.maddox.co.uk","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

Hoping this will be useful to trigger auto updates for some users.

@ThomDietrich
Copy link
Contributor

Hey @smadds, would you be willing to host additional builds for the available variations?
I've deployed a Sonoff Basic with multiple DS18B20, which needs a firmware with the USE_DS18x20 directive enabled.

@smadds
Copy link
Author

smadds commented Apr 6, 2017

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.

@CommodoreWhite
Copy link

CommodoreWhite commented Apr 20, 2017

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

@smadds
Copy link
Author

smadds commented Apr 20, 2017

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.

@CommodoreWhite
Copy link

CommodoreWhite commented Apr 20, 2017 via email

@davidelang
Copy link
Collaborator

davidelang commented Apr 20, 2017 via email

@CommodoreWhite
Copy link

CommodoreWhite commented Apr 20, 2017 via email

@davidelang
Copy link
Collaborator

davidelang commented Apr 20, 2017 via email

@smadds
Copy link
Author

smadds commented Apr 20, 2017

No, just misread your msg, @CommodoreWhite. Thought quickpi was a variant of the RPi board.

@CommodoreWhite
Copy link

CommodoreWhite commented Apr 20, 2017 via email

@CommodoreWhite
Copy link

CommodoreWhite commented Apr 20, 2017 via email

@smadds
Copy link
Author

smadds commented Apr 20, 2017

.pioenvs/sonoff/firmware.bin

@smadds
Copy link
Author

smadds commented Jun 2, 2017

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.

@arendst
Copy link
Owner

arendst commented Jun 2, 2017

They are somewhere else on Github!

Look via the releases tab at the top of the page: https://github.com/arendst/Sonoff-Tasmota/releases

@smadds
Copy link
Author

smadds commented Jun 2, 2017

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

@smadds
Copy link
Author

smadds commented Jun 2, 2017

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.

@ThomDietrich
Copy link
Contributor

ThomDietrich commented Jun 2, 2017

@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
You can probably modify this script to serve your needs and have it executed regularly.

@smadds
Copy link
Author

smadds commented Jun 2, 2017

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:
curl 'https://api.github.com/repos/arendst/Sonoff-Tasmota/releases' | jq -r '.[0] .assets[] .browser_download_url' | xargs wget -N

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.

@ThomDietrich
Copy link
Contributor

Wonderful.
Btw. I've kept the wiki in sync with the important links from this thread. Would you like to continue doing so? https://github.com/arendst/Sonoff-Tasmota/wiki/Upgrade

@smadds
Copy link
Author

smadds commented Jun 2, 2017

Wiki updated

@nburrows72
Copy link

I appreciate this is an old thread, and the following is slightly off topic.
As this is just an observation, didn't want to raise a new issue.

I came across this thread while looking how to get notification about tasmota releases.
I subscribed via MQTT to sonoff.maddox.co.uk/sonoff-version, but this is sending out the current version every 5 minutes. (Checked via MQTT-spy).

FYI: I also found out you can get a RSS feed from github of the tasmota releases using:
https://github.com/arendst/Sonoff-Tasmota/releases.atom

Thanks @smadds for host the binaries via http / mqtt notification mechanism.

@smadds
Copy link
Author

smadds commented Feb 28, 2018

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:

cd /git-source-location
echo $(date)
git remote update
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]
then    echo "Updating now..."
       echo "From version:" $latestTag
       cd /binaries-location
       curl 'https://api.github.com/repos/arendst/Sonoff-Tasmota/releases' | j$
       cp sonoff.bin sonoff.ino.bin -f
       mosquitto_pub -t "sonoff-version" -m $latestTag -r -u xxxxxxxxxxx -P xxxxxxxxxx
       echo "Updated"
       echo "New version:" $latestTag
else
       echo "Already up to date - " $latestTag
fi

If not I'll have a look when I get a minute...

@JueBag
Copy link

JueBag commented May 1, 2018

High @smadds
I did use the Tasmota. bin file provided by your server for updating my Sonoff devices in an OPENHAB installation. Thanks for that.
The change to 5.13 however does not work automatically, although it should. The incooperated OtaMagic (needed now because of the increased size) needs the minimal image for the two step process. My guess is that this file is missing on your server, but as said only a personell guess!
Is there a chance to check that and place the minimal image on the server as well?
If needed I could test the process from here.

@smadds
Copy link
Author

smadds commented May 1, 2018

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?)

@arendst
Copy link
Owner

arendst commented May 2, 2018

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:

00:00:00 Project sonoff Wemos4 (Topic wemos4, Fallback DVES_83BB10, GroupTopic sonoffs) Versie 5.13.1-2_4_0
00:00:00 CFG: Opgeslagen in flash op FA, Aantal 23, Bytes 2560
00:00:00 WIF: Verbinden...
00:00:00 WIF: Verbinden met AP2 indebuurt2 in stand 11N als wemos4...
00:00:01 WIF: Verbinden...
00:00:02 WIF: Verbinden...
00:00:03 WIF: Verbinden...
00:00:04 WIF: Verbonden
00:00:04 DNS: Geinitialiseerd
00:00:04 HTP: Webserver actief op wemos4.local met IP adres 192.168.2.223
00:00:05 MQT: Verbinden...
00:00:06 MQT: Verbonden
00:00:06 MQT: tele/wemos4/LWT = Online (retained)
00:00:06 MQT: cmnd/wemos4/POWER = 
00:00:06 MQT: Abonneer op cmnd/wemos4/#
00:00:06 MQT: Abonneer op cmnd/sonoffs/#
00:00:06 MQT: Abonneer op cmnd/DVES_83BB10/#
00:00:06 MQT: tele/wemos4/INFO1 = {"Module":"Sonoff Basic","Version":"5.13.1","FallbackTopic":"DVES_83BB10","GroupTopic":"sonoffs"}
00:00:06 MQT: tele/wemos4/INFO2 = {"WebServerMode":"Admin","Hostname":"wemos4","IPAddress":"192.168.2.223"}
00:00:06 MQT: tele/wemos4/INFO3 = {"RestartReason":"Software/System restart"}
00:00:06 APP: (UTC) Wed May 02 07:11:34 2018, (ZT) Sun Mar 25 02:00:00 2018, (WT) Sun Oct 28 03:00:00 2018
09:11:35 MQT: stat/wemos4/RESULT = {"POWER":"OFF"}
09:11:35 MQT: stat/wemos4/POWER = OFF
09:11:42 MQT: tele/wemos4/STATE = {"Time":"2018-05-02T09:11:42","Uptime":"0T00:00:14","Vcc":2.973,"POWER":"OFF","Wifi":{"AP":2,"SSId":"indebuurt2","RSSI":88,"APMac":"00:22:6B:FE:8E:20"}}

Then changing the otaurl to the default one (sonoff.bin) which is too big to OTA in one go:

otaurl http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:12:10 CMD: otaurl http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:12:10 RSL: Groep 0, Index 1, Opdracht OTAURL, Data http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:12:10 MQT: stat/wemos4/RESULT = {"OtaUrl":"http://sonoff.maddox.co.uk/tasmota/sonoff.bin"}
09:12:10 CFG: Opgeslagen in flash op F9, Aantal 24, Bytes 2560
upgrade 1
09:12:17 CMD: upgrade 1
09:12:17 RSL: Groep 0, Index 1, Opdracht UPGRADE, Data 1
09:12:17 MQT: stat/wemos4/RESULT = {"Upgrade":"Version 5.13.1 from http://sonoff.maddox.co.uk/tasmota/sonoff.bin"}
09:12:18 CFG: Opgeslagen in flash op FB, Aantal 25, Bytes 2560
09:12:20 HTP: Webserver gestopt
09:12:20 UPL: http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:12:21 HTP: Webserver actief op wemos4.local met IP adres 192.168.2.223
09:12:22 HTP: Webserver gestopt
09:12:22 UPL: http://sonoff.maddox.co.uk/tasmota/sonoff-minimal.bin
09:12:43 HTP: Webserver actief op wemos4.local met IP adres 192.168.2.223
09:12:43 MQT: Verbinden...
09:12:43 MQT: Verbonden
09:12:43 MQT: tele/wemos4/LWT = Online (retained)
09:12:43 MQT: cmnd/wemos4/POWER = 
09:12:43 MQT: Abonneer op cmnd/wemos4/#
09:12:43 MQT: Abonneer op cmnd/sonoffs/#
09:12:43 MQT: Abonneer op cmnd/DVES_83BB10/#
09:12:45 MQT: stat/wemos4/UPGRADE = Successful. Restarting
09:12:46 APP: Herstarten

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
@cp:0
ld

00:00:00 APP: Boot Count 10
00:00:00 Project sonoff Wemos4 (Topic wemos4, Fallback DVES_83BB10, GroupTopic sonoffs) Version 5.13.1-minimal-2_4_0
00:00:00 WARNING This version does not support persistent settings
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP2 indebuurt2 in mode 11N as wemos4...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Attempting connection...
00:00:05 WIF: Attempting connection...
00:00:06 WIF: Connected
00:00:06 HTP: Web server active on wemos4 with IP address 192.168.2.223
00:00:07 APP: (UTC) Wed May 02 07:13:04 2018, (DST) Sun Mar 25 02:00:00 2018, (STD) Sun Oct 28 03:00:00 2018
09:13:05 MQT: Attempting connection...
09:13:05 MQT: Connected
09:13:05 MQT: tele/wemos4/LWT = Online (retained)
09:13:05 MQT: cmnd/wemos4/POWER = 
09:13:05 MQT: Subscribe to cmnd/wemos4/#
09:13:05 MQT: Subscribe to cmnd/sonoffs/#
09:13:05 MQT: Subscribe to cmnd/DVES_83BB10/#
09:13:05 MQT: tele/wemos4/INFO1 = {"Module":"Sonoff Basic","Version":"5.13.1-minimal","FallbackTopic":"DVES_83BB10","GroupTopic":"sonoffs"}
09:13:05 MQT: tele/wemos4/INFO2 = {"WebServerMode":"Admin","Hostname":"wemos4","IPAddress":"192.168.2.223"}
09:13:05 MQT: tele/wemos4/INFO3 = {"RestartReason":"Software/System restart"}
09:13:06 MQT: stat/wemos4/RESULT = {"POWER":"OFF"}
09:13:06 MQT: stat/wemos4/POWER = OFF
09:13:06 HTP: Web server stopped
09:13:06 UPL: http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:13:32 HTP: Web server active on wemos4 with IP address 192.168.2.223
09:13:33 MQT: Attempting connection...
09:13:33 MQT: Connected
09:13:33 MQT: tele/wemos4/LWT = Online (retained)
09:13:33 MQT: cmnd/wemos4/POWER = 
09:13:33 MQT: Subscribe to cmnd/wemos4/#
09:13:33 MQT: Subscribe to cmnd/sonoffs/#
09:13:33 MQT: Subscribe to cmnd/DVES_83BB10/#
09:13:34 MQT: stat/wemos4/UPGRADE = Successful. Restarting
09:13:35 APP: Restarting

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
@cp:0
ld

00:00:00 APP: Boot Count 10
00:00:00 Project sonoff Wemos4 (Topic wemos4, Fallback DVES_83BB10, GroupTopic sonoffs) Version 5.13.1-2_4_0
00:00:00 CFG: Saved to flash at FA, Count 26, Bytes 2560
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP2 indebuurt2 in mode 11N as wemos4...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Connected
00:00:04 DNS: Initialized
00:00:04 HTP: Web server active on wemos4.local with IP address 192.168.2.223
00:00:05 MQT: Attempting connection...
00:00:06 MQT: Connected
00:00:06 MQT: tele/wemos4/LWT = Online (retained)
00:00:06 MQT: cmnd/wemos4/POWER = 
00:00:06 MQT: Subscribe to cmnd/wemos4/#
00:00:06 MQT: Subscribe to cmnd/sonoffs/#
00:00:06 MQT: Subscribe to cmnd/DVES_83BB10/#
00:00:06 MQT: tele/wemos4/INFO1 = {"Module":"Sonoff Basic","Version":"5.13.1","FallbackTopic":"DVES_83BB10","GroupTopic":"sonoffs"}
00:00:06 MQT: tele/wemos4/INFO2 = {"WebServerMode":"Admin","Hostname":"wemos4","IPAddress":"192.168.2.223"}
00:00:06 MQT: tele/wemos4/INFO3 = {"RestartReason":"Software/System restart"}
00:00:07 MQT: stat/wemos4/RESULT = {"POWER":"OFF"}
00:00:07 MQT: stat/wemos4/POWER = OFF
00:00:14 MQT: tele/wemos4/STATE = {"Time":"1970-01-01T00:00:14","Uptime":"0T00:00:14","Vcc":2.973,"POWER":"OFF","Wifi":{"AP":2,"SSId":"indebuurt2","RSSI":90,"APMac":"00:22:6B:FE:8E:20"}}
00:00:15 APP: (UTC) Wed May 02 07:14:03 2018, (DST) Sun Mar 25 02:00:00 2018, (STD) Sun Oct 28 03:00:00 2018

And here we are - from Dutch to English in OtaMagic style - no user intervention.

status 2
09:15:04 CMD: status 2
09:15:04 RSL: Group 0, Index 1, Command STATUS, Data 2
09:15:04 MQT: stat/wemos4/STATUS2 = {"StatusFWR":{"Version":"5.13.1","BuildDateTime":"2018-05-01T20:59:22","Boot":31,"Core":"2_4_0","SDK":"2.1.0(deb1901)"}}

@arendst
Copy link
Owner

arendst commented May 2, 2018

Same is true for upgrading from 5.12.0 to 5.13.1.

00:00:00 Project sonoff Wemos4 (Topic wemos4, Fallback DVES_83BB10, GroupTopic sonoffs) Version 5.12.0
00:00:00 CFG: Saved to flash at FA, Count 39, Bytes 1648
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Patch issue 2186
00:00:00 WIF: Connecting to AP2 indebuurt2 in mode 11N as wemos4...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Connected
00:00:04 DNS: Initialized
00:00:04 HTP: Web server active on wemos4.local with IP address 192.168.2.223
00:00:06 APP: (UTC) Wed May 02 07:47:29 2018, (DST) Sun Mar 25 02:00:00 2018, (STD) Sun Oct 28 03:00:00 2018
09:47:30 MQT: Attempting connection...
09:47:30 MQT: Connected
09:47:30 MQT: tele/wemos4/LWT = Online (retained)
09:47:30 MQT: cmnd/wemos4/POWER = 
09:47:30 MQT: Subscribe to cmnd/wemos4/#
09:47:30 MQT: Subscribe to cmnd/sonoffs/#
09:47:30 MQT: Subscribe to cmnd/DVES_83BB10/#
09:47:30 MQT: tele/wemos4/INFO1 = {"Module":"Sonoff Basic","Version":"5.12.0","FallbackTopic":"DVES_83BB10","GroupTopic":"sonoffs"}
09:47:30 MQT: tele/wemos4/INFO2 = {"WebServerMode":"Admin","Hostname":"wemos4","IPAddress":"192.168.2.223"}
09:47:30 MQT: tele/wemos4/INFO3 = {"RestartReason":"Software/System restart"}
09:47:30 MQT: homeassistant/switch/wemos4/config =  (retained)
09:47:31 MQT: stat/wemos4/RESULT = {"POWER":"OFF"}
09:47:31 MQT: stat/wemos4/POWER = OFF
09:47:38 MQT: tele/wemos4/STATE = {"Time":"2018-05-02T09:47:38","Uptime":"0T00:00:15","Vcc":2.726,"POWER":"OFF","Wifi":{"AP":2,"SSId":"indebuurt2","RSSI":92,"APMac":"00:22:6B:FE:8E:20"}}
09:47:45 HTP: Main Menu
09:47:54 HTP: Firmware Upgrade
status 4
09:48:04 CMD: status 4
09:48:04 RSL: Group 0, Index 1, Command STATUS, Data 4
09:48:04 MQT: stat/wemos4/STATUS4 = {"StatusMEM":{"ProgramSize":487,"Free":516,"Heap":22,"ProgramFlashSize":1024,"FlashSize":4096,"FlashMode":3}}
09:48:10 HTP: Upgrade started
09:48:10 RSL: Group 0, Index 1, Command OTAURL, Data http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:48:10 MQT: stat/wemos4/RESULT = {"OtaUrl":"http://sonoff.maddox.co.uk/tasmota/sonoff.bin"}
09:48:10 RSL: Group 0, Index 1, Command UPGRADE, Data 1
09:48:10 MQT: stat/wemos4/RESULT = {"Upgrade":"Version 5.12.0 from http://sonoff.maddox.co.uk/tasmota/sonoff.bin"}
09:48:10 CFG: Saved to flash at FB, Count 40, Bytes 1648
09:48:13 HTP: Web server stopped
09:48:13 UPL: http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:48:13 HTP: Web server active on wemos4.local with IP address 192.168.2.223
09:48:15 HTP: Web server stopped
09:48:15 UPL: http://sonoff.maddox.co.uk/tasmota/sonoff-minimal.bin
09:48:37 HTP: Web server active on wemos4.local with IP address 192.168.2.223
09:48:38 MQT: Attempting connection...
09:48:38 MQT: Connected
09:48:38 MQT: tele/wemos4/LWT = Online (retained)
09:48:38 MQT: cmnd/wemos4/POWER = 
09:48:38 MQT: Subscribe to cmnd/wemos4/#
09:48:38 MQT: Subscribe to cmnd/sonoffs/#
09:48:38 MQT: Subscribe to cmnd/DVES_83BB10/#
09:48:39 MQT: stat/wemos4/UPGRADE = Successful. Restarting
09:48:40 APP: Restarting

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vc9f0c112
@cp:0
ld

00:00:00 APP: Boot Count 15
00:00:00 Project sonoff Wemos4 (Topic wemos4, Fallback DVES_83BB10, GroupTopic sonoffs) Version 5.13.1-minimal-2_4_0
00:00:00 WARNING This version does not support persistent settings
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP2 indebuurt2 in mode 11N as wemos4...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Connected
00:00:04 HTP: Web server active on wemos4 with IP address 192.168.2.223
00:00:05 MQT: Attempting connection...
00:00:06 MQT: Connected
00:00:06 MQT: tele/wemos4/LWT = Online (retained)
00:00:06 MQT: cmnd/wemos4/POWER = 
00:00:06 MQT: Subscribe to cmnd/wemos4/#
00:00:06 MQT: Subscribe to cmnd/sonoffs/#
00:00:06 MQT: Subscribe to cmnd/DVES_83BB10/#
00:00:06 MQT: tele/wemos4/INFO1 = {"Module":"Sonoff Basic","Version":"5.13.1-minimal","FallbackTopic":"DVES_83BB10","GroupTopic":"sonoffs"}
00:00:06 MQT: tele/wemos4/INFO2 = {"WebServerMode":"Admin","Hostname":"wemos4","IPAddress":"192.168.2.223"}
00:00:06 MQT: tele/wemos4/INFO3 = {"RestartReason":"Software/System restart"}
00:00:06 APP: (UTC) Wed May 02 07:48:57 2018, (DST) Sun Mar 25 02:00:00 2018, (STD) Sun Oct 28 03:00:00 2018
09:48:58 MQT: stat/wemos4/RESULT = {"POWER":"OFF"}
09:48:58 MQT: stat/wemos4/POWER = OFF
09:48:58 HTP: Web server stopped
09:48:58 UPL: http://sonoff.maddox.co.uk/tasmota/sonoff.bin
09:49:27 HTP: Web server active on wemos4 with IP address 192.168.2.223
09:49:27 MQT: Attempting connection...
09:49:27 MQT: Connected
09:49:27 MQT: tele/wemos4/LWT = Online (retained)
09:49:27 MQT: cmnd/wemos4/POWER = 
09:49:27 MQT: Subscribe to cmnd/wemos4/#
09:49:27 MQT: Subscribe to cmnd/sonoffs/#
09:49:27 MQT: Subscribe to cmnd/DVES_83BB10/#
09:49:29 MQT: stat/wemos4/UPGRADE = Successful. Restarting
09:49:30 APP: Restarting

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
@cp:0
ld

00:00:00 APP: Boot Count 15
00:00:00 Project sonoff Wemos4 (Topic wemos4, Fallback DVES_83BB10, GroupTopic sonoffs) Version 5.13.1-2_4_0
00:00:00 CFG: Saved to flash at FA, Count 42, Bytes 2560
00:00:00 WIF: Attempting connection...
00:00:00 WIF: Connecting to AP2 indebuurt2 in mode 11N as wemos4...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Connected
00:00:04 DNS: Initialized
00:00:04 HTP: Web server active on wemos4.local with IP address 192.168.2.223
00:00:06 MQT: Attempting connection...
00:00:06 MQT: Connected
00:00:06 MQT: tele/wemos4/LWT = Online (retained)
00:00:06 MQT: cmnd/wemos4/POWER = 
00:00:06 MQT: Subscribe to cmnd/wemos4/#
00:00:06 MQT: Subscribe to cmnd/sonoffs/#
00:00:06 MQT: Subscribe to cmnd/DVES_83BB10/#
00:00:06 MQT: tele/wemos4/INFO1 = {"Module":"Sonoff Basic","Version":"5.13.1","FallbackTopic":"DVES_83BB10","GroupTopic":"sonoffs"}
00:00:06 MQT: tele/wemos4/INFO2 = {"WebServerMode":"Admin","Hostname":"wemos4","IPAddress":"192.168.2.223"}
00:00:06 MQT: tele/wemos4/INFO3 = {"RestartReason":"Software/System restart"}
00:00:07 MQT: stat/wemos4/RESULT = {"POWER":"OFF"}
00:00:07 MQT: stat/wemos4/POWER = OFF
00:00:14 MQT: tele/wemos4/STATE = {"Time":"1970-01-01T00:00:14","Uptime":"0T00:00:14","Vcc":2.973,"POWER":"OFF","Wifi":{"AP":2,"SSId":"indebuurt2","RSSI":90,"APMac":"00:22:6B:FE:8E:20"}}
00:00:28 MQT: Attempting connection...
00:00:28 MQT: Connected
00:00:28 MQT: tele/wemos4/LWT = Online (retained)
00:00:28 MQT: cmnd/wemos4/POWER = 
00:00:28 MQT: Subscribe to cmnd/wemos4/#
00:00:28 MQT: Subscribe to cmnd/sonoffs/#
00:00:28 MQT: Subscribe to cmnd/DVES_83BB10/#
00:01:03 APP: (UTC) Wed May 02 07:50:45 2018, (DST) Sun Mar 25 02:00:00 2018, (STD) Sun Oct 28 03:00:00 2018

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.

@smadds
Copy link
Author

smadds commented May 2, 2018

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.

@JueBag
Copy link

JueBag commented May 2, 2018

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!👍

ascillato added a commit that referenced this issue Jun 5, 2018
Change led multiple color sep from dot to space
@ascillato2
Copy link
Collaborator

All this information is added to the wiki at:

https://github.com/arendst/Sonoff-Tasmota/wiki/Upgrade#firmware-binary-sources

Thanks a lot 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on
Projects
None yet
Development

No branches or pull requests