Moving from Arduino to ESPHome (time-based Roller Shutters and Venetian Blinds)

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ค. 2024
  • Today, let me revisit the time-based shade actuators. The solution I used till now was using Sonoff 4ch switch, with a custom Arduino code - because when I did them, ESPHome did not exist yet, and controlling the timing from Home Assistant would not work - the tilt angle is quite sensitive to timing.
    So what I have done now is, I moved it to ESPHome. That will hopefully make it easier to adapt it to other smart switches, like Shelly. The Roller Shutter uses a standard time-based cover, but for the Venetian Blinds, I made a custom component, that is very easy to use. Just add an external component to the ESPHome file:
    external_components:
    - source:
    type: git
    url: github.com/bruxy70/Venetian-B...
    ref: master
    components: [ venetian_blinds ]
    ..configure it the same as time-based cover, but use venetian_blinds for the platform and add
    tilt_duration, next to open and close duration. That's it
    00:00 - intro
    01:56 - before you post comments....
    03:43 - Roller shutter - time-based cover
    09:07 - Venetian blinds - custom component (GitHub)
    11:11 - upgrading
    13:22 - outro
    Join us on my Discord channel / discord
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    My blinds are also configured using D1 minis, programmed in Arduino. I appreciate you walking through this!

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

    ESPHome is brilliant and a great way to integrate ESP devices and othe microcontrollers into Home Assistant without worrying about the code becoming outdated. Technically it is still the same language in the background, but creating the code via YAML is so much easier and just works.
    Thanks for another great video.

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

    Hi Václav. Can you show us hardware you are controllíng on blinds? i mean motors on blinds. THX

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

    another great video!!! amazing JOB

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

    Cool, looking forward to trying out the custom component on my shelly 2.5 and venetian blinds. Currently use current based cover with switch template for preset angles in HA. 1700 ms down and different up values get me an accurate angle every time. Short press at switch will tilt as normal, but a long press will close or open until the preset time or the current drops to zero because of end stops and the relay opens. Any time and end sop is reached, the slider position is reset/synched.

  • @Snypes88
    @Snypes88 9 หลายเดือนก่อน +1

    Hello Vaclav, very cool implementation! I have a sonoff dual r3 which detects the endpoints based on a power drop measured on the onboard power meter. Is your implementation able to detect when it has reached fully open or fully closed? What happens if the venetian blinds are 50% open when first installing the ESP Home routine? Also what happens in the event of a power outage and the blinds are also in a mid position? Does the integration keep track of the actual location of the blinds even when power is lost, or the integration is replaced (in the event of faulty HW)?

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

      It is based on a time based cover, so it does not support the end point detection you use I am afraid. Not sure of there is such type of cover in ESP Home from the top of my head - you might need to make a custom one I am afraid. It does remember the position in case of power outage. But I do not think it would sustain changing the device. What I do is, I have a script to "calibrate" them, that brings them to fully closed position, and then closes the relay for the down position for the time needed to close them, to make sure they are really closed.

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

      At the nie minute mark in the video add lines 49 to 53. Then use UP immediate STOP DOWN repeatedly until the blind is in the bottom position. Or add this to the switch section - platform: template
      name: ${upper_devicename} Calibrate
      turn_on_action:
      then:
      - lambda: |-
      id(close_relay).turn_on();
      - delay: ${close_duration}
      - delay: 2000ms
      - lambda: |-
      id(close_relay).turn_off();

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

      scrap that, the code does not work. Just add a few seconds to open and close time. 0-2 and 98-100% positions will not be accurate but everytime the blinds open or close fully the recalibrate themselves.

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

    Good job! :)

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

    ESPHome looks more flexible than Tasmota which I usually tend to use. But, can ESPHome be used independently of Home Assistant? In other words can it work offline to control some device (for example fridge or irigation)?

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

      Yes it can. There are some videos or communities explaining that. It can use either MQTT or HA API, so in this case only MQTT. And to manage (upload to the device) it can be done from HA add-in, or command line, so I think this will be command line in this case. So I know it works, but haven't tried.
      th-cam.com/video/a3iay-g1AsI/w-d-xo.html