Re: [mh] Installing Tasmota firmware on Sonoff OTA devices

Giles Godart-Brown <[email protected]>
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <[email protected]>
I'm currently running 61 Tasmota devices, all controlled by Misterhouse, 
a mixture of Sonoff S20, Basic, POW, and Mini as well as Wemos D1 Mini 
of various vintages.

For UI I use the MH Alexa gateway and home-grown web pages running on 
phones, tablets, PC's Mac's, whatever. Please see attached screenshots 
from an Amazon Fire tablet and a Mac, clicking on a room brings up the 
page with all the switches and heating settings for that room.

If you cannot use the OTA mechanism Jeff describes below, e.g its an 
earlier version, you will have to solder a header to the board, but 
thoughtfully they provided through holes so this is pretty 
straightforward. Then you need an FTDI board (unless you are using a 
Wemos D1 mini which supports USB natively) and flashing software, I use 
Tasmotizer. (https://github.com/tasmota/tasmotizer). There are plenty of 
resources on the internet on how to do this.

I did have trouble once with a Chinese copy of an S20 that refused to 
flash OTA and its headers weren't connected to the correct pins (Doh!).

For home-brew sensors (PIR, Smoke, 1-wire temperature, doorbell, 
curtains, Workshop emergency stop switch) I use Wemos (Lolin) D1 mini 
with stock builds of  Tasmota. It’s a testament to the folks at Tasmota 
that I’ve never felt the need to customise it.

For managing and monitoring what’s going on I use the following;

  * The console in the Tasmota web interface shows exactly what’s going
    on and allows you to configure it online
  * For bulk jobs, like doing an OTA update I use TDM
    (https://github.com/jziolkowski/tdm) It scans all of your Tasmota
    devices and shows all sorts of stats, and provides a nice UI for
    doing configuration, especially rules. Most useful is the Wi-Fi
    signal strength, it runs fine on Windows, but is a bit odd on Mac.
  * For mqtt monitoring I use mqtt.fx (https://mqttfx.jensd.de/), OK on
    Windows and Mac

Jeff and I are working on some additions to MH to make it easier to 
support Tasmota via  HTML and/or MQTT, I’ve just started a new page in 
the MH wiki where I’ll write this all up.

As you can probably guess, when I retired I found I had some time on my 
hands :-)

Giles

On 15/12/2020 05:41, Jeff Siddall via misterhouse-users wrote:
>
> Paul,
>
> Currently three devices (Basic R3,RFR3 and Mini) can have Tasmota 
> firmware installed OTA (over WiFi).  I successfully upgraded the 
> original Minis that came with R 3.5.0 firmware, meaning V2 of the OTA 
> protocol, meaning no special software required.
>
> Many other devices can be flashed using either a serial programmer 
> (requires hardwired connection) or OTA using custom software (ex: 
> tuya-convert).  See this site for details about what devices work and 
> instructions for installing Tasmota:
>
> https://templates.blakadder.com/
>
> Good luck!
>
> Jeff
>
>
> On 2020-12-14 9:24 p.m., Paul Onley wrote:
>> If someone was interested in trying this which sonoff devices can be 
>> flashed with the tasmota firmware?
>>
>>
>> On 12/14/20 7:01 PM, Jeff Siddall via misterhouse-users wrote:
>>>
>>> Installing Tasmota on Sonoff 3.5.0+ (OTA) devices is slightly 
>>> fiddly, but one nice thing about these "DIY" devices is that they 
>>> requires no special apps to setup.  I installed mine using a browser 
>>> on my phone and curl on my MH machine.  I also used apache to serve 
>>> the firmware, but I think I could have just pointed them to the 
>>> Tasmota OTA server if I wanted.
>>>
>>> Here is the basic procedure:
>>>
>>> Plug in/turn on the device.  When it boots, enter AP setup mode by 
>>> holding the device button for 5+ seconds until the blue light begins 
>>> to flash with a new pattern.  Release the button and begin holding 
>>> the device button again for 5+ seconds until the blue light begins 
>>> to flash approx. twice per second.  Then use a WiFi device, such as 
>>> a smart phone, to connect to the Sonoff AP with SSID: ITEAD-xxxxxxx 
>>> and password: 12345678
>>>
>>> Use your WiFi device browser to visit: http://10.10.7.1/ and set the 
>>> correct WiFi AP parameters.  The device will reboot and be reachable 
>>> from the WiFi AP.  Use this command to confirm the device is in DIY 
>>> mode:
>>>
>>> curl -X POST |-H "Content-Type: application/json" |||-d 
>>> '{||||||"deviceid":"", ||"data":{}}' 
>>> http://<Sonoff_IP_address>:8081/zeroconf/info
>>> ||
>>>
>>> If a response is received with no errors in the reply, then proceed 
>>> to update the firmware with the setup-sonoff-mini.sh script posted 
>>> below.  Note that the device will require internet access to perform 
>>> the unlock.
>>>
>>> Below is a simple bash script to take care of most of the typing.  
>>> Be sure to replace 
>>> http://<server_ip>/<firmware_path>/tasmota-lite.bin with the right 
>>> URL for your firmware server.  Also update the sha256sum if you are 
>>> not using release 9.1.0.
>>>
>>> #!/bin/bash
>>>
>>> # setup-sonoff.sh - Script to automate upgrading Sonoff DIY devices 
>>> to Tasmota firmware
>>> # Copyright (C) 2020 Jeff Siddall
>>> # Last modified: 2020-12-14
>>>
>>> # Exit if any of the spawned commands has failed (exits non-zero)
>>> set -e
>>>
>>> # Check for the right arguments
>>> if [ $# -ne 1 ]; then
>>>    echo "Usage: setup-sonoff-mini.sh <ip_address>"
>>>    echo "   where <ip_address> is the IP address of the device to 
>>> upgrade"
>>>    exit 1
>>> fi
>>>
>>> # Print the current device info
>>> echo "Current configuration:"
>>> curl -X POST -H "Content-Type: application/json" -d '{"deviceid":"", 
>>> "data":{}}' http://$1:8081/zeroconf/info
>>> echo
>>> echo "Enabling unlock (note: device requires internet access):"
>>> curl -X POST -H "Content-Type: application/json" -d '{"deviceid":"", 
>>> "data":{}}' http://$1:8081/zeroconf/ota_unlock
>>> echo
>>> echo "Starting firmware upgrade:"
>>> curl -X POST -H "Content-Type: application/json" -d '{"deviceid":"", 
>>> "data":{"downloadUrl":"http://<server_ip>/<firmware_path>/tasmota-lite.bin", 
>>> "sha256sum":"b8a16f18a018bd6233170ce28a625508c38770d9d8ef195c7afa50f914c4ac9c"}}' 
>>> http://$1:8081/zeroconf/ota_flash
>>> echo
>>> echo "The upgrade will take several minutes, after which time the 
>>> device will reboot"
>>>
>>>
>>>
>>> ________________________________________________________
>>> To unsubscribe from this list, go to:https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>>>
>>
>>
>>
>> ________________________________________________________
>> To unsubscribe from this list, go to:https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>>
>
>
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
Screenshot 2020-12-15 at 08.21.00.png (image/png, 260.3 KB) - not displayed
Attached Message Part (image/jpeg, 66.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.