Home assistant 103 ESPhome custom Relays and Temperature

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 พ.ค. 2024
  • Today we will be taking a look at how to use an esp with Esphome and home assistant setting up a relay and temperature sensor.
    I know this video is Long and I could maybe have shortened it but the purpose of this is not to skip a specific step or miss information that may be important in the future.
    Items used
    8CH Relay www.banggood.com/custlink/K33...
    Relay: www.banggood.com/custlink/GvD...
    Raspberry Pi 3: www.banggood.com/custlink/DvK...
    ESP/Nudemcu: www.banggood.com/custlink/3GD...
    Reed Switch: www.banggood.com/custlink/vvG...
    PIR: www.banggood.com/custlink/vmD...
    Recommended PIR: www.banggood.com/custlink/3G3...
    DHT11: www.banggood.com/custlink/mmD...
    Recommended instead of DHT11
    www.banggood.com/custlink/vK3...
    Join Discord:
    / discord
    Want to support me on patreon
    / averageautomation
  • แนวปฏิบัติและการใช้ชีวิต

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

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

    There is a Updated Video on this one.
    th-cam.com/video/8LBKRqt50Eo/w-d-xo.htmlsi=s569hS9t8L7dvriM

  • @M.Fauzee-fo6pv
    @M.Fauzee-fo6pv 4 หลายเดือนก่อน

    This guy soo good at teaching. ty teacher

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

    I'm not sure why you don't have more likes on this video. Excellent info thanks!

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

    Great video - as a noob to ESPHome you have made it clear what I need to buy and how to connect it all up with Home Assistant - Thanks

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

    Thank you for this 🙂 got my I2C temp & humidity sensor working, now need to figure out how to get my max44009 light sensor going on the same bus. Going to have to follow the custom sensor tutorial on esphome.

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

    Your phrase of the year has to be "go ahead." :)

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

    So far, I have watched maybe more than 100 videos for adding ESP 8266 devices to home assistant, no one was clear as you. Now, I can sleep peacefully :)
    I look forward to see MQTT videos too. Great work mate

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

      Thank you so much for the kind words it means a lot, I was a bit afraid it may be too long.

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

      @@AverageAutomation previously I was playing with openhab then saw home.io but I was almost given up then discovered your channel. Your videos are precise and logical. Can't wait to see new videos

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

    Thanks ,,keep up the good work..

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

    Great tutorial. Worked great for me. Will now search to see how to control a 2 or 4 way PCB version.

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

    OHHHHH thanks a lot!!! I was having troubles with saying duplicate yada yada and finally found a good explanation. THANKS

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

    Hey there Thanks for sharing this tuto itis great now I do have a little question how can you do it to be a momentary switch (at least 4 relays) ?
    👍👍👍👍👍

  • @PiyushNikam
    @PiyushNikam 2 ปีที่แล้ว +1

    The best step by step video I have ever watched.
    Totally loved it !
    One thing I wanted to ask is
    Can we restore the factory firmware of the NODEMCU if we wanted to use it as a normal one without home Assistant?

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

    Best tutorial Ive ever seen.

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

    It’s been really nice step by step process, can you made complete irrigation system include temperature and weather so will use it thanks
    Sk

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

    HIii bro, great video, was able to follow along. Is it possible to send multiple hexa decimal codes via a slider or something , in the ESP home and home assistant??

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

    This was great. I have probably commented couple of times in last 10 years on TH-cam.

  • @RafaelRodriguez-nu4yz
    @RafaelRodriguez-nu4yz 2 ปีที่แล้ว

    Muchas gracias desde Colombia

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

    As far as I could tell I followed you exactly but when I went to the overview page my relay sign did not appear. Also when I ran the show logs the last two lines which apparently show the relay being switched did not appear. Finally I got two Esphome configurations , one showing the switch sign the other not. Any ideas would be appreciated.

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

    Verry good Video. Please keep on...
    Now I know how to do it.

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

    Excellent video. Please forget my comment below as all now worked out. However do have one question. Do you know how to flash the ESP32-WROOM-32 (the only type I can get). The ESP8266 will flash just fine but not the ESP32. I am sure there must be a combination of pushing EN button or BOOT button , prior to hitting the UPLOAD, but I can't get it to work. Have searched internet for an answer but couldn't find anything relating to flashing ESP32 on Home Assistant using ESPHome.

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

    Cool , can I do some manual switch with relays?

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

    First off I would like to say that I appreciate your work and your tutorials, I find that you cover some of the finer details that other 'super users' seem to gloss over because of their IT background. Constructive criticism: In the first 10 minutes you said "...go ahead and..." which is an easy thing to not notice however it is very distracting to your otherwise great tutorial (and watch to make sure your board is in view of the camera!) I look forward to your other vids, thanks!

    • @AverageAutomation
      @AverageAutomation  4 ปีที่แล้ว +3

      Hey THank you for the kind words, yes this is something that I noticed as well I am trying not to do it as much anymore the newer ones does have a lot less if it haha.

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

    thank you for this video, i searched the internet for 2 days to find a video that breaks it down like this, you haven't done a video for an esp32 cam as a doorbell with a push button and pir sensor have you lol

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

    A very good tutorial, i watched all ur video. Thank you so much. I like to request video for adding a physical push button to turn on light or fan manually. How to add to esphome. Can use nodemcu in this custom sensor?

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

      Hey it is possible I may have a video on this in the future using a D1 Mini as it is small and compact.

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

      @@AverageAutomation thank you in advance..👍🏼👍🏼👍🏼👍🏼👍🏼

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

    Just one word "Thanks"

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

    OMG thanks for this! I used to use arduino ide for this. This WAY MUCH easier and your tuts is very easy to follow. You are a great teacher! I have a question is this thing for prototyping only or can i use this for home use?

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

      I have a few of these that have been running for years without any issues you should be fine using the items

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

      @@AverageAutomation cool thanks!

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

    Can we use 3.3 V pin to control the relay? The spec says requires 5V to close the circuit?

  • @RafaelGonzalez-em1pk
    @RafaelGonzalez-em1pk 4 ปีที่แล้ว

    Muy buen tuto, se podría dar la orden de encendido relay a través de Alexa.
    Muchas gracias

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

      Hey Thank you.
      I dont have a Alexa however you should be able to do it if you make use of The cloud option home assistant offer.
      th-cam.com/video/-kfJG8khiks/w-d-xo.html

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

    Great video! You made setting up ESP8266 devices with ESPhome to run on Home Assistant look very easy. I also love the Home Assistant series as a whole.
    I am very new to home assistant and using ESP devices. I’m looking to use an 8 relay board so I can control the many devices I have in my desk, and seeing you set it up with that exact amount of relays made me certain that a NodeMCU could be used to control 8 relays.
    I do have some questions though. On top of the 8 relays, how many more additional relays and sensors could the NodeMCU control?
    From doing a quick image search, I counted a total of 13 GPIO pins, so would that mean the NodeMCU could control 8 relays + 5 additional sensors/relays?

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

      Hey Thanks for the comment I would recommend reading up on what some of the pins does as well as some of them may cause problems if you do not use them correctly there is a fantastic video here about this.
      th-cam.com/video/c0tMGlJVmkw/w-d-xo.html

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

    Thanks again for great video. As a newbie, I wondered would a flashed Sonoff switch provide the same solution as this configuration? (Single relay) Seems the cost for one Sonoff switch would be a cheaper solution for a simple single relay should one be price conscious. Thanks in advance.

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

      I have never worked with sonoff divices before but it should work if you have the ability to flash a image on it think you may need a usb programer and put it into flashing mode to flas the bin fine. You would also need to know the gpio pin of the sonoff

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

      @@AverageAutomation Thank you so much. Sonoff has the esp chip and can be flased...clunky thought. Love your video thanks again

  • @100tificopic9
    @100tificopic9 4 ปีที่แล้ว

    Hi! Thanks a lot for your work, but I have a problem with the compiler not found the ESPAsyncTCP-esphome library, pls can you tell me how I can found and introduce it ???? Thansks in advance

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

      I would suggest making sure that it does detect the internet you should see a message in the log "internet not detected" or something similar this blocks it from being able to get the library from the internet

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

    How to make the relays turn off after power loss on Home Assistant? (or HA reset)

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

    Also, good have a video adding a RGB light to ESPHome :)

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

      yes I will be adding that to the collection soon.

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

    Does this tutorial still apply if I have my ESP8266 flashed with tasmota?

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

      Yes if you plug it in to your raspberry pi it would flash over tasmota firmware. Keep in mi d this will remove the config you had on there for tasmota and change it to esphome firmware.

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

    Thanks for introducing me to ESPHome - it seems amazingly simple to setup a NodeMcu to intergrate with HA. I managed to wire up on a breadboard a relay and a couple of thermoneters and using your examples, all worked. BUT how can I use a DHT and a Dallas 18B20 sensor in the same configuration as I get a coding error with 2 instances of Sensor as follows. - switch:
    - platform: gpio
    name: "Relay"
    pin: D0
    # # Note had to comment out this code when using the Dallas code.
    #sensor:
    # - platform: dht
    # pin: D1
    # temperature:
    # name: "Living Room Temperature"
    # humidity:
    # name: "Living Room Humidity"
    # model: DHT11
    # update_interval: 60s
    dallas:
    - pin: D3
    sensor:
    - platform: dallas
    address: 0xAA8000002AA73428
    name: "Temperature #1"

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

      When using more than one sensor you only need to use the sensor heading once example
      sensor:
      - platform: dht
      pin: D1
      temperature:
      name: "Living Room Temperature"
      humidity:
      name: "Living Room Humidity"
      model: DHT11
      update_interval: 60s

      - platform: dallas
      pin: D3
      address: 0xAA8000002AA73428
      name: "Temperature #1"
      This is just a copy of the code you have provided I have not worked with Dallas before but I think the issue you had was having the heading of "Sensor" more than once.

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

    Hi, great videos you are posting. Learning a lot. But could you please explain me how I can add several weather sensors at one esp8266. I have looked at esphome.io but there I can't find any solution. What I want is for example, a bmp180 + dht22 + bh1750 and a ds18b20.
    But I struggle with all the addresses and gpio settings. I have running a dht22 with the relay off this video and would like to expand my sensors. Kind regards. Bas

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

      Hey I do nog spesificly have the sensors you have mentioned I will need to take a look in the future at setting up a weather station maybe do a solar setup one may be something I can look at.

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

    Cool videos, where do you get your esp's? I see you are also in South Africa?

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

      hey yes, I am I mostly get mine from banggood links in the description, it takes a while to get here. sometimes you get lucky and they send it via buffalo then its in 2 weeks.
      However, with all this corona stuff, I would suggest getting it from a local place you can try them
      www.diyelectronics.co.za/store/espressif-iot/1174-nodemcu-v3-lua-esp8266-esp-12e-wifi-development-board.html?search_query=esp&results=757

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

      @@AverageAutomation I am planning on making a weather station out of 3d printed parts. also want to make a voltage and current meter with a ESP32. Ordered some from banggood and i am just waiting for the shipment to be sent to me in SA.
      Banggood sometimes shows items as in stock on their site but like this time when i ordered, the shipment gets delayed until they get new stock.

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

      @@jeandrecoetzer9062 Yes I have had that before as well sometimes you should also check the processing time on some of the items they will delay shipping until they have all the products before they ship them unlike aliexpress however Bangood is really good when it comes to refund if you have not received the product.
      But with the corona thing, you may be waiting some time the post office also not really moving a lot of packages at the moment last time I went to collect they told us they are no longer getting any packages from Capetown to my town because for a while.

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

    hai, I connect node mcu with relay when I switch ON through H A Relay was OFF, when I Off through H A it was showing relay was ON, and history logs also showing ON kindly provide a good solution

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

    Re comment below, I have now finally succeeded in using an ESP32. A few tricks to know -need to connect 10uF capacitor across EN and GND to be able to flash the board. Yaml code only accepted if you call pin by integer name only. ie wouldn't take D4 but would take 4. Also pin 4 on ESP32s is not pin D4 but for my 30pin board was 4th pin from bottom which was D2. Anyway that was my experience.

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

      I never tried it with a 32 before all i have is the esp32 cams not sure if I should do a video on them they don't really feel worth using.
      Normal esp32 on the other hand would work awesome thing b jumpering D0 to GND would put it in flashing mode.

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

    Do you have your code available anywhere, YAM?

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

    Excellent!
    My one regret (this isn't a knock): Too bad you didn't also show how to add a way to turn on the relay under certain temperature/humidity conditions.
    "if temperature > 95 then RelayOn"
    Would've been even more perfect.

    • @AverageAutomation
      @AverageAutomation  2 หลายเดือนก่อน +1

      Soon I will do a few more esphome and automation videos.

    • @AverageAutomation
      @AverageAutomation  2 หลายเดือนก่อน

      New video up showing how to do this

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

    Hi do you have tutorial for the esp32 variation?

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

      Not yet but may have one soon the setup shoud be fairly similar.

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

    You look like Daniel Cormier

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

      Haha not sure if that a good thing or a bad thing what i do know is i dont have his skills

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

      @@AverageAutomation your video is great ... really simple and to the point

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

    Futher to comment below I can make a badge to switch the relay.

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

      are you having an issue with the relay switch not showing up or when you switch it does it not turn on?

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

      Average Automation Just didn’t show up on overview page. I can switch it OK from a badge. The log overview didn’t show a switching occurring.

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

    why do you listen to yourself on headphones while talking? it will make you talk so softly..

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

      I do not however most of the times these are mande past 2am and i dont want to wake up other people in the house

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

      @@AverageAutomation oh ok, no wonder you talked so softly..

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

    Please mate, move mic closer, and stop whispering.

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

      hey yeah, haha i work night shifts and these videos are normally recorded at 3-6am in the morning so they may be a bit soft i do try to boost the should a bit afterwards but you know.