WLED on a Sonoff - Part1 - Hack and Flash
HTML-код
- Опубликовано: 26 авг 2024
- Using Aircookie's (standard) precompiled .bin files, Let's install and setup WLED on a Sonoff Basic. With just a small hardware modification, it'll run WLED LED strips with ease !!
As WS2812 LED strips still consume power, even when not lit (about 1mA per PIXEL)... We'll also make use of the Sonoff's internal relay to switch a high power external power supply on/off - potentially saving huge amounts of energy when not in use!!
Make sure you use the 'WLED_0.xx.x_ESP8266_1M.bin' version, which you can download from here: github.com/Air...
🎬 THE LINKS - Files / Help / Support:
- 🛒 Other files & Merch: store.3ative.com
- 💎 3ATIVE DISCORD: / discord
- ☕ Buy me a Coffee: www.buymeacoff...
- 💕 PATREON: / 3ative
- 💯 Get the Gadgets, Devices and Tools I use: Amazon UK: amzn.to/3uRw8fi
* As an Amazon Associate I earn from qualifying purchases. Using this link ⇈ provides small monetary support for my channel at no extra cost to you.💖
#homeassistant #sonoff #WLED
~-~~-~~~-~~-~
Check out: "IKEA Air Quality Sensor: 7-in-1 ESPHome Update Hack"
• Hack the IKEA Air Qual...
~-~~-~~~-~~-~
With regret - The design of the Mini's internal power supply is too dangerous to make the 'WLED on a Sonoff Mini' tutorial public.
Yeah .. you have live power in the esp pinout... quite nasty.
@@GliCidO Totally, the two terminals that make it usable make it lethal. LOL
Damn that’s a pity, guess I’ve got a unit that pretty useless right now
That's a pitty
I was hoping for a tutorial on the Sonoff Mini as I am looking for a WLED device in a case with a 230V input (for switching to the next effect). Can anyone recommend a good alternative? Or send me the directions on the Mini in a private message?
An elegant and very well explained tutorial! Thank you for showing this 😀. Cheers
👌 You are most welcome. Thank you for the kind words Shaun. 👍
Hadn't thought of this, great hack! Thanks
Thanks, glad you like it... 👍
- Have you seen 'Part2' yet?
@@3ATIVE I actually saw part 2 first. I have a few sonoff basics lying around so may give it a go. I have several dig-uno boards but this is a simple solution..
@@thierry3610 Cool, yeah the digs are good and that but, they can't turn the PSU off - that was my main reason of doing this... No point in powering a huge PSU when the LEDs are not being used.
Great job! Definitely looks newbie mod friendly. Can't wait for the Sonoff Mini video!
Cheers Jeff. Glad you liked it.
.....Thanks you so much great Idea......👌👌👌😍😍
Cheers Brian, I'm glad you like it - and I hope it's helpful and useful for you. 👍
As always, well explained. Thank you.
Thank you Emilio, I hope you find it useful. 👍
Very nice video I am looking forward to more it is so helpful thanks
Thank you Bob, I am glad to hear you liked it. Was it easy to follow to build your own?
I can't wait for the SONOFF Mini WLED Tutorial. I wish there is no soldering required
I'm debating whether or not to release the Mini tutorial - as there's a safety issue.
Because of the way its internal PSU is made (i guess to keep the size down) the pins we need to connect to (S1 & S2) sit at half mains voltage. So, unless some extra preclusions are taken, there's a high risk of electric shock.
Sorry - Please read the pinned comment, I just posted. 😢
@@3ATIVE True, I believe nothing is precious than human life and when it comes to safety, I really appreciate the reason for which you're not sharing the tutorial. But I have one request: Can we make a safe custom DIY single-board solution with NodeMcu or ESP01 which can solve the same purpose? Something compact and beautiful. Finally thanks for all your efforts.
@@DibyadipDas Thanks for the understanding - Yeah, the last thing I want is for someone to get hurt (or worse).
As for the single board solution - Does the Sonoff Basic not cover the criteria
When you releasing the tutorial on how you got WLED working on on Sonoff mini.... the firmware you used would be super helpful
Yeah sorry but, it's too risky.
Great tutorial, shame about the mini one but this still works for me. saves faffing about with nodemcu's and still having to turn the power off via another means which kills everything.
Hey Simon, I'm glad it's gonna be useful for ya ❤
- When you consider WS2812's still consume about 1mA each, even with the LEDs off - People with large setups could save a huge amount of power!
@@3ATIVE yeah tell me about it, gonna do loads of lighting over the next few months hopefully in time for Xmas, this will help loads.
@@krannock7 I've just ordered a load more Sonoff Basics. Not for holiday lights but for in my home. LOL
@@3ATIVE Pandora's box is open, the beast is out lol.
@@krannock7 RUN FOR THE HILLS!!! 😂
I see big limitations in 1mb fw , this option has many limitations no more support in future. Better options is run separate esp next to sonoff basic. It cost more 2$ for that esp.
I see it more in the way of it being controlled from something like XLights. These make cheap induvial installations .
Even so, there are still enough options & effects to make it viable.
Great video thanks!
I cannot find the WLED on sonoff mini video? Has it been uploaded?
Glad you liked it, thanks for the feedback. 👍
While I successfully installed and ran WLED on a Mini - I decided not to release the video. The contacts, aerial and a few other 'touchable' parts were at half Mains voltage and I wasn't comfortable with advising people to do it.
@@3ATIVE I hope yo urelease the video, it's possible to power the mini with 5V with a mod (Italian tuto's on RUclips), so it is not so lethal anymore 😁
@@ronnygyles3784 Yeah but, where would you get the 5V from?
Congrats! Verry cool! ESP8266 or ESP32 ...which one is better for WLED ? Keep it up!
Thank you. 👍
Either work just fine but, if you're going for Hundreds and Hundreds of LED's ESP32 would be a better choice.
This video is great. I was looking for a way to control the power supply, so the LEDs weren't drawing power when off. This looks like a straightforward and elegant solution for that. The only issue I'll run into is needing an IR receiver, so it can be controlled without having to use an app or voice command. Does anyone know where GPIO4 is on the Sonoff Basic R2?
Thank you. It's good to hear you like(d) my tutorial and I hope it was helpful.
As for GPIO4 - There are no tracks connected to that pin on the ESP chip😒
- But, if you've got good soldering skills, you may be able to attach a wire it.
See this image for the location: evertdekker.com/wp/wp-content/gallery/sonoff/p1010285.jpg
@@3ATIVE awesome... thanks for the quick reply. i'll go with my nodemcu build for now, because I pretty much have that working as expected (except switching off the power supply). Once I receive the Sonoff Basics, I'll give soldering to GPIO4 a try. If I can't get that to work (for whatever reason), I'll look into compiling WLED to use another GPIO for the IR receiver.
Thankyou soo much, I was looking everywhere how to flash wled on a Sonoff. I've read the latest version does not support the basic due to its flash size, is this true?
You are welcome - I'm happy it helped you.
ATM the latest is WLED is version 11.0 and I can say that it still works on a Sonoff Basic. The file you need is "WLED_0.11.0_ESP8266_1M.bin"
Very good idea and very clearly explained! Can I also use this technique to connect 12V LED strips?
Thank you for the kind feedback. 💕
As for the 12V LED Strip - Assuming your strip is NEOPixel / Individually addressable LED's and not just RGB... Then sure! Where I show a 5V PSU, you simply use a 12V one!
@@3ATIVE Yes I'm planning to install some WS2815 strips. With Sonoff everything gets that much easier. No 12v to 5v conversion, no extra relay and everything in a good looking box. Very nice! I think wled should consider documenting this officially. The only downside is that Sonoff basic doesn't come with esp32, but for everything else I think it's the best choice.
@@MrTTDARK Cool, then you're good to go. 👍
I think it's everything you need - If you don't need huge displays with 1000's of LED's.
Being able to switch off the PSU when the LED's are off is a deal-breaker when you consider each LED will still draw about 1mA, even when not lit - not to mention running a big PSU 24/7 ! 💥
@@3ATIVE I just bought a new Sonoff. Although it says BasicR2 on the outside, the inside looks completly different. The pins are oriented horizontally and there is no hole with GPIO. only 3v3, Rx, Tx and ground. The board says Sonoff RF R2 POWER V1.3. 2019.08.16. But I don't think that I have ordered the RF version... It has a trace with solder on the back for live wire but also the thick wire for neutral.
@@MrTTDARK That's fine. I have the same ones here from my last order - Flash it in the same way.
The GPIO 2 is on the bottom now, a bit of a pain but still useable, see here: imgur.com/a/TItuSpf
Nice and clear tutorial. Will this also work on a TH10?
I wasn't able to find GPIO2 on that - So no, not without writing a custom version of WLED to change the output or 'data' pin.
*** BUT WAIT!!! Coming soon, a version of WLED will be released that has an output selector option built in the interface. From that you'll be able to pick which GPIO pin it uses.
@@3ATIVE Nice. Thx for the info.
the Resister mod - is there another way to do it without it? im too lazy to drive to the shop to get one and online takes too long haha
If you want to use a 'standard' .bin file, then you'll need the resistor because if GPIO2 (the pad used) is held low, the Sonoff won't boot up.
However, and this is more work, you could, or get someone to re-compile a .bin that uses another GPIO pin - Say Tx or Rx.
That's really awesome. Do you happen to know if it's possible to pull off on Sonoff Basic R2 (non RF version, it's a bit older model)? PCB design is quite different, and the header pinout has been changed as well. GPIO2 is not there anymore, GPIO14 is. Not even sure if the GPIO2 is being used, I can't see any tracing and it's difficult to use multimeter since the pins are super tiny :P
Either way, thanks for the video.
Thank you, I'm glad you liked it.
As for your Sonoff... Sorry no, without a custom 'bin' file to change the GPIO pin to 14.
I'll be sure to stick to the ESP32 and relays for now then, until I get a better understanding of how it all works. Thank you for taking the time to help!
@@vex9596 Sure but, a Sonoff basic is cheaper and neater !! LOL
@@3ATIVE Hmm, you sure ? ESP32 (I tend to use WROOM-D version) costs around 3.5$, whereas Sonoff basic costs twice the amount or more based on a quick peek at AliExpress and Banggood. No arguement about Sonoff being neater though, definitely wins that point :P
@@vex9596 LOL - Well, if you factor in the ESP board, relay, psu and wiring - I [think] the Sonoff is cheaper.
How many LEDs will this control? Or does it depend on te output of he power supply? Great tutorial! I haven't used WLED yet, but when I do I may use this method.
Thanks Mike. 🖐
WLED ( the software) has a hard limit of 490 LEDs. Obviously you will need a power supply that is capable of powering that many LEDs too.
@@3ATIVE In the WLED software I don't see any software limits, and if I try to configure it for 9999 it gives a warning stating that for every 1000 leds you should use another esp module to avoid stability and lag issues.
Where did you find this 490 limitation?
@@johnreese7986 I think the main problem is data rates. Too many LEDs would exceed to speed of the output.
So I'm trying to this (hardware is orderd) and a thought popped in my mind, is this possible with a S20 or S26? Would be handy if one uses a adapter for smaller projects.
Cool - Enjoy.
I've never seen inside either of those Sonoffs, so I can't advise if the relevant GPOI's are available. Either way you will still need an external PSU (to power the LEDs) and I would imagine it to be more work and possibly cost more. 😊
hi, my sonofff basics, bought a while back have gpio 14 next to gnd? can this be used? doesnt seem to be gpio 2 on this one? thanks
Hi, yeah they sound like version 1 Basics. Sorry no, without a custom .bin file to change the GPIO pin to 14 this won't work for you.
Another great project....i've just done this, and they're fab (it's my first use of these led's) I have a lil problem tho......for some reason, my wifi credentials are not 'saving', so i have to configure everything again if i turn off the power. Any ideas ? I THINK I know what it may be, but i'll wait to see if you can come up with anything. Thanks for your help 😀
Thanks Del boy.
Yeah all my WLED projects are on Sonoff Basics too - I don't need anything else. As for not appearing to save you deets:
1. Make sure you hit the "Save" button on that page
2. Give it a least a Minute before testing a power cycle - Most ESP projects wait for a minute or so before actually saving setting to the on-board memory (to save on write cycles)
@@3ATIVE All sorted.....i think i was using the wrong firmware. I ended up using the direct link that you posted further down in the comments. It could be a coincidence, but I'm all sorted now.
Thanks for taking the time to reply, i really appreciate it.......On a side note, you haven't got time to answer idiots like me, get your arse into gear and get some other good projects uploaded😀
Thanks again !!
@@delboytrotter7902 Excellent news, enjoy.
LMAO - Yeah, it's a 'hot minute' since I've had an upload. Rest assured there are loads of projects still to come - I haven't stopped.. 🤣
@@3ATIVE Great stuff, can't wait
hi the new release of WLED 0.12.0 "Hikari"!
This version's highlights are
Pins and LED type can be configured at runtime. No more custom binaries for pin changes
would that allow sonoff V1 to be used now ?
Yes, that would make it easier to use 'other' Sonoff devices.
How to make this work for example using Wemos D1 mini powered by USB with WLED powered by different source? I am electrical noob. Pardon my question.
Just follow the steps in the video. You don't need a D1 mini or USB power supply, the Sonoff Basic has both already.
Could this be also done with a sonoff sv?
I don't see why you would want to... and how are you going to power SV?
Is the point of this just to add a relay?
Yes and to make it clean and compact
Great video. i used this for my Chritmas tree lights.
Is it possible to put WLED on a sonoff basic RF3R ? WIFI version
Thank you and yes, that's just the sort of application I meant for this. I have mine controlling various lights around my place.
As for the R3 - I had a quick Google search and yes, it seems you can. I found this page with more info and it should help with where everything is: github.com/arendst/Tasmota/issues/5921
@@3ATIVE well impressed with the quick response. Thank you.
Me been me I did do a search and found some information as I couldn’t remember the pins for flashing on the R3.
Anyway I gave it a go and I have it working. Now I have converted a free standing IKEA up light with WLED and I can switch it from a rf wall switch.
Yippee. Top man thanks again.
@@headingeast Hey Gary - where did you find GPIO2? - thx
@@jacqueszeeman4062 it’s near the push button switch
@@headingeast Thx Gary -- No idea how you found it but works awesome - great video @3ATIVE VFX Studio
in wled 12 does power switch still activate relay its not working automatically on mine any help would be great.....
In the settings > Led, make sure you have the "relay pin" set to 12.
@@3ATIVE Also Set button as 0... Awesome video...
@@jacqueszeeman4062 Button as 0, Indeed. 👍
Thank you, I'm glad you liked it.
Hi all, thanks for the tutorial. Using the latest 0.11.1 wled version it seems that something is wrong becouse the WLED-AP isn't stable (bootup looping). Can kindly share the reference version of the firmware you are using ? Thanks a lot.
In this video I installed 0.10.2 but, since then all my devices have been updated and now use 0.11.0
@@3ATIVE Thanks for the quick answer. I'm using sonoff basic R1 maybe there's something wrong with this version.
@@FulvioSpelta Maybe... If you can, try swapping hardware and or WLED version(s)
@@FulvioSpelta Hi, apologies for contacting you like this but I couldn't find any other way, hopefully you're still there. Followed the great work you posted on Github getting WLED working with the v1 and mine works with the bin you kindly shared. I now want to connect this to an apa102 strip which needs clock and data but not sure whether your version will do that and if not what I need to do to fix it. Any help would be much appreciated.
Hello..., have you try flashed sound reactive wled firmware into sonoff basic with this method?
Not really, as A0 (audio-in) pin for ESP8266 is not available on the Sonoff.
@@3ATIVE at latest release changslog audio input pins can now be configured in the UI from the sound settings page. Maybe it's possible to change pin A0 to available pin on sonoff basic, or that feature only for esp32?
@@tinussetiawan7484 Hmmm... I'm not sure the 8266 is powerful enough to read audio data from anything other than the dedicated analogue pin though.
If you do try it, hop back on here and let us know how you got on. 👍
@@3ATIVE okay 👍
Quick question... will a 22k Ohms resistor work ?
That should be fine, it's only 10% difference. FYI, the resistor is only used to pull the GPIO pin high so the ESP will boot, as some LED strips will pull it low.
@@3ATIVE my flashed sonoff has a red led always on....I've added a 22k resistor. Any idieas why ?
@@NunoSoares22 I'm not sure, I've never seen that. What Sonoff device are you using?
Hi, i guess the Facebook post deleted. Anyway, does it have a level shifter? Because when I use nodemcu without a level shifter the light flickers
Not at the moment but, if the video seems popular then I will do a 'part 2' where I add one. 😎
@@3ATIVE so sonoff doesn't have it build in? I was hoping it was already build in it. That would have been perfect
@@TheBello2009 Shifting the Logic level is easy and cheap thou.
- In 'part2' of this project I'll be showing different ways to make your own LLS.
@@3ATIVE looking forward to part 2 :D .. already converted one sonoff basic that was laying around to wled. Thank you.
@@GliCidO Part 2 - adding a Logic Level Shifter to the Sonoff Basic will be up in a day or so... Stay tuned!! 👀
Will this work on a Sonoff RF?
For the basic functions (on/off) yes. However, you won't be able to control WLED from; Home Assistant, the WLED APP or Xlights as they all use Wi-Fi.
@@3ATIVE I was asking the on/off function of course :) Didn't know if the IO2 was free also in the sonoff RF.Great.
@@GliCidO So you wanted to know if the Sonoff RF has an on/off function??? Well, yeah... that's kinda it's whole reason of being - It's a remote controlled relay. 😎
Where I got confused is your question: "will [THIS] work on..." And as this video is about putting 'WLED on a Sonoff Basic' then the answer is still no - for the reason(s) I gave previously. 😉
Is it possible to integrate this to Home Assistant?
Sure, HA and Node-Red will both give you control of WLED. 👍
@@3ATIVE Its a great project, but i have different PCB of Sonoff Basic, only 4 pinout, GND, TX,RX, 3V and Gpio2 is a tiny dot on PCB, is it possible to change the pin Gpio2 to TX or RX in that project ? In other pcb i use RX for DHT sensor and its working. i have RF RA POWER v 1.3
@@dmitrilorents Yes that's the same as I show in the video - GPIO2 is just a pad on the underside.
'Normal' WLED firmware is set for this GPIO2, If you want to use Tx or Rx you will need a custom .BIN file made, which I cannot help with - Sorry.
Board that i have
@@dmitrilorents 👀
Hi, can you share what sonoff version are you using?
It's the R2 or second version
@@3ATIVE Thanks a lot for answering. Will this work on R1 Sonoff basic?
@@jeucedahn While the software will work, the R1 only has GPIO14 available (not GPIO2 that WLED is configured for).
- To use an R1 you will need a custom .bin file made.
@@3ATIVE thanks for taking the time answering, very good video keep going man! Regards
@@jeucedahn You are welcome my friend and thank you for the kind words. 🖖
whats up m8 I havent been around much glad to see your still carrying hit me up on facebook
Message sent 👍