Disclaimer

Please, proceed carefully following the tips published in this blog, specially when Main Power is involved. I'm not responsible for any damages caused by what is written in this blog.
Thank you
Showing posts with label Theo Arends. Show all posts
Showing posts with label Theo Arends. Show all posts

Wednesday, 30 August 2017

Home Automation System - SONOFF Tasmota firmware upgrade using OTA




It's been a while since the first TASMOTA firmware upload and several updates have already come out.

Let's see the TASMOTA releases page

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

You can see that the latest version is 5.6.1 and I uploaded on my SONOFF 5.3.0 version, as you can see on the "information" page on the web console of the SONOFF


So, it's time to perform an upgrade.

Don't worry, I don't need to open,it, unplug from the main power, solder serial contacts and connect it to the PC...after the first installation of TASMOTA, I'm able to upgrade the firmware on the fly, using OTA (Over The Air)procedure; I have to tell it where it can download the new firmware and the game is over. Very comfortable functionality!!!

So, I followed the official wiki:

https://github.com/arendst/Sonoff-Tasmota/wiki/Upgrade#upgrading-via-ota

I chose the automatic download choice, so I have no need to download the new firmware and upload it to the device. I must only put the firmware url in a property of the SONOFF and start upgrade it. All these operations can be done directly from the console or through MQTT messages.

There is only one thing to check: the firmware size, because you can go out of memory if it's too big. There is a workaround for this: you can upload a minimal firmware and then the complete one.

Just a couple of notes:

- sometimes this procedure can go wrong...it seems that on some TASMOTA versions there is a bug with OTA (but I'm not sure about this). I tried 3 times to get it works.

- after upgrade SONOFF, it reboots with "access point" mode (I don't know if this is right or wrong...) and so I linked my PC to its wifi network, go into the web console (url 10.0.0.1) and just reboot it again



A special note here: subscribing to the topic sonoff-version on a public MQTT broker sonoff.maddox.co.uk:1883 you can get a message with the TASMOTA latest version (thanks to  @smadds)

Here is it, using mqtt-spy


Here is a video about my upgrade procedure:


Tuesday, 22 August 2017

Home Automation System - SONOFF and TASMOTA, small configuration error





Playing with MQTT and my SONOFF Basic, with TASMOTA firmware on board, I found a small mistake in the exchanged messages. In a few words, when I sent a MQTT message to power on or off the SONOFF (tasmota/garden/light/sonoffbasic01/cmnd/POWER ON), the device replied to me with the standard topic (stat/sonoffbasic01/RESULT) and not with the "fulltopic".

I immediately thought that the reason was a bug in the firmware and so I opened an "issue"on the GitHub page of TASMOTA.

In a few hours I found the solution, caused by a configuration error and not by a bug of the firmware.

In particular, I left the default value for "MqttClient" parameter, which assumed the same value as "Topic" parameter. For TASMOTA this is not OK. So I changed "MqttClient" parameter with a different value than "Topic" parameter and set mqtt-sonoffbasic01. Please, remember that this parameter must be unique in the entire system.

This is the link to the discussion:

https://github.com/arendst/Sonoff-Tasmota/issues/760

I must admit that in a few hours I found the solution to my problem, thanks to the big support of developer.

Theo Arends, THANK YOU VERY MUCH