Custom Component: Cover Time Based

No one ?
ok, sad …

My covers are declared in HA and works fine as simple on/off covers.
When i read “time based” i imagine that i could be able to apply that on my Somfy RTS covers, but, after multiple tests, i don’t reach a working state.

If you have RTS covers give ESPSomfy RTS a try. The hardware is simple and it handles all the timing, positioning, and quirks of the RTS protocols.

Hello,
Thanks for your proposal, but using esp32 seems not so easy that means deploying additional devices with necessity to manage a way to power them (they can’t be simply plugged to the wall).
Perhaps i’m wrong ! let me know.
That’s why i initialy focus on code solution.
Thanks :slight_smile:

The ESP32 plugs into the wall with a simple USB adapter just like the RFPlayer. That being said you can pretty much plug it in anywhere within range and it will control up to 32 motors and 16 groups. In the end you will not need the RFPlayer and it will co-exist with any other remotes you might have.

Maybe you can give a try to other implementation:
https://community.home-assistant.io/t/yet-another-time-controlled-cover-rflink

Regards.

Hello,

I added one cover and it was working perfectly. Now I want to add three more
covers but they do not appear in the entities. Also I cannot delete the previous one because it is read-only and it is not possible to add unique_id.

Here is the configuration.yalm code:

cover:
  - platform: cover_rf_time_based
    devices:
      persiana_estudio:
        name: persiana_estudio
        travelling_time_up: 25
        travelling_time_down: 25
        close_script_entity_id: script.persiana_estudio_down
        stop_script_entity_id: script.persiana_estudio_stop
        open_script_entity_id: script.persiana_estudio_up
        send_stop_at_ends: True #optional
        
      persiana_sala:
        name: persiana_sala
        travelling_time_up: 25
        travelling_time_down: 25
        close_script_entity_id: script.persiana_sala_down
        stop_script_entity_id: script.persiana_sala_stop
        open_script_entity_id: script.persiana_sala_up
        send_stop_at_ends: True #optional
        
      persiana_gela:
        name: persiana_gela
        travelling_time_up: 25
        travelling_time_down: 25
        close_script_entity_id: script.persiana_gela_down
        stop_script_entity_id: script.persiana_gela_stop
        open_script_entity_id: script.persiana_gela_up
        send_stop_at_ends: True #optional
        
      persiana_sukaldea:
        name: persiana_sukaldea
        travelling_time_up: 20
        travelling_time_down: 20
        close_script_entity_id: script.persiana_sukaldea_down
        stop_script_entity_id: script.persiana_sukaldea_stop
        open_script_entity_id: script.persiana_sukaldea_up
        send_stop_at_ends: True #optional

Many thanks for the help.

Hello,

@rstrouse, the RFPlayer is plugged on my Raspi. From my understanding, ESP32 has to be flashed with the desired code and then plugged on the cover side to communicate through WiFi with the raspi; but on the cover side, i don’t have any USB as it’s built in Somfy covers.
So, still from my understanding, this sounds like need heavy modifications to connect esp32 to Somfy cover engine and to allow communication with raspi.
But i probably don’t understand how ESP32 works.
Thanks for the idea, but i’m not sure i’m able to perform this kind of modifications.

@javicalle, thanks for the information. Didn’t know this implementation. I’ll check that, but from the first look, implementation is not available throught HACS. I’ll look at it. Thanks.

Regards.

@Sethielh no worries but I think you are selling yourself short. This involves connecting 8 push on Dupont connectors onto pins. It does not involve connecting anything to the motors since it communicates with the motors over the Somfy radio just like your remote control so there is no physical connection to the motor. The ESP32 connects to your wifi network and communicates with Home Assistant over the network.

As for powering the ESP32 you can power it from any outlet in your house, the USB port on your Raspberry Pi, or a 5v power supply. It just needs to be somewhere in your house where it can receive radio signals from your remotes and send radio signals to your motors.

Can you help me to do the rf cover with time based in esphome?

Hello, first of all, delete all your previous shutter entities, then restart HA. Insert the code (check for integrity), save config, and restart again.

this is working for me with 5 shutters, using a broadlink universal remote:

Névtelen_HA

cover:
  - platform: cover_rf_time_based
    devices:
      shutter5:
        name: Hálószoba
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_5_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_5_fel
      shutter4:
        name: Kisszoba_terasz
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_4_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_4_fel
      shutter3:
        name: Kisszoba_kisterasz
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_3_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_3_fel
      shutter2:
        name: Nappali_kisterasz
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_2_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_2_fel
      shutter1:
        name: Nappali_nagy
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_1_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_1_fel
cover:
  - platform: cover_rf_time_based
    devices:
      shutter5:
        name: Hálószoba
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_5_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_5_fel
      shutter4:
        name: Kisszoba_terasz
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_4_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_4_fel
      shutter3:
        name: Kisszoba_kisterasz
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_3_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_3_fel
      shutter2:
        name: Nappali_kisterasz
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_2_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_2_fel
      shutter1:
        name: Nappali_nagy
        travelling_time_up: 29
        travelling_time_down: 27
        close_script_entity_id: script.redony_1_le
        stop_script_entity_id: script.redony
        open_script_entity_id: script.redony_1_fel

Many thanks for Robi for the custom component.

2 Likes

will you show all your lovelace yaml for one cover please , i don`t really get how to make it show up like that.

Hi guys

Who can help/support me to setup it up ? I have created the scripts and completed the yaml. The entity appears in HA, but it says always the “entity will not be available anymore in the integration” … see below my config yaml

cover:
  - platform: cover_time_based
    devices:
      Pool:
        name: Pool777
        open_switch_entity_id: script.pool_cover_auf
        close_switch_entity_id: script.pool_cover_zu
        travelling_time_down: 23
        travelling_time_up: 25

Use open_script_entity_id instead of open_switch_entity_id. Same for close_script_entity_id.

Thank you for the swift reponse, tried it but then I get the following error.
image

Sorry, I mixed this up with cover_rf_time_based https://github.com/nagyrobi/home-assistant-custom-components-cover-rf-time-based

I have installed this one now and it works - many thanks really appreciated your support

Hi Daniel,

Wow, this is great! I have just replicated all these for one of my blinds (I have 11 RF blinds), and all works great. The only issue I have that I am not able to use ‘stop’ command on the cover card in the lovelace frontend? Does that working for you? I have checked all my coding many times, and should work. Thanks!

I have a small question related to

 - platform: cover_time_based
   devices:
     room_rolling_shutter:
      name: Room Rolling Shutter
      travelling_time_down: 23
      travelling_time_up: 25
      open_switch_entity_id: switch.wall_switch_right
      close_switch_entity_id: switch.wall_switch_left
      aliases:
       - room_rolling_shutter

Is there any reason why a “stop_switch_entity_id” can not be configured? Is there any solution / workaround available?

I have an somfy cover which I control by ESP home like described in Controlling Somfy roller shutters using an ESP32 and ESPHome | die-welt.net

Use cover_rf_time_based instead. You can specify scripts for open, close and stop.

@starob thanks for the hint. I’m right, this is not in HACS and needs to be installed manually?