Це відео не доступне.
Перепрошуємо.
Sonoffs can work with Home Assistant without changing the Firmware!
Вставка
- Опубліковано 16 сер 2024
- www.pcbway.com/
www.drzzs.com
All the instructions are on this Github page: github.com/Ale...
Non-Flashers rejoice! There’s a custom component for Home Assistant that lets you use Sonoff Devices without changing the firmware, and best of all, it doesn’t use the cloud either :0
Let me give you 2 min of DIY smart home history. Way back in 2017 Sonoff made the cheapest smart switch (they still do). When other switches cost $30 the Sonoff Basic was only $5. The problem was, you could only use it with their app. Until geniuses like Theo Arends (He’s the TA in TASMOTA) started writing new firmware for Sonoffs that would allow these $5 switches to be used with a whole host of different smart home hubs, including Home Assistant. The process for flashing Sonoffs with new firmware has been easy for some people, and not so easy for others. Countless hours have been spent across the world fidgeting with jumper wires, grounding GPIO-0 and sorting out espcomm errors. That’s all over now! Okay, maybe that’s a little too dramatic, but it is fair to say that if you’ve been struggling to flash your Sonoffs, relief is here!
I gotta give the Sonoff folks some credit. They listened to their customers who wanted to have more control over their devices. In 2019 they included a local area network option for controlling their devices. They didn’t really communicate very well how it worked though so it wasn’t very accessible to most of us. There have been a couple components for Home Assistant that allowed you to use Sonoffs without changing the firmware. I’ve had mixed success with them, until now.
This guy AlexxIT, has made a beautifully simple custom component that sets up your Sonoffs to work in HA without using the cloud. I verified that once you have your non-flashed sonoffs setup this way, you can totally disconnect your house from the internet and they will still be controllable through HA. Are you excited now? Good, you should be! Let’s go through the setup.
The Hero of the Day is AlexxIT. This is his work, so give him a high five when you see him on the street. Or buy him a coffee on github.
Install Home Assistant Community Store
Quick demo on how to do that
Jenny’s video - • Home Assistant Anniver...
On the HACS settings page, under Custom Repositories, put AlexxIT/SonoffLAN and for Category select “integration”
Go to Integrations and search for SonoffLAN
Select it and Install it
Restart Home Assistant
Now we have to get the API_KEY for each of your sonoff devices.
Alex describes a way to do that without connecting to the eWeLink app
If you’ve already connected your sonoffs to the ewelink app that method might not work, at least it didn’t for me.
Setup your Sonoff Device with the eWeLink App
Put the email or phone number you used and your password in your secrets file
In your configuration.yaml:
There are other options
reload: When HA restarts it’ll connect to the itead servers and get info about your devices. It puts that info in a file called .sonoff.json
If you want it to retrieve info about new devices every time HA restarts you can make this “Always”, otherwise it’ll only do it once. If you add more devices, delete .sonoff.json, if that file isn’t there it will connect to the sonoff servers and download the information again.
Once that file is created you can delete your user and password if you want. The component doesn’t need to connect to the sonoff servers ever again as long as that .sonoff.json file is there.
Check the config, and restart HA
Go to States page and search for switch.sonoff-1+++
Customize it how you want, add it to the UI, make automations etc.
There are some more options and specific examples on Alexx’s github page.
That’s it! You’ve got control of your sonoff device in HA, without flashing and without the cloud!
My new little sonoff micro that I was all sad about not being able to flash, is now working with HA without ever connecting to the Sonoff servers. How great is that!?!
I expect I will still flash Tasmota on at least some of my Sonoff devices. I like to add other functions like Temperature & Motion Sensors. You can’t do that with the stock firmware. But if you’re not planning to add any other sensors to the device, you certainly don’t NEED to change the firmware anymore. Thanks Alex!
If you speak russian Alex also has a blog about smart home stuff: sprut.ai/clien...
IMPORTANT LINKS:
drZzs.com
#DrZzs
www.drzzs.com/...
drzzs.com/prod...
www.amazon.com...
Social Media:
Discord DrZzs - discord.me/drzzs
DrZzs Facebook Page: DrZzs
Message: m.me/DrZzs
Group: / 1969622823351838
Discord Home Assistant - / discord
Twitter: / dr_zzs
Instagram: / drzzs
I have over 14 Sonoff basic with ewelink installed at home. I'm just starting with homeassistant. After 10 hours of trying and following yours and others videos I have all my sonoffs in homeassistant as well as ewelink! - HAPPY!!! - THANK YOU!
I just went to set this up following this guide from start till finish, and it works flawlessly. In about an hour I managed to set up home assistant in Docker (something I've been postponing for a while), installed HACS, installed AlexxIT's repository, installed the integration, and paired with my brand new Sonoff Basic, that I just unpacked. IN AN HOUR! Extremely simple thing to set up. Thanks for yet another great video :)
Excellent!
Im wishing my setup was as smooth sounding as yours. I've made as far as having the VM installed in ProxMox. HACS, and AlexxIT repo installed. Integration installed. Edited my config file to include ewelink creds. however my sonoffs, (visible in the app) are not showing up after a reboot of HASS
:(
I'm seeing this error, but not sure what it means at this moment
Validation for DSorlov/hasl-platform failed with GitHub returned 404 for api.github.com/repos/DSorlov/hasl-platform/git/trees/master.
@@killerskincanoe Did you delete the .sonoff.json file (there is a dot (.) before sonoff) before you restarted Home Assistant?
@@antonisantoniou2560 In my particular case, the .sonoff.json file has been generated with devices listed in there but somehow those devices do not appear on the Home Assistant interface :( any ideas?
Wish I could give you two thumbs up. You gave me a BONUS with this video. I have a Xiaomi BLE sensor which I have been trying to figure out how to use. I noticed an integration for that while you were installing sonoff. Installed it too. AND it works!!!!!! Thanks for all you do for us.
Excellent! Thanks Tom!
I tried for hours to flash my R3 DIY to Tasmota with no luck and just lived with the R3 not included in Home Assistant. I came across this video today and this just worked. Thank you so much.
Just starting out in Home Assistant. Your videos have already become an invaluable resource.
WOW. you and Alex deserve so much credit. Alex for the work on the integration and you for bringing it to the public! I needed this so bad as I have the newer touch light switches that I didn't want to flash.
awesome! I figured this would remove the last barrier for a lot of people. Good luck!
@@DrZzs :) Thank you again for your videos. You've inspired me to do my own crown molding lighting :)
5:15 you might want to drop in a note there that says the configurator has been renamed to File Editor.
omg thanks ive been watching his videos wondering where to find it
this Sonoff and Shelly competition is amazing.
Does anybody knows if there is something like this for shelly devices?
@@LeonidMutti There is. Shellys do not need custom firmware for basic local control.
This is awesome, I've just got my RF Bridge and had read horror stories about flashing them. Came to watch your vid on doing that and discover I don't need to anymore. 🕺🏼 Thanks Drzzz and Alex!
Hello! I want to start by saying thank you for all that information you share with us through your videos. I really appreciate it! Keep up the good work!
Thanks again DrZZs! I switched over to this integration after the other one ceased working after a HA upgrade.
4 switches with Sonoff Micro because it's flashed with multichannel firmware. I don't know why.
Earlier you can fix this with device_class: [switch] setting.
But in latest version this should work automatically (if device list loaded from eWeLink servers).
PS: and thanks! Great video!
Hey Alex! I saw you updated the code today. Great work sir!
Thanks to both of you dudes
Great tutorial as always! I just tried it with the Sonoff S31 plugs and the custom component also provides voltage, current and power consumption reading... perfect for washer & dryer status automation.
Many thanks for this. I just got my first sonoff device with v3 firmware, followed this video and setup was a snap. The installation has changed a little and become even easier.
Wahhhh - thanks for explaining the drill, That was the main thing that was sacry, having to flash those sonof mini and the sonoff outlet, and Now they work with HA, Flawless !
Huge Kudos to Mr AlexxIT - being able to pull that is game changer
thanks - I got this to work although the GUI is a little different now compared to the video. don't know how the heck I got it to work seemed to take a whole heap of keep trying but without this video, as a guide, I would never have done this in a million years! so thank you so much for your help :)
This was awesome and very simple, thank you very much. I already had HACS installed so installing AlexxIT Sonoff custom component was easy. I bought 3 of these SR26 Sonoff smart switches a few months ago with the intentions of flashing the firmware to ESPHOME. But it involved soldering wires to very small and cheaply built PC boards. So naturally, I screwed up the first one. But that to DrZzs, I salvaged the other 2 smart switches and am controlling my Christmas light with them.
Great video as always doc! Thanks for including my video!
Oh man, thank you !
I am no stranger to FTDI cables and flashing and uploading 3rd party firmwares, but I remember my horrid experience trying to flash my Sonoffs .... with 5 different PCB versions and all that good fun (then a broken FTDI adapter.)...
This one was a 2 birds with one stone experience. Now I have HACS that I was lazy to add and 2 new 4channel Pros I really didn't want to flash.... plus I upgraded my HA that I was avoiding for some time.
Works perfect !!!!
You should make a "Best of HACS" episode, going through the best ones you use from there. There are so many it is a bit hard to see which ones are cool and which ones are broken/bad. :)
You are a legend! I was on the brink of returning my zigbee hub and you just saved it! Thanks for your awesome content!
Your instructions were great. Got it working in about an hour. Thanks so much.
Amazing!! Thans! I accidentally bought Sonoff WIFI instead of Zigbee. Thought I will need to sell it, but I can make it work with your help!
I have been looking for something like this for a very long time... Thank you very much!
I can just say that for me, adding the country code had to be done in addition to the leading 0 of the phone number (unlike how you would actually dial the number).
Great add-on and tutorials!
If like me (new to Home Assistant) and you do this ... and wonder where the heck they are so you can set up actions....
They're not Devices. They're "entities".
So for automating something, this is an example:
Configurations | Automations & Scenes
Create Automation (button on bottom right)
Name:
Name: Kitchen Tablet charge ON
Description: Recharge kitchen tablet when the battery is low enough.
Mode: Single
Triggers:
Trigger Type: State
Entity: Kitchen Tablet
From: 0
To: 15
Actions (this was where I got stuck looking for devices):
Action Type: Call Service
Service: Switch_Turn_on
Targets: Name of your Sonoff Smart USB (or socket)
Thanks for calling this to my attention. I'm not opposed to flashing firmware, but I do like not having to do it. This made my latest home automation upgrade easier and quicker.
Specifically, I've got a number of lights in my living room that I just converted to smart using Sonoff BasicR2s. One thing I do with this is use the ambient lighting (wall-mounted, floor and desk lamps) for when I'm on Zoom and switch to the main ceiling lighting when I'm not. (The ceiling light casts a halo effect around my head which is misleading and confusing. :) )
Thanks for the info DrZzs! Working 100% in a few minutes a Basic RFR3. Gracias, Adios!
Seemed to work with another non-sonoff device I had in my ewelink account too. Exciting stuff.
excellent!
Hello from France !! Always a pleasure to watch your channel :-) I learn a lot of things everytime.
hello France!
thanks!
Nice video. If I can give my 2 cents: Anyone installing S31 plugs (more than one) I recommend to delete the Sonoff.json file. In my experience leaving the configuration as " reload: always" breaks the communication with all your previous S31(s) when you add a new plug. The only way that I can have multiple plugs connected (I have 3 currently) is by deleting the json file and restart HA.
When I say "breaks the communication" I don't mean it literally, HA can still toggle the plug on/off but the current and power readings are inconsistent.
so this does still use the cloud servers to initially grab the configuration data... - which means if sonoff drops the servers, this setup will fail (at least to add more devices) - if i flash to tasmota, there's zero cloud touching - the devices talk directly to your HA mqtt server and that's it.
Hello, thank you for your comment, I am new to homeassistant and have already integrated a few Shellys without an app, it works well. Now I need a 230v 20A+ power relay with power measurement. Do you have a recommendation that even a beginner can implement? I totally failed with TUYA LOCAL, thank you
That's great news, tomorrow I will try to integrate this in Home Assistant. Thanks so much for great videos. You're awesome Dr. Z
that's amazing... I was dreading for so long to re-flash these devices... that was sooo much easier. thanks a lot man
You rock, I got it up and running, home automation, here I come, thanks buddy
I got everything working according to this video but testing with an rf motion sensor it always shows as on in home assistant. I can manually set the state to off and trigger the sensor to change back to on. Does anyone know how to set the state to off with an automation?
Can you please make a video how to setup sonoff door and motion sensors trough the rf bridge with this great integration
Yes, please
Pleassseeeeeeee DrZzs...........
Thank you, Justin! I'm digging into the HA world. This video was quite informative.
Just a heads up, Sonoff LAN is listed in HACS now, so no need to add as a custom repo!
Great to see more local control :)
Nice, but seeing this tutorial makes flashing tasmota to a sonnoff actually looking more easier :-)
Hello! It turned out funny, I speak Russian and through you I found this author who speaks Russian. I went to study. Thanks!
ha! i knew you gonna love it :-)
but you forgot to stress the most important point: all the devices continue to work with ewelink!
great video, thank you
it worked for me, but I only see them as entities and not as devices, and therefore they cannot be used in automations
anyone knows how to solve this? (I am new to HA)
Hi. Did you solve this problem? I've got the same problem. Kim
@@kimnser8017 did you find any solution for this?
Yes I have the same issue. The only thing I'm thinking is it would have to be manually done for each automation which would be a pain.
Fantastic video as always just what i needed to bring last few switches into HA
Great job, very helpfull, thanks to the contributors. Had it up and running in less than an hour.
Sweet! I've been contemplating doing a garage door opener with the sonoff sv but haven't messed with sonoffs yet. I have no doubt I could flash tasmota or esphome but now that connecting it to Home Assistant without flashing is an option, I think I might just try it this way! Time to order a sonoff sv and a reed switch. ***Edit - Actually is that even possible?
Hi there, video needs an update, HACS install method has changed and Sonoff LAN is shown in HACS.
And Configurator is called File Editor now.
thanks... got some sonoff comming be replacing tuya with it if its good...
Sen bir adamsın, beni flash derdinden kurtardın hacı abi.
Does this work with the sonoff camera? Would be great if it does! Rtsp is great but pan/tilt locally would be awesome.
It's not working with sonoff camera.
Latest master (beta) version supports camera
@@AlexxIT thanks I will try it out.
Amazing, it works!!! Thank you Dr ZZS. :)
thanks @Drzzz!! excellent video. Regards from Chile!
A scholar and a gentleman! Thank you! :)
Is there a way TODAY to install HACS... Followed three different sets of instructions (even the official EVIL way with the script piping to bash) and had to reinstall Home Assistant 3 times... NONE worked.
Great but I love using Tasmota to be able to set my switched to switchmode 5 😀 Also flashing using Tuya convert or using DIY tools of Sonoff is easy
excellent! This is for folks who haven't had an easy time flashing for one reason or another. I'll still flash most of my sonoffs, but it's nice to have the option not to.
So will it work this same way as tasmotized? How to make automations and such? Can anyone help answering this?
top this works perfectly.
only the RF bridge is not.
he can see the bridge itself but not what I have connected to it.
such as a remote control and a door sensor.
help :)
I managed to add my Sonoff switch into home assistant, but when i toggle it on in HA it doesn't toggle the switch on. Any ideas as to whats wrong?
Same here.
If I understand correctly the little fib is that one still has to register ones devices with the ewelink cloud (has to make an account and communicate with their servers) so that this integration can find them. So what data ends up on ewelink servers?, some personal info, a list of all my devices, my public ip, maybe other info about my LAN gleaned from the ewelink app? Is there no way to just edit that json directly instead of depending on the ewelink cloud that you kinda promised one won't need. This still is not a 100% no cloud solution like DIY mode or flashing with Tasmota.
it seems this doens't work in Home Assistant 2021.12.10. You don't get the option to install the Sonoff tool.
Same issue
Hi, Loved your video and right away used this method :) works great.
One question: HACS itself appears as a device. The sonoff units underneath it are not. As far as I can see they are entities. So, how do I address them in automation? Scenes etc..?
Once again, Many thanks
The same question...
Great video I intalled all and works great, with the switch in UI.
BUT, I cat do any automation with it. I've read alexx instructions on github but, no way I cant understand what I have to write in automation.
Can you write a simple code to switch on sonoff mini when a buttun is pressed?
did you managed to solve this?
hi please i have a problem with lights entities, i can't access to lightning i think because my home assistant is running inside of a virtual machine.
what can i do to resolve this problem?
is it applicable to Sonoff wall switches T1, T2 as well?
Great vid, now we need something for Tuya!
Hi guys, what about tx serie? I recently bought a t2 3 gang and it should be much easier if I use the plugin.
Has anyone tried it?
Thanks for the video ! how to add a 2 code sensor(door) with the new home assistant setup?
Thanks for the guide! Managed to get it working, but I'm not so sure about the local control. When I block my Sonoff access to the internet with a firewall rule, it stops responding in Home Assistant...
The Sonoff Basic entity shows up in Home Assistant but not the device so I can't create automations that require a deice entry. How do I get this device to show up?
I have the same problem. There is a "Call Service/ send Sonoff command", but not sure what else to input. Possibly something like "turn-on/turn_off" and the device id, but if the syntax and terminology were incorrect it wouldn't work. Many possibilities.
edit: I just used a scene inside of my automation to get the device to turn on. ACTION - ACTIVATE SCENE - ENTITY (Sonoff device). You must first create a scene, choose "entities without device" and set the state of the entity - I made one for on and one for off. Might be a better way, but it works
I had same problem and with some help found solution:
in automation choose "call_service" and then "Sonoff: send_command" and fill service data with
device: 1000654387
switch: 'off'
to make off automation. If you need turn it on, just replace "off" with "on". Notice for device use only part after underscore, for me it was switch.sonoff_1000654387
How do you do this now with the latest HA? I can not seem to add the AlexxIT/Sonoff to my HA?
same issue here. Latest version of HA, HACS installed, Sonoff downloaded but cannot find the Sonoff integration
Does anyone knows why I am not presented with the input field for the access token?
Hello! I have 4 Sonoff Th10 and by integrating one by one in configurate.yaml I only get one. Thank you!
I'm too excited to finish watching the video (I will) can you get granular support for Sonoff pow r2?
Please help me with S-MATE. How can I setup it for control MINIR3 from HomeAssistant?
That hacs thing is not listed when I search for it.
I have the newest release installed and restarted several times.
Is it found any solutions for it yet?
/Hunter
It came a new release a couple hour after I posted here and then it was found in the search.
Great tutorial, I just try for connecting for sonoff pow elite to Home Assistant, but power, current and voltage not show, do you have idea for fixing that? trims
Hi, can somebody help me please to add the addon that need to change config file. I can't find no where the place to download an Addon. What do I wrong. ................
I use Home assistant of the last version and installed on synology.
Hello,
I have a question if we do not have internet in the room but we have wifi all sonoff devices will switch to this LAN mode - in this regard what happens to the devices in the home assistant?
Are they disappearing? What happens to scenes if the devices we set up in the home assistant have no connection to the ewelink cloud?
------
My question is related to the fact that I want to do automation that is local and if by chance there is no internet so that the scenes are not interrupted/disappearing.
Is this a solution using home assistance this way?
Thanks in advance!
I have Schlage smart lock on my front door, which is connected to remote lock, and they integrate with google home, Alexa and 1 more. How can we, make my Infrared finnleo 2 person sauna “smart” so it hooks up with google home smart hub or any of the smart hubs, so the when a booking is made it will trigger the sauna to turn on ?
It's really difficult to troubleshoot and work over comments. The best thing to do is to join our discord channel. Link in the description.
Hey, Love your videos and in particular this one regarding Sonoff. I have followed your instructions as well as I could, however, I think there have been some upgrades particularly to HACs.
I have connected HAC and the Sonoff add-on, have edited the config file. I can see it in my HACs addons but I cannot see any devices, not sure what I have done wrong at this stage.
Hello! I want to start by saying thank you for all that information you share with us through your videos. I really appreciate it! Keep up the good work! I am new to Home assistant and i am trying to connect my sonoff devices to homeassistant but SOnoffLAN repository is not downloading even after 12 hours. i am using latest version of Home assistant. Please help!
How would I go about to capture the pow watts used to not only store watts used for every minute but also infer the kwH consumed cumulatively over a period?
Hello, I am late in the game. Thank you for the video. I see that it is 4 years old. Is this still up to date? Is there a better way now?
For me a bit tedious process, as I am new to Home Assistant....but I definitely will look into that.
Took me a bit longer, but in the end - its definitely not hard to replicate!
Hi. I copied the folder/files into custom_components folder inside config on hassio and after restarting the server I still cant get hacs to show up on the Integrations list. Any idea what else I could do?
WoW! Excellent! thank you! I wish this existed before hehe
thanks for the video.
But how can I use RFID controller Sonoff in this case
looking forward to your answer.
I'm new in this "HA thing", but it worked just perfect!
Question: there are no HA devices for these sonoffs, just entities. Does it make any difference? Can/Should I create these manually?
Only thing I could notice until now is that I can only assign HA devices in the new Areas feature.
Thanks!
Hello. For some reason the "VAR" Sonoff is not detected in the yaml file... it gives me an error. Any idea why?
@DrZzs hello, i try use with MS01 humidity, only works switch, why i dont have stats humidity? ty
The Sonoff Micro shows as 4 devices because the chip is a 4 channel capable chip. The software supports it but the traces for the data channels aren't in use. Check out "Sonoff micro has a secret" on NotEnoughTECH's youtube channel around 4:45 in.
I love HA and your videos but this stuff NEVER, EVER goes smoothly for me. Even following step by step I tussle for 2-3 days to add integrations. I’d love to get rid of my SmartThings hub but the troubles I go through are priceless.
Enough ranting .
Great job Z!
This works greate with 10 sonoff t1eu. But how can i change from switches to lights ? I put the "device_class: light" but it says> This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.
If the entity is no longer in use, you can clean it up by removing it.
What do you use for your video editing?
For some reason mine refuses to connect to the eWeLink server to pull the devices. :\
I recently bought a Sonoff Zigbee Bridge. This is my first journey into the zigbee world. Now I am comfortable flashing devices (done it a few times I mean). So for the bridge I see that I can either flash it with Tasmota and go the ZHA route or use AlexxIT SonoffLAN. Is there any advantage of going each direction? Can someone please help me decide?
Great... the latest Home Assistant 2021.6.1 has simplified the installation.. It's available top of the integrations from HACS. That being said.. I have had a ton of issues after the install...
I've been busting my head here. I've used information for various videos you uploaded and everything worked like a charm. Took some guessing coz some vids are outdated but no biggie. I got the main idea and I've setup, rpi4 with home assistant, usb zigbee with 2 sensors and sonoff TXT3EU2C. everything working as indented with all your good advice and guidance, thanks a lot for that. I do have a question that I'd like you to cover on some next video to make my home "smarter'. I've tinkered with the automations and succeeded in all of them except the ones including sonoff wall switch. They are not displayed in "deviced" in automation, only as in Action: Condition, Condition type: State and then I can find them as entities. As state I enter switch.turn_on but they don't obey me. Perhaps I'm miss leaded somehow. I would love a guild about automation-script-scene and some cover on sonoffs in them. Thanks again, you helped me reach fast a good point of upgrading my home. :D
Hello,
I have installed the Sonoff on the Home Assistant.
On dashboard I can control all devices and it is working prefect but when I am using Node-Red it is not always connecting , I see randomly authorization problems… any ideas?
Hi, has anyone tried using the Sonoff SNZB-03 Motion Sensor using only this custom component? I'd like to buy those but I don't know if i will need a Zigbee hub / usb stick.
Is there a way to reflash a sonoff device back to Sonoff firmware?