Home Assistant: Simple relays with ESPhome

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 พ.ค. 2019
  • As part in my effort to replace my underfloor heating control I’m taking a look at cheap rely boards from China. I wanted to design something myself but with how cheap these boards are, that’s not really useful anymore, let’s take a look at how to hook them up and if they work well combined with an ESP32, ESPhome and Home Assistant!
    Come and hang out with us at the Intermittent Technology discord server, click here: / discord
    ░▒▓[Associated blog post]▓▒░
    blog.quindorian.org/2019/05/h...
    Mentioned videos:
    Multi-Room temperature sensing: • Home Assistant: Cheap ...
    Tuya-convert power plugs: • Home Assistant: 10$ Wi...
    ░▒▓[Information & Shopping links]▓▒░
    1x, 2x, 4x or 8x Relay board with Optocoupler and 3.3v trigger: geni.us/dRYwMJK
    MH-ET Live ESP32: geni.us/4OZdAj
    Wemos D32 Mini: geni.us/9aXV
    Good Micro-USB cable: geni.us/4Yqui9t
    Good Phone charger that can deliver 5v 2A (10w) on a single port: geni.us/TiSqB
    ░▒▓[Music]▓▒░
    Intro&Outro
    TheFatRat - Xenogenesis
    ( • TheFatRat - Xenogenesi... )
    During Video
    Jahzzar - Deja Vu
    ( • Jahzzar - Deja Vu [Syn... )
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 56

  • @IntermitTech
    @IntermitTech  5 ปีที่แล้ว +36

    It seems I might have messed up some (confusing) terminology in the video!
    So, NO is normally open and that means *no* power will flow when there is no power on the relay, and will flow if if the relay is switched on... NC is not normally closed but Normally Connect, which means without the relay on, power will flow.
    The terminals depicted in the video (for instance at 6:56) and other explanations still apply just the terminology got reversed.

    • @timderks5960
      @timderks5960 5 ปีที่แล้ว +13

      I've never heard NC being called normally connect, anyone I know or follow calls it normally closed. Normally closed also makes sense, since you're talking about a circuit. A closed circuit will flow, an open circuit won't.

    • @MrFurriephillips
      @MrFurriephillips 4 ปีที่แล้ว +2

      LOL, I'm glad you clarified this, as I did a double-take!

  • @MrPSummerfield
    @MrPSummerfield 5 ปีที่แล้ว +2

    Hi Quindor, thanks for a informative video. You're making me spend my money 😄. I've order quite a few relay boards, keep up the good work, your videos are great.

  • @sermayoral
    @sermayoral 5 ปีที่แล้ว +1

    A really good video! I'm learning a lot with them. Thanks for your effort!!
    I'm very curious to see how the system is finally. Waiting for the next part :-)
    Regards!

  • @alexscarbro796
    @alexscarbro796 4 ปีที่แล้ว +6

    It should be noted that the current rating for the relay will probably be for resistive loads.
    If you are switching a motor or other “reactive” load, the rating is often a LOT lower, e.g. Maybe 1A or less. So it’s always best to understand the load and check the relay specifications, otherwise it’s switching life may be significantly shortened.

  • @viniciusnoyoutube
    @viniciusnoyoutube 5 ปีที่แล้ว

    Awesome video!

  • @htcheroportugal
    @htcheroportugal 5 ปีที่แล้ว

    nice work.

  • @Jay.M
    @Jay.M 5 ปีที่แล้ว

    Hi I just wanted to say I love your channel and these videos. I don't usually use affiliate links and this will be the first time I do. I really appreciate your information since I'm new to this. Would be good if you documented more in the blog though so i didn't have to keep revisiting these videos since they are quite long.

    • @IntermitTech
      @IntermitTech  5 ปีที่แล้ว +1

      Thank you and much appreciated, it's a lot of work writing both the blog posts and making a video about it. But it's good to know people also value the written form, I'll try to think about what I can do to get more information into the blog post without costing even more time. 😅

    • @Jay.M
      @Jay.M 5 ปีที่แล้ว

      @@IntermitTech of course! Maybe just dot points? I saw on the blog post you mentioned a DC to DC converter but I'm not entirely sure how to hook that up :( only ordering tonight though so I'll have a few weeks before it comes here to figure it out haha

  • @cassio2999
    @cassio2999 5 ปีที่แล้ว

    It's the 1st of Maj at 12.00 and The Netherlands like Denmark are checking the Sirens

  • @tomar5e115
    @tomar5e115 5 ปีที่แล้ว +1

    Gotta think about safety too. Bet that Honeyeell controller has some smarts in it to identify faults with the system and shut off the valves in that event. What if one of your relays was locked closed? Would it stop heating or just keep running hot?

    • @IntermitTech
      @IntermitTech  5 ปีที่แล้ว

      Worst case in my application would be that a valve would stay open, the pump would keep running or the heat pump would continuously get the signal that heat is desired.
      In the case of an open valve, that's no issue really and the circulation pump would still shut off so it makes no difference if a valve would get stuck.
      If the pump keeps pumping there is a safety for that in the system where some loops have no valves including the 40L buffer tank, so no risk of running it dry and it's been on for days before too.
      Continuous heat ask from the heat pump would mostly be inefficient. Since all valves would be closed it would keep heating the buffer tank and unvalved groups. Basically the heat pump is dumb anyway and only has a temperature it wants to get it's buffer tank to, if that temperature has been reached, even though there is heat ask, it will still automatically shut off until the buffer tank drops below it's set value.
      So I understand your concerns but everything that this is controlling has their own safety features also and even if everything was constantly on, it's designed to run that way. :)

  • @gregbrissey5675
    @gregbrissey5675 5 ปีที่แล้ว +2

    Just wondered if you had consider any I2C relay boards? (when you run out of pins)
    How many pins does the ESP32 have that can be used to control relays?
    Thanks

    • @IntermitTech
      @IntermitTech  5 ปีที่แล้ว +1

      Ah good question! I haven't considered any because of probably added cost. In my case I need at most 12 relays in one place so I think even an ESP8266 NodeMCU has enough pins for that, but the ESP32 boards I'm using for sure (I believe there are 24 output pins).

  • @mariopalma3802
    @mariopalma3802 4 ปีที่แล้ว

    Hi Intermit-Tech, very intresting video. I would like to do something similar but for a electrical underfloor heating system. I know that a thermostat do this job, but I would like to define a certain maximum Kw instant consumption and decide what room (based on a priority list) have to be switched off- Do you think using your project plus some device (like Shelly EM) monitoring the consumption in Home Assitant cen work? PS the heating system will have a separate switch case so it will be easy to monitor just the heating consumption vs, the rest of the house. Thanks and please continue posting videos.

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว

      Poh, if you can program that logic and the thermostat is a simple on/off deal, you I think that can work.

    • @mariopalma3802
      @mariopalma3802 3 ปีที่แล้ว +1

      @@IntermitTech I will try and let you know. BTW do you have your devices availables? I would like to buy a couple of them. Thanks

    • @IntermitTech
      @IntermitTech  3 ปีที่แล้ว

      @@mariopalma3802 Everything is always available since they are DIY builds! But for the QuinLED-Dig-Uno I also do a pre-assembled version and that is currently in stock. :)

  • @xanderdekok909
    @xanderdekok909 4 ปีที่แล้ว +1

    I also build a small test setup with your ESPhome code, but I didn't understand the inverted: true option. In my setup this resulted in the switch being turned on by default. So I put it to false.
    Why did you invert the switches?

  • @jorritparmentier2901
    @jorritparmentier2901 3 ปีที่แล้ว

    Nice video. But I think you made a mistake with the lights. The 3 lights that are off are on NO, the one that burns is NC

  • @linearburn8838
    @linearburn8838 4 ปีที่แล้ว

    Just wondering IS there a More polished product that does the job of the esp32 and relay boards ect in a single comerical package

  • @dablet
    @dablet 6 หลายเดือนก่อน

    thank you for the code BUT please post link to the wiring. yes, we saw your pictures, but it would be clearer if you show pin connections. in my videos, i always do this to clarify

  • @jemapelu
    @jemapelu 4 ปีที่แล้ว

    do you control the heat pump also?

  • @pangit9999
    @pangit9999 5 ปีที่แล้ว

    What is the advantage of this over a Sonoff running Tasmota?

  • @isaacbreuer6017
    @isaacbreuer6017 4 ปีที่แล้ว

    How do you control the boiler circulating pump, that when any of the relays is on the pump should start, do you use on of the relays on board and nodered will do it? Or you heard wire toca separate relay

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว

      The pump is on its own relay and in Node-Red I can configure that if one valve opens the pump should also run.
      Or at least, in my test setup, I hope to continue building this later this year!

  • @ChazzerB31491
    @ChazzerB31491 3 ปีที่แล้ว

    What do you have on the tips of your wires that connect to the screw terminals?

    • @IntermitTech
      @IntermitTech  3 ปีที่แล้ว

      Those are wire ferrules, see here: quinled.info/2018/10/01/tools-and-equipment/#ferrule-crimping-tools

  • @sergio6477
    @sergio6477 3 ปีที่แล้ว

    Great video, I'm aiming to do a similar setup as yours controlling my floor heating system with electrovalves. Could you share some pictures of your setup so I could learn a little from your experience?

  • @jonsmol
    @jonsmol 2 ปีที่แล้ว

    Is this the most effective way to control 24v analog strips?
    I have four 26’ long channels of high CRI white LED strips that I’m installing over my work shop/lab - i’m trying to figure out the best way to turn them on and off and dim
    Each channel will have a second 24v ID RGB strip that will be managed by ESP+WLED - I’ve got that tested and figured out from watching your previous videos but how to additionally manage analog in the same system would be wonderful!

    • @IntermitTech
      @IntermitTech  2 ปีที่แล้ว

      I'm confused, if you are already using a PWM dimmer for the 24v RGB why then not also do so for the 24v Analog strip?

  • @Labombab
    @Labombab 4 ปีที่แล้ว

    Hi Quindor, I purchased a (AZDelivery 16-Relais Modul 12V mit Optokoppler relay) on Amazon, the gpio inputs on this board are 5V. Problem with this one is that my Rasberry 4 is not able to switch the relays, apparently because the gpio voltage of the Raspberry uses 3.3V and has not enough power to switch the 5V relays.
    I found a AZDelivery TXS0108E on Amazon, and they should convert the 3.3v to 5V. Once connected they only give contact when i mess arround with the jumper cables.
    Not shure it being the cables or the logic converter boards themselfs. I hoped that a logic level converter could solve the problem i ordered another 2x (8-Kanal-Level-Conversion-Modul Zwei-Wege-Konvertierung) on Amazon, but these are not delivered yet. So could not test these.....yet. Do you have any experience with these logic converters and would they solve my problem?

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว +1

      Ai, yeah, some really need 5v to trigger, the boards I linked to worked perfectly down to about 2.5v so worked with ESP's and such.
      But yes, I use logic level shifters on some of my boards and that can work to raise the GPIO voltage from 3.3v to 5v and that would fix your problem, won't be pretty, but that can work. :)

  • @n.r.2258
    @n.r.2258 2 ปีที่แล้ว

    coding in the meta information would have been a nice service.

  • @brucerawiri7170
    @brucerawiri7170 4 ปีที่แล้ว

    Hi Quindor. I am very interested in this video and I have one questions. You are using a NodeMCU to control the relays or ESP32 board, which is fine and this integrates into HA, all well and good. What I would like to do is us a simple Push Button to control One of the relays on a 8 channel Board.
    E.G.
    If I have 3 push buttons on my wall plate in the lounge controlling 3 separate lights. If i deploy the relay board in the ceiling and connect the lights to the relays, how can I control the Relays on the lounge switch which is 3 push buttons??
    Can I use a NodeMCU to connect the Push Buttons too and then send a mqtt command or something to HA to turn the relay on? I guess the lounge switch could still be a simple light switch connected to NodeMCU or ESP32 development board
    I hope this makes sense. Thanks for now
    Bruce

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว

      Sure you can can easily program this using ESPhome combined with Home Assistant. You could even make it so that if HA would be down, because it's all on the same ESP32 that you can still switch the relays.

    • @brucerawiri7170
      @brucerawiri7170 4 ปีที่แล้ว

      @@IntermitTech Thanks Quindor, much appreciated. Would you please be able to give me a sample of what the Switch Code would look like so I can test it. I would be greatly appreciative if you can help me out. Thanks so much again

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว

      @@brucerawiri7170 That's going to be a bit hard to do through TH-cam comments. Search around for ESPhome code, I'm sure it wouldn't be too hard to find. :)

  • @martinspukitis1954
    @martinspukitis1954 ปีที่แล้ว

    How to put this stuff on a DIN rale?

  • @madrian_hello
    @madrian_hello 5 ปีที่แล้ว

    Or you can use Sonoff 4CH too. :)

    • @IntermitTech
      @IntermitTech  5 ปีที่แล้ว

      Yes, those are great too, but I need about 12 relais on 2 points and then this becomes a lot cheaper. Still Sonoff stuff is nice too!

  • @holijames82
    @holijames82 4 ปีที่แล้ว

    can i use 1 esp32 on home assistance with 4 separate temp sensors and 8 relays?

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว

      Yes, that should work without issues

    • @holijames82
      @holijames82 4 ปีที่แล้ว

      @@IntermitTech thanks mate, love your video 🤙

  • @JM-zb8ro
    @JM-zb8ro 8 หลายเดือนก่อน

    What about hvac

  • @dunckeroo1987
    @dunckeroo1987 4 ปีที่แล้ว

    230 volt zone controls (?) crazy. Over on this side of the world most zone controls are 24 volt.

    • @IntermitTech
      @IntermitTech  4 ปีที่แล้ว

      Yeah, I would have rather had 24v DC too, but this is the most common system that is rolled out over here.

    • @dunckeroo1987
      @dunckeroo1987 4 ปีที่แล้ว

      @@IntermitTech Oh that would be 24 volts AC , so needs a transformer.

  • @madhukeshnp
    @madhukeshnp 4 ปีที่แล้ว +1

    #electroboom 😂

  • @tobias-lars.hoeher
    @tobias-lars.hoeher ปีที่แล้ว

    Hello,
    Thank you very much for your video. That's what first got me thinking about the topic. But now I am still new to the scene, but would like to try it. I bought the ESP12F_Relay_X8_V1.1 board with integrated WiFi and would like to integrate it with my WiFi and then control it with Home Assistant (underfloor heating), but unfortunately I still lack the skills to configure the board to connect to my WiFi.
    I know it's a lot to ask, but would it be possible to create a code where I only have to enter my SSID and password?
    Many thanks and greetings from Bavaria

  • @amintaleghani2110
    @amintaleghani2110 2 ปีที่แล้ว

    thanks for your video, however i wonder if someone holds your hands can you continue talking ? 😁

  • @DEEFRAG
    @DEEFRAG ปีที่แล้ว

    I really tried to watch your video. i'm interested in the topic but i can't stand your constant head shaking. just keep your head in a fixed position pointing towards the camera, like a normal person would do. It drives me crazy watching this unnecessary left and right movement. i have to stop it before i lose my mind.

  • @Patrick_010
    @Patrick_010 9 หลายเดือนก่อน

    Stop waving your hands. Really annoying