Home Assistant ESPHome Sonoff - 3-Speed Smart Fan Convert

Тәжірибелік нұсқаулар және стиль

Part 1: How to convert a 3-Speed Desk Fan using a Sonoff Basic, a 2-Relay Module and ESPHome. Then, add it to Home Assistant... AND make it 'Smart' !
🎁Link to ESPHome Code: github.com/3ative/3-speed-fan...
In Part Two, we'll add back in the fans' buttons and some LED indicator Lights... Stay Tuned - Or Get Subscribed 😀 Now available... • Home Assistant: Ultima...
🎬 THE LINKS - Files / Help / Support:
- 🛒 Other files & Merch: store.3ative.com
- 💎 3ATIVE DISCORD: / discord
- ☕ Buy me a Coffee: www.buymeacoffee.com/3ative
- 💕 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 #esphome #sonoff
00:00 Into
00:17 3-Speed Fan Wiring
00:41 Preparing the Sonoff
01:26 The Relay Module
02:37 The Input_Boolean
02:52 ESPHome Programming
05:26 Testing the Relays
06:54 Putting it all together
09:53 Making it 'Smart'
12:45 Outro
~-~~-~~~-~~-~
Check out: "IKEA Air Quality Sensor: 7-in-1 ESPHome Update Hack"
• Hack the IKEA Air Qual...
~-~~-~~~-~~-~

Пікірлер: 106

  • @kal6392
    @kal63924 жыл бұрын

    Brilliantly explained. Thank you. Keep up the good work.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Thank you, I'm glad it was helpful! 👍

  • @sonny1977
    @sonny19774 жыл бұрын

    Great tutorial. Thank you for replying to my question on the Dr's FB group.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    You are so welcome! 👍

  • @Nippey
    @Nippey Жыл бұрын

    My two cents regarding tinning wires that go into screw terminals... Generally, tinning wires in any kind of terminals is not recommended, as the screw pressure will reduce over time as the tin will cold flow. This can cause all kinds of issues down to fire hazards. (In Germany, even regulated by DIN VDE 0100-520 and VDE 0100-520:2003-06) Then, there are two kinds of screw terminals: a) Screw touches the wire directly: Do not put stranded wire into these directly, use wire ferrules! The screw may cut the individual strands while turning, weakening the connection and you have free metal pieces in your circuit. b) Screw moves a small metal plate that clamps the wire: Okay to use stranded wire. Be safe! :)

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Indeed... In a later video (tutorial) I do mention how this practice is no longer acceptable. Also, in the updated version of this project, I no longer show 'tinning' the wires before connecting to terminals. kzread.info/dash/bejne/kYybrNuSp8_LmtI.html

  • @willhutcheon4144
    @willhutcheon41444 жыл бұрын

    Well done #3ATIVE! and thanks for sharing! Very well explained.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Thanks Will, I'm excited to share part2, when I put back local control of the Buttons and add in 3 status LED's In case you missed it, here's the demo: kzread.info/dash/bejne/doCIxpRvYNOen7g.html

  • @200501012
    @2005010124 жыл бұрын

    Awesome video. Good simple walk through. I'll be doing almost exactly the same on my oven hood fan soon but using a esp8266 and some relays.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Cool.

  • @pw0000

    @pw0000

    3 жыл бұрын

    Hi, do you have schematics and part numbers? Is your extractor motor running on pure 240V AC or does it have an AC to DC converted like mine? I will double check but I think my hood gets 240V AC from the plug and converts to 24V DC for the motor. I want to wire a Heltun V2 high powered relay with power monitoring to my induction hob, and then use a Heltun 5 channel relay to control the cooker hood, create an automation on Home Assistant that when the induction hob is drawing power the Heltun V2 senses it, then the hood comes on, and then turns off automatically after the hob has been off for 5 minutes. Depending on the hob's power draw I will program the automation to change the hood's speed. Interested to know your approach, thanks.

  • @MohammadAfwanulHakim
    @MohammadAfwanulHakim7 ай бұрын

    I am so in love with this basic to smart stuff.. ❤❤❤ Would you do a mixer/blender with time control? DIY Door/gate opener? DIY motorized hanging clothes etc..

  • @3ATIVE

    @3ATIVE

    7 ай бұрын

    🙏 Thank you, I believe there's only a few of us making this type of content. I understand both the Blender/Mixer and Door/Gate... But what does a motorised hanging clothes do??? :)

  • @georgei2480
    @georgei24804 жыл бұрын

    super cool, ill try to do this project on my own for sure.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Glad you found it useful. 👍 Once you've built your fan, check out my last live stream, where I make the 'Ultimate Fan' project to get the buttons working and and some LEDs 😎 kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @DB-nl9xw
    @DB-nl9xw4 жыл бұрын

    Thanks for the tutorial.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    You are welcome, I hope you find it useful / interesting. 👍

  • @koevoet7288
    @koevoet72883 жыл бұрын

    I wanted to do this and this literally came in my recommenced. Thanks it’ll be a lot easier now

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    Well that's cool. Enjoy. Also, if you want to add the buttons back in and have LED indicators in your fan (I've have to make a proper tutorial soon) But, I did a Live Stream - Check it out here: kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @koevoet7288

    @koevoet7288

    3 жыл бұрын

    @@3ATIVE oh thanks didnt wanna add LEDs but i do want the old buttons to remain functional

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@koevoet7288 Ah ok.. no worries - TBH the LEDs are not that useful for a remote controlled unit, I thought I'd add them as they used the same control lines as the relays and were easy to install. 😎

  • @koevoet7288

    @koevoet7288

    3 жыл бұрын

    @@3ATIVE ye thats true

  • @claudiudaba3858
    @claudiudaba38584 жыл бұрын

    Thank You !

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    My pleasure, I hope you find it useful - Stay tuned for part2 (in a few days) 😀

  • @rottison
    @rottison4 жыл бұрын

    great job and easy to follow I have one of the tall fans that has a knob that you turn and it has 1 2 3 for speeds on it have you done one of these kind?

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Thanks Dale. Hmm.. I'm vaguely familiar with those but, I haven't seen one in a while.

  • @zyghom
    @zyghom Жыл бұрын

    I did the same but I used Athom 4 Channel Relay so no soldering needed and only 1 device - it works great for my big fan for cycling with 3 buttons: slow, medium and high speed In the next iteration it will be controlled by efforts so i.e. heart rate ;)

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    That's cool. At the time I made this video I didn't know about ATHOM. Also, Check out the latest version of this fan convert series... I added the buttons back in and some LEDs!!

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Here you go: kzread.info/dash/bejne/kYybrNuSp8_LmtI.html

  • @zyghom

    @zyghom

    Жыл бұрын

    @@3ATIVE super nice

  • @willdwyer6782
    @willdwyer67823 жыл бұрын

    Most three-speed motors have two sets of windings. The switch turns one winding on for low speed, the other winding on for medium speed, and both windings on for high speed. This type of three-speed motor can often be automated with only two relays.

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    Quite possibly. However, since the fans I used have three speeds and three buttons, I wanted to replicate that function as closely as possible to make it easier for ppl to reproduce and understand. See one of my live streams, 'Ultimate Fan Project' where I put speed indicator LEDs in and wire the buttons in for local control.

  • @willdwyer6782

    @willdwyer6782

    3 жыл бұрын

    The button for high speed is wired to both windings, while the buttons for low and medium speeds are wired to each winding separately. If you have relays wired directly to each of the two windings, you can energize the relays either individually or simultaneously. Thus relay1 = low, relay2 = medium, and relay1 + relay2 = high. Eliminating the third relay for high speed would reduce the cost of parts for your project.

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@willdwyer6782 Yes, I understand but, If you watch my Live Stream, you'll see why I choose to do it this way: kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@willdwyer6782 This is the diagram for the fan I used, each speed is a sperate winding. Note: there is only one Capacitor: i.pinimg.com/564x/07/a5/ec/07a5ec4f5ed603133402b297d2140bae.jpg

  • @unlock-er
    @unlock-er Жыл бұрын

    Hiya, great video. Can you please confirm which mcp23008 that I should be getting? Some has diff number below the MCP number . So basically it has MCP23008 E/P, then below that it has 15031VU, some of them have diff ones. So not sure which one to get. Bit of guidance is much appreciated. Cherrs

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Hi there, Glad you liked the tutorial. The version where I use the Expander chip is V3.1: kzread.info/dash/bejne/kYybrNuSp8_LmtI.html And yeah, the chip I used is indeed the E/P version.

  • @unlock-er

    @unlock-er

    Жыл бұрын

    Ok. So as long as MCP23008 E/P be ok? Or do I need to get any specific one? Cheers

  • @unlock-er

    @unlock-er

    Жыл бұрын

    @@3ATIVE Thanks, so should I ok if I just get any MCP23008 E/P with any number below? or is there a specific one?

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    The "MCP23008 E/P" is the part number and spec... All those other numbers manufacturing stamps, dates, locations, etc

  • @TradieTrev
    @TradieTrev4 жыл бұрын

    Top mod job regardless, she's like a bought one!

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Cool, thanks. Wait til you see what I do with it next. Here's a demo: kzread.info/dash/bejne/doCIxpRvYNOen7g.html

  • @venkatesanmurugan3931
    @venkatesanmurugan39313 жыл бұрын

    Perfect. how can I adjust fan speed control in Esp home kindly advise or provide a good tutorial video

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    Thanks. 👍 For basic speed control, check out 'Chapter: Testing the Relays' @05:26 - There I show the 3 ESPHome switches that are part of the code. You can use those in your Home Assistant Dashboard if you want. For the next 'Episode' of this project, I did a more comprehensive Fan tutorial. It's a Live Stream and I do intend to make a 'Stand-alone' tutorial soon. Please check out that here: kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @venkatesanmurugan3931

    @venkatesanmurugan3931

    3 жыл бұрын

    @@3ATIVE thanks you...

  • @DB-nl9xw
    @DB-nl9xw4 жыл бұрын

    How would you automate IR appliances like AC?

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    One of the most popular integrations: www.home-assistant.io/integrations/broadlink/

  • @DB-nl9xw

    @DB-nl9xw

    4 жыл бұрын

    @@3ATIVE thanks looks great

  • @DB-nl9xw
    @DB-nl9xw4 жыл бұрын

    Is there home automation for your shower? Like to turn it on or off?

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    You 'could' automate a Wi-Fi enabled breaker to the main shower feed. *** I would advise AGAINST messing about in the shower unit its self. ***

  • @DB-nl9xw

    @DB-nl9xw

    4 жыл бұрын

    @@3ATIVE Kohler has released some smart shower that you can control temperature and flow. Also they have a automated faucet. How can I do something similar?

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    @@DB-nl9xw I can't see any need for an automated Shower, being that you'd be standing right next to it. 😂 An automated faucet could be useful if combined with a Bath water level sensor. So, imagine something like this could be used: amzn.to/2Z6KLtE

  • @simondgie1
    @simondgie14 жыл бұрын

    What file editor are you using? I much prefer the black background.

  • @simondgie1

    @simondgie1

    4 жыл бұрын

    Found it in "Themes" :)

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Are you asking about VSCode?

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    cool

  • @simondgie1

    @simondgie1

    4 жыл бұрын

    Love those animated icons too. P.S, you should consider using pin crimps for your terminal connections, it makes life easier, especially when testing. Nice video, some great tips there in creating sensors from sensors, thanks.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    @@simondgie1 I plan to do some 'How-to'' videos on those animated icons soon. Yeah, not being able to get that attribute in ESPHome, stumped me for a while... I'm quite proud of my making a sensor for a sensor workaround. ☺️

  • @simondgie1
    @simondgie13 жыл бұрын

    Hey mate, why do I not have a _setup directory, like you do at 10:30? What is that full path?

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    I have split my config up and I use '_setup' just to organise the folders. The '_' just makes it appear at the top and 'setup' is just a logical name for where all my setup files (.yaml) and folders are.

  • @simondgie1

    @simondgie1

    3 жыл бұрын

    @@3ATIVE OK, so I want to do something similar where I create a battery sensor from each of my Wyze door sensors. So where should I place the corresponding yaml file for each sensor?

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@simondgie1 If you haven't split your config.yaml then they would go in there under the 'sensor: ' section.

  • @simondgie1

    @simondgie1

    3 жыл бұрын

    Cheers mate

  • @simondgie1

    @simondgie1

    3 жыл бұрын

    www.home-assistant.io/docs/configuration/splitting_configuration/ I'm assuming this is what you mean by splitting the config.

  • @TradieTrev
    @TradieTrev4 жыл бұрын

    In Australian electrical standards it's written that you shouldn't solder connections under a screw terminal 3.7.2.5 from as/nz 3000:2018. Don't know who said those other tiny terminals are crap, they clearly don't know what they're talking about mate.

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    I saw a post on Facebook about this - So, I looked it up. Soldering used to be the normal but now it's frowned upon. That's cool, it'll save me a lot of time! 😁

  • @TradieTrev

    @TradieTrev

    4 жыл бұрын

    @andilge that's why you use bootlaces.

  • @MarkJones-lr2lk

    @MarkJones-lr2lk

    4 жыл бұрын

    @@TradieTrev Agreed, I recently bought this set and have not looked back ... www.amazon.co.uk/Preciva-CP621200-Crimper-Self-adjustable-Crimping/dp/B073TZ5BBG?ref_=mh_s9_apbd_otopr_b27DJRf&pf_rd_r=SQYKX7JHEENTT99N1T6H&pf_rd_p=4185a3f2-86b6-5266-bdd4-fc5dae0483a3&pf_rd_s=mobile-hybrid-11&pf_rd_t=BROWSE_ANYWHERE&pf_rd_i=1938873031

  • @grommet20002000
    @grommet200020003 жыл бұрын

    I used a sonoff 4ch

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    Cool 👍(Although far more expensive) This was really "Part One". In part two, which was a Live stream, I added indicator LEDs and the fan's original buttons back in to make the "Ultimate Fan Project" ! Check it out here: kzread.info/dash/bejne/c32po8d7ddmrd5c.html total cost - Less than £10 (ex the fan) 😉

  • @Leonvolt28
    @Leonvolt283 жыл бұрын

    It would be cool to add a slider in home assistant to choose the speed.

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    Not hard to do. I have updated code in ESPHome that reads in a slider (set from 0 to 3) to control the 3 speeds.

  • @Leonvolt28

    @Leonvolt28

    3 жыл бұрын

    @@3ATIVE that's great

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@Leonvolt28 Check it out: imgur.com/ZB4x2yq

  • @anhang4704
    @anhang47043 жыл бұрын

    If it can be used with 3 switches, it will be very good

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    What '3 switches' did you have in mind??

  • @anhang4704

    @anhang4704

    3 жыл бұрын

    @@3ATIVE button fan

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@anhang4704 If you're talking about a 3-speed fan, like the one I showed here and want to add the button function back in (plus some indicator LEDs) I've done that, it was on a Live stream, check it out here: kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @delboytrotter7902
    @delboytrotter79022 жыл бұрын

    Great tut (i think lol) ok, so i loaded up the code and flashed it to my sonoff basic, all went ok. BUT my basic now flashes green constantly, and if i press the button the relay doesn't click on/off....also, when i create my input booleans in HA clicking them does nothing either. When i check on my esphome page my sonoff has connected to wifi. So, have i made a daft mistake, or am i a complete idiot lol Any help would be greatly appreciated, as this is a great project and it's something i'd love to get working. Oh, and i forgot to mention that i've not got a logic shifter thingy as i'm not too bothered about the led's.....do i need to alter the code to take that into account, and if so, what lines would i need to omit ?

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thank you Del boy Trotter. 👍 As for why the Sonoff is flashing, it sounds like the Home Assistant ESP integration hasn't found your device yet. So, check the integration for what ever you called your fan and if it's not listed, try adding it manually with: [your fan name].local

  • @delboytrotter7902

    @delboytrotter7902

    2 жыл бұрын

    @@3ATIVE Thanks for your quick reply....i'll try that

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    @@delboytrotter7902 No worries, lemme know how you get on.

  • @delboytrotter7902

    @delboytrotter7902

    2 жыл бұрын

    @@3ATIVE I've got the sonoff online now....i think it's the HA part that i'm not understanding. I have created input booleans via helpers, but when i click on them nothing happens, and i can 'turn on all 3 speeds' at once (if it worked i could lol) any one speed isn't cancelling out the other, like yours do. I'm missing something, probably (hopefully) simple. I think i maybe have to add something in config.yaml, but i'm fooked if i can figure out what Thanks for your help :)

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    @@delboytrotter7902 In this (old) version I only use one Input Boolean - That's is 'Master' for turning the Fan on/off. The three 'Speed' switches come from the ESPHome Code... and it's that which is doing the 'interlocking' (Turning other off as you switch each one) So: 1. Should only need to make one Input_Boolean in Home Assistant 2. Unless you get the Sonoff/Fan connected to Home Assistant, you won't see the three 'Speed' switches. Also, I've just realised... I never shared the ESPHome Code!!! OMG, I can't believe it! I've now added it to the Video description and here's the link for you too: github.com/3ative/3-speed-fan-convert

  • @mediacowboy9245
    @mediacowboy92454 жыл бұрын

    When will part 2 with the LEDs be coming out

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Work has been crazy recently. However, I'm hoping to get a few videos out this week.

  • @mediacowboy9245

    @mediacowboy9245

    4 жыл бұрын

    @@3ATIVE I bought the sonoffs and relays this weekend to do the same setup. I'm also keeping your candle light project on the back burner as I really likes it.

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    @@mediacowboy9245 Sorry for the delay in replying - I did 'Part Two' on a Live Stream: kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @willdwyer6782
    @willdwyer67823 жыл бұрын

    I'm going to try this on a ceiling fan with a three-speed pull chain switch.

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    How did you get on, with your Fan?? Also, in case you missed it, I did a live stream where I added speed indicator LEDs AND added the fan's buttons back in: kzread.info/dash/bejne/c32po8d7ddmrd5c.html

  • @reesericdotci
    @reesericdotci4 жыл бұрын

    Bitwarden Reese has entered the comments

  • @3ATIVE

    @3ATIVE

    4 жыл бұрын

    Welcome. 😂

  • @cankantarc6507
    @cankantarc65073 жыл бұрын

    N,ce v,deo

  • @3ATIVE

    @3ATIVE

    3 жыл бұрын

    Thank you. Check my last Live stream, where I take it a stage further and add the buttons back in! - kzread.info/dash/bejne/c32po8d7ddmrd5c.html

Келесі