SuperHouse #31: Sonoff Tasmota installation and configuration
Vložit
- čas přidán 25. 08. 2024
- * www.superhouse...
* Episodes: www.superhouse...
* Discord: www.superhouse...
* Gear I use: www.superhouse...
* Patreon / GitHub Sponsors: www.superhouse...
The Sonoff power control device can be made even more useful by replacing the factory firmware with the open source "Tasmota" firmware. You can compile Tasmota yourself if you want to, but it's really easy to install just by downloading a prepared binary and loading it onto a Sonoff using the Esptool utility.
Learn how to select the correct Tasmota binary, load it onto a Sonoff, and configure it.
SuperHouse:
- www.superhouse.tv
- / superhousetv
- / superhousetv
Jonathan Oxer:
- / jonoxer
- / jonoxer
Support me on Patreon to receive exclusive discount codes: / superhouse
I've confirmed that the process for backing up the original firmware and then restoring it later seems to work OK. I've updated the episode page with a step by step guide. Using esptool it's possible to download the original EWeLink firmware, flash the Sonoff with Tasmota, then restore the original firmware.
SuperHouseTV really nice. That is the information I have been waiting for a long time now as I did not want to make some of my Sonoff devices useless if I don’t like Tasmota in the end. Also nice explanation of the functions and the group and fallback topics. Will be helpful for me soon. Greetings from Germany. Michael.
I am trying to read the original data using the esptool using Windows 10 - I do get a proper response when I read the but when I try to read with I get a message saying
Please ignore this comment about the fatal error - it now works! I used a different USB/TTL and it worked properly. I also confirm that I was able to put back the original SonOFF firmware and it remembered everything - now I 'm going back to Tasmota and more experimenting. Thank you SuperHouseTV!
In the website the write command is wrong "esptool.py -p /dev/tty.usbmodem14201 write_flash -fs 1M -fm dout 0x0 sonoff-6_4_1.bin"
the "-fs 1M" should be "-fs 1MB"
Ooh, true! I'll fix that command now. With the current version of esptool you don't even need to specify it, because it detects the flash size automatically. I'll edit the command to remove the -fs argument entirely. Thanks :-)
Excellent Video Jonathan. This is the best video I have watched about installing Tasmota on a Sonoff basic, including saving the original-bin file. And the explanation about its configuration and setup is first class. Well done.
Hi Jonathan, it's great to see more of your Superhouse content. Thanks for the video, great work. Keep them coming.
Oh wow - this video taught me much more about the topic than last few evenings of trying to understand MQTT. Thanks!
Thanks for an excellent video. The Tasmota documentation did my head in by not explaining the steps and syntax required to publish those MQTT commands to do stuff. You did that job and suddenly all that lost time can be forgotten and I can move on to the next challenge!!
I am new to the entire Sonoff and Tasmota & DIY home automation scene .... I want to thank you for your videos. they have been extremely helpful. I did recently purchase the 2 circuit boards from you to connect and flash the sonoff as you did in the video. As to your advice, I purchased a set of helping hands and a beginners soldering kit. I just finished watching episode 30 again and this video. So, tomorrow, I solder & flash. Wish me luck. After which, I shall attempt to configure using Windows. Then I will see if it all worked. I am going to go ahead and flash 6 all at once & then configure and install them. Again, thank you for your help in the videos. I am slowly becoming "educated", lol.
Good luck!
Just love to watch all your Excellent Video Jonathan.
The video tutorial is super good and one of the best that I observed till date. I am a novice and I could follow your instructions and complete the flashing process without any issues. Kudos Jonathan. My only observation during the entire process is everything works fine and your Jumper wires sometimes may cheat you. I was breaking my head initially where I was going wrong, but all of a sudden, I had doubt on my Jumper wires and my guess was correct. The one that gets connected to VCC of FTDI232 and 3V of Sonoff Basic was not working. I checked the continuity with multi-meter, replaced the jumper wire and everything worked seamless.
Congratulations Jonathan, for this excellent top-down, general-to-specific and methodical approach. Also you give us useful best practice tips from your experience. Fantastic example of the engineering approach.
Hi Johnathan, I want to thank you for the first class explanation about tasmota in conjunction with sonoff
Regards from Germany Dick van Rijn
Thank you for the Video. This is the best Tasmota tutorial on CZcams.
Excellent tutorial. Very comprehensive, and riveting. Thanks for being there !
I have watched a number of videos and I can say this is the best one I have seen, you really covered all the aspects of the device.
Hey Jonathan. Thank you for this video, with some digging, it guided me through exactly what I needed to get going with Tasmota. Keep up the good work and post a link so I can buy you a beer!
Its great to see you doing videos again. Your Superhouse series inspired me to build my own system. Thank you Jon. I live in a 400 year old house, now thanks to you i can monitor the health of my home. A lot of work, some building and some tech. Now i can see the the humidity is down from the high 80%s to mid 50s and the stable temperature is around 18C. Much healthier home
Wow! What a Brilliant tutorial. Kept me up all Sunday afternoon. I had plenty of pitfalls and almost gave up. It turns out the FTDI driver won't permit me to flash my Sonoff. So I tried the same thing with an ESP-01 and a programmer with which it worked and I could see the Home page hosted by Tasmota.
Still figuring out the MQTT part which you said you would explain later but I couldn't figure out if the 192.168.1.111 was something chosen by you or is ti dictated by something else.
Just loved your patience and excellent presentation of the details. My sincere appreciation to you.
Great tutorial ! I followed others but they were very complicated for such a simple task ! Kudos , you made things very easy!
Thanks a lot!, mate! VERY useful videos. (From Greece)
Absolutely pro-class video! Stellar job!
Many thanks for this nicely produced tutorial.
Thank you, I flashed mine with a Pi2 and followed this guide to setup :)
And this is what i need. Many thanks.
Thanks Jon for another great episode. Will definitely be doing some cools stuff with this advice in the future.
Thanks Dodgy! Good to see you here :-) Maybe I'll even do more livestreams soon
@@SuperHouseTV that would be great.
Had a bear of a time connecting my sonoff to my MQTT, so thanks to you, just called a a Wemo and all is good :))))
Great video, as usual!
Tasmota's awesome! I have about 30 of these devices deployed between Tasmota and ESPurna. ESPurna definitely has a better interface, but more confusing initial setup because of the custom libraries.
Спасибо,всё понятно, paldies!
You are a great teacher!
Excellent explanation! Thank you.
Thank you for this. Very helpful.
"suck off the contents of the flash" hardest i've laughed all day. thanks !! ;)
9:06 of the video btw
thanks, your video are great, keep em coming
Hey Jon. Nice video. Those wanting a shorter video, can skip forward a bit.
Great tutorial. I was able to flash and see working my first Sonoff as you went along only gotcha's I had were difficulty getting GND connection, the solder did not take to GND header pad first 2 times and I missed that after read/write the sonoff comes out of boot load so stops talking - once I learnt those things all was well thanks.
Very interesting.Thank you.
Fantastic video... thank you.
Just Thank You! Keep on!
As a complete novice I enjoy watching the detailed description. I can follow the clip, not understand much of it but want to experiment by following the instructions..... I would like to see the list of commands that you typed in to your mac on the comments below the video so I can copy and paste... That would save me a lot of time as well.... In the meantime, Thank you
Hi, great videos. I’ve just started playing with Sonoff basics, I’m confident with programming Arduinos etc but don’t know what the advantages are of flashing Tasmota over using Ewelink or Googlehome. A video about this or perhaps a link would be excellent. Love the channel, thanks.
Nice bro
Thank you!
Great long video Jonathan! So much detail! Have you ever tried Termite? Allows you to send serial command to the flashed Tasmota to set the network ssid, password, and most of all the config like MQTT settings etc. Saves time with the captive portal and IP lookup part of the install process (as console will display IP over Termite). Not sure if it's just a WIN application?
I haven't used a serial terminal for Tasmota config, but that sounds awesome, thanks for letting me know! Termite looks like just a regular serial terminal so it should be possible to do it with any common terminal program, including the serial console in the Arduino IDE
I am not sure why but I cant seem to get the usb to serial on my mac working. It only shows be bluetooth option for modem. Is there anything prior the esp install needed?
Very good turorial. Where does the mqtt host IP come from?
Feeling pretty good about the clutter on my desk right now.
Great video mate. Can you recommend a not so expensive label maker? Not sure which one you use? Or do you use just a regular printer?
Have you tried flashing the news 2018 model? Flashing does not work anymore
Is it possible to use a sensor compatible firmware and connect a sensor directly to the chip for use, when the original design doesn't have one built? Like if my smarthome device doesn't use pin X, but pin X can be checked for high/low state with a specific firmware version?
@SuperHouseTV how you know what commands you can send to devices like this switch or rgb led ribbon?
Hi Jonathan - great video. Have you checked out the ESP32-POE and ESP32-EVB from Olimex? It seems like potentially the perfect home automation solution, especially if you have a PoE switch installed with cabling throughout the house. Can't complain about the price either. My favorite thing about it is obviously that it's a cabled solution, and that it'll stay powered on during a power outage as the PoE switch has a UPS.
That's exactly how my light switches were originally wired up about 10 years ago, which is why I have Cat-5e to every light switch. I designed the EtherTen (tron.cc/et) specifically to do PoE to my light switches so there are quite a few older videos showing that architecture. However, I restructured it (using the existing cabling) to centralise control and decrease complexity. There's a video about that at www.superhouse.tv/25-arduino-home-automation-light-switch-controller/
@@SuperHouseTVOkay, that'll be very interesting to see. I am planning such a setup for my house so this is very relevant. I also want to decrease complexity.
Great video, and I managed to get MQTT working following the video. However, I still can't seem to get the settings done right in Homebridge for Tasmota Sonoff to work.
Hey ! thanks for the video :) Subsidiary question : which "finder" do you use on your mac ? It seems it has way more options than mine ...
Excellent tutorial, installed tasmota at my first attempt by following your tutorial. I have one question, how did you know the topic had to end with /POWER and OFF and ON, why not something like /UNITXX and HIGH and LOW. Just interested.
A general problem with Sonoff switches is that they work fine on DC but not on AC (main power). Do you know something about it or how to solve it?
@SuperHouseTV hi, different subject, but what MCU do you use on the back of your light switches to communicate with your master that controls your relays?
I am making a passive touch light switch that i think will need pre-processing on the switch as i don't trust the signal over 30m of cat6.
I thought about using a esp8266 as i have heaps of them, but i really want the signal to be wired.
Any ideas would be greatly appreciated.
Jonathan, hi. Could You help with my so off th-16 . I can’t make thermostat from this device. I’ve already flash Tasmota firmware and try to add it in Domoticz server. But it work only if I send command directly to ip 192.168.2.6 etc. Idx not working...
As usual, an excellent show. As a request, a lot of homes and other styles of houses have switch to 100% solar and 12volt batteries. Can sonoff be changed to run on DC power supplies rather than mains?
Hello Mr Oxer! I would love to know what you think about deploying these in Australian homes, via Australian Electricians - and Australian insurance? I'm so keen to get these installed at my house, but I keep halting due to the doubt I have around safety and insurance. Thoughts?
I need to do a video specifically about that, because a SuperHouse subscriber recently had some Sonoff models certified for Australian use. It cost him a lot of money to pay for the lab tests etc, but he got it done. Unfortunately the cost of the certification means that it costs more to buy the certified units, and if you buy Sonoffs from anyone else they're not certified. If you buy them from Oikotec, you're all sorted for Australian compliance and your electrician should install it without any problems: www.oikotec.com.au/products
@@SuperHouseTV thanks.. please have a look at shelly
I have some Shellys here: they've been in my "must make a video about these" pile for a long time. Hopefully soon
Can I flash for Tuya device with tasmota ?
Good to se emore videos Jon, a quick question, that i bet it might be a bit in depth at the same time. I remember seeing your latest update on how you wired your house, where you no longer have electronics on your switches just buttons with eth cables to your control box. would you use the same with sonoffs? or what would be your approach on the physical way on turning on the sonoff?
Great question. The way that I use Sonoffs is in situations where I want control of a device in a non-permanent way, or where rewiring isn't convenient. I have a few of them spliced in series with power boards and enclosed in plastic boxes, the way I showed in the "Six Sonoff Secrets" episode, which is really handy when I want to do something like plug in Christmas tree lights, or lighting for a work bench. Things that aren't permanent house wiring, which is all hard-wired. For those sorts of non-essential things I'm perfectly happy using WiFi to control Sonoffs.
Hi Jonathan
Do you have any video on "How to compile Tasmota, MQTT with TLS support"? If there is no such video, do you plan to do one ? I would like to connect to Mosquitto over secured channel.
Great Video I had no idea about the fallback topic. Why is that not the default topic name?
All works in your video up until trying to connect to the sonoff in the browser, (I'm using a raspberry pi 4 ). The sonoff is broadcasting OK but cannot connect. Can you help me?
Sir, I have plan to control my door-lock using Sonoff basic to trigger push-button to replace switusing. but the timer start 1minute only.
I have bought a device on banggood
esp12f_8relay/LC-Relay-ESP12-8R-D8
can you explain how to put tasmota in it and configure it
thanks
Hi! Great videos! Can you use sonoff for fan speed control?
do you have a vlog on mqtt (software , examples how to start with) ? thanks
Fasntastic tips again, have you ever came across a sonoff issue where after flashing the software it doesn't power on? Using the 3.3 and ground with jump wires still powers it on but wiring it to an outlet doesn't give it power. Using the ESPTools and step by step from Superhouse #21. At a loss
Great project mate. I have a arduino program that display line pressure. I want to take this data on home life app through node mcu. How is it possible???
You were doing so well... I as following you right up to the stage where you JUMPED to your Mac ESP Tool. I wanted to know which ESP tool to download to clean the sonoff memory and how to do that.... Bummer... Now I have to go hunting
Hi. I bought a sonoff and i had a ESP8285. Do you know if this procedure it works whit this version of sonoff ?
Hi, I have a couple of Sonoff Pow switches that refuse to connect to WiFi after I save the network's name and password and click save in the connection direct page. Is there any suggestion that you would offer to do? I have tried both the Tasmota versions 6.5 and 6.4.1. Thanks for the great video.
Hi, and how can is setup the wifi from windows? Im stuck that step. I can join to the esp network, see the ip of the device, but cannot join.
Can I flash with Itead firmware after flashed with Tasmota firmware?
I flashed two sonoff mini with Tasmota, but using different methods. The first one I flashed with Tasmota minimal through tool_01DIY85(3.3.0) on Windows 10, with the jumper on the sonoff board. After I did that and an itead.bin file appeared in the same folder of the tool. Since I flashed with minimal, I had to use a ftdi board and flash again with full tasmota. The other sonoff mini I put on AP mode, without jumper on the sonoff board, and it created a wifi network, I connected to it and I opened the IP 10.10.7.1. Doing that a configuration screen showed up, and I put my wifi network name and password. After that I opened the tool_01DIY85(3.3.0) and flashed with tasmota lite. With tasmota lite on it I connected to the IP that I was reserved to it and upgraded the firmware to full tasmota through Tasmota webUI. This time an itead.bin did not appear in the folder. I really need to flash back to itead firmware again. How can I do this? Im using windows and I just have a ftdi board. Is it possible? Thanks.
Hello Johan
I have a problem with the SONOFF® TH16 DIY 16A 3500W Smart Home WIFI Wireless Temperature Humidity Thermostat
I get to see this in my eWelink but the message cannot be reached
Do you know a solution for my problem
Greetings wilhelm
In your video when you type in the Terminal Window, I am confused, it this connected to HassIO? Please explain if you would.
No, that was just the local terminal on my Mac. The same thing works on Linux, and can be done on Windows if you have the environment set up as described on the esptool page. Everything I showed in the video is done *only* with the Sonoff and my computer, no OpenHAB or HassIO or anything else required. The only extra thing I used is an MQTT broker.
Can you go Sonoff (tasmota) to Alexa directly via emulation as a Wemo? (basically without OpenHAB, etc.?)
Did ITEAD ever get Australian certification done?
hi there can i still connected sonoff to ewilink and program a motion sensor on it??
Great Info .. I have a Sonoff G1 ... any idea which of the the bin versions will work with this module??
That's a module I've never seen in real life. I'm pretty sure Tasmota won't work on it, because it has GSM hardware in it that's not in any other model. I'd be interested to open one up and see how it works.
I almost ordered a G1 to experiment with, but it's only 2G which hasn't worked in Australia for years. If Itead release an updated version with 3G or 4G connectivity I'll definitely get one.
Where do i can get those devices to connect my pc to the sonoff?
Hi
I’m watching a lot of your videos. This is great content.
I’m excited to do my house smart in future.
I saw that you have a lot of devices in there.
How to do when you want to make every switch, plug, tv, window blinds and so on but you run out off the address space in your router.
When I choose a.e. 192.168.0. 0-255 I have only 256 addresses. Or is it possible to use in the same time also 192.168.1.0-255?
In this case i could use 512 devices and smart phones or computers.
Hi Jonathan, I'm a big fan of your videos. You should take a look on the esphomeyaml firmware. Basically you can plug together a firmware using a yaml file. I always use it when tasmota won't fit my needs like e.g. old WS2801 led-strips.
Thanks for the tip! This is the first time I've heard of that project, and it looks quite comprehensive. Amazing that I totally overlooked something as significant as that. Just goes to show how little I know about this stuff :-)
@@SuperHouseTV You got quite a knowledge. But who knows everything. ;) I won't know a lot of there weren't CZcamsrs like you.
Short Q....if Tasmota is installed on the sonoff, can it still be controlled by GH or alexa?
following this question
Yes, but in a different way to the original EWeLink firmware, which has an Alexa skill, etc. Tasmota is conceptually a bit different: it allows you to not be reliant on a third-party service such as the EWeLink cloud system, and take direct control of your devices if you choose. It's more suited to integrating with your own home automation system instead of being a single element linking to a remote service such as Alexa or GH. If you have Alexa or GH connected to your existing home automation system (perhaps OpenHAB, or Home Assistant) then 99% of the work is done. Adding a Sonoff to your system is just like adding any other controlled device. I currently use the Alexa Node-RED skill bridge so I can use Alexa to control devices via OpenHAB, including Sonoffs running Tasmota: alexa-node-red.bm.hardill.me.uk
do i need seperate mqtt broker, cannot I directly connect to sonoff?
Is all of this the same with the R2 sonoff basic?
why dont you sell these with updated software? or maybe you do, I just dont know where to get it.
I've been thinking about that!
Hi, I would like to configure sonoff T1 3 Keys to work with homekit could you help me?
Just an idea, not sure if it would be useful. Once the Sonoff is flashed to Tasmota, the serial connection should no longer be needed due to being able to flash OTA. Wouldn't that mean that we would have 2 additional GPIOs? GPIO1 (TX) and GPIO3 (RX) would be free along with GPIO14. Is this possible?
Also, they are PWM pins...
Yes, it should be possible
Mate, do you have a preferred vendor to buy you Sonoff gear from?
You need to do a new video for the new boards and chipset they have now , the power rf ones
Hello Sir,
Can you share about different companies who offer home automation products. which has reliable cloud servers so that the device never goes offline.
Also products that run on lan when internet is down.
Kindly make a video on that.
Hi love your videos. :-) Keep them comming.
Can't you make a video about your PnP machine, how you made it, the coiches you made for the hardware in the machine and so on :-)
I've recorded a few snippets about it but nothing that makes an actual useful video. I'm modifying the feeders at the moment to replace the analog servos with digital servos, so perhaps when it's all running again I'll do a brief video that just shows how it works
I followed your instructions for connecting to my PC and started getting a backup on what was currently on the Sonoff (Basic). Reading the flash with the same command you did (changing to COM2), it stops at "1011712 (96%)". It isn't writing the bin file. Any idea why this won't complete?
Not sure what was going on, but it worked after the 3rd attempt... :)
Glad you got it working! I only mentioned copying the existing flash as an interesting thing in passing, I've never tried restoring the eWeLink firmware. It seems people are interested in that though, so I'm going to test it.
@@SuperHouseTV I had been through the process of flashing new firmware onto an ESP8266 back when they were fairly new, and it was a serious process. I guess the idea was just being cautious and having a backup. Now that I see how easy it is compared to before, I probably won't do anymore. Besides, you only need one backup of a new device :)
Well... I'm completely confused - due, in no small part, to the use of command line hieroglyphics, which render me a gibbering wreck.
I've been using Sonoffs with Node-RED for a couple of years, with them running my own firmware, written in the Arduino IDE and despite being really bad at programming, they run flawlessly.
Each one has MQTT topic and other things set manually for each device, but I can make use of the 'extra' GPIOs on the Sonoff (not just GPIO 14, but those on the 'RF pins, etc.) and they do everything I need.
I thought Tasmota would have made things easier but that doesn't seem to be the case (though it does provide a standard and gives OTA updates - though I honestly don't really see the need for that).
Maybe I'm just missing something and I really should be using Tasmota?
Any chance of doing a similar video with Espurna???
If you have your own firmware running, that's fantastic, and you may not get much benefit from Tasmota. Don't underestimate yourself: you say you're really bad at programming, but you've written your own firmware with MQTT support, so that's a big achievement! Tasmota is of most value to people who can't do that, or want to use an existing solution and save time for doing other things. I have my own firmware running on some older devices too, but since Tasmota is a really nice system with very smart people actively developing it, I don't bother with my own firmware anymore. It's easier to just flash Tasmota and get on with my day.
Many people have mentioned Espurna but I haven't personally used it, so I need to give it a go.
Thank u for the video.
Can we make sonoff basic work like a mqtt broker ??
It's possible, but not a very good idea. The ESP8266 isn't quite powerful enough to be useful as a broker. I've heard of several people working on that, and reports that it has been made to work, but "work" might be stretching it a bit. You're much better off using a device like a Raspberry Pi as a broker, particularly as your system grows. By the time you've added a bunch of sensors that are reporting regularly plus other things, your broker will easily be passing many messages per second. There's interesting discussion here about attempts to do it on ESP8266: iot.stackexchange.com/questions/2088/can-i-use-an-esp8266-as-an-mqtt-broker
is it still work with 433mhz remote?
Note on the latest Tasmota version when pressing toggle on/off from the web interface a mqtt event is not sent and my subscribe does not pick it up.
That's interesting. I'll check how mine are behaving on 6.4.1
Is there a resource on your website that would cover A-Z obtaining and configuring a MQTT server for local control without relying on the internet? When it comes to command line procedures, a resource for a PC application is also desirable (which I am sure is out there). CZcams is great for the big picture and certainly as a visual aid to doing these things, but there might be value (and payment) for a nice document that focuses on MQTT / Sonoff initial setup and configuration. Especially for a US based beginner.
I've done explanations of MQTT in the past, but I haven't done a specific video showing (for example) installation of a broker. Mostly because it's just "sudo apt install mosquitto", which would be a very short video! There's definitely a need to explain how to use the MQTT features in OpenHAB though, and more detail of how Tasmota uses MQTT with a breakdown of the default topic structure. When I make videos I try to also document the same thing in text / image form on the video page, with the video at the top. That way if people want to learn by watching the video, they can, or they can just scroll down to see all the documentation. If you're only seeing my videos on CZcams you're missing out on a lot of the content. Each video has a link in the description to the page for that episode, which usually contains a matching written guide.
can you show how to do an sonof Rf