In this post I just want to share my journey to get 4 sunscreens controlled by Somfy Telis 4 remote integrated into HA, including automated closing, wind & rain protection and last but not least voice control with Alexa. No rocket-science; key to the success is this great forum and friendly co-workers!
RF- Wireless
I am using the RFlink gateway software and hardware from the nodo-shop to setup the rflink-hub.
The installation is well documented in https://www.home-assistant.io/integrations/rflink/
Setup the Somfy sunscreens
āJustā follow the documentation: https://www.home-assistant.io/integrations/cover.rflink/
This is the genius who discovered it: https://matdomotique.wordpress.com/2016/04/21/domoticz-rflink-et-somfy/
With 4 sunscreens, you have to perform the pairing with only one screen on power. Switch off the others to you avoid all kinds of troubles.
If the pairing with a code like 2F2F2F fails (the code is visible in RFlink 10;RTSSHOW; but it still does not work), I found it helpful to retry with another code like 2F2F3F.
Despite the fact that I am using a dipole at a relative short distance (3 meter) to the screens, I had trouble pairing one particular screen. After trying, thinking and crying nothing seems to work. In the end it appeared that the position of the dipole was critical.
Perhaps a coincidence (ā¦) but this troublesome screen also showed a reverse operation. Operating via RFLink 10;RTS;2F2F2F;0;DOWN; everything was fine but when I used the newly created cover in HA, this screen moved UP when I pressed DOWN.
This can be corrected with the inverted line in the YAML (RFlink Somfy RTS - inverted cover, : RFLink Somfy cover moves only a bit)
So here is how it looks
- platform: rflink
devices:
RTS_1F1F2F_01:
name: Screen big
aliases:
- rts_219a3d_01
RTS_3F3F3F_03:
name: Screen ^ left
aliases:
- RTS_219a3d_01
- RTS_237d00_01
- RTS_232b2d_01
RTS_4F4F4F_04:
name: Screen ^ right
aliases:
- RTS_219a3d_01
- RTS_42172_01
- RTS_241ebb_01
- platform: rflink
devices:
RTS_2B2B2B_02:
type: inverted
name: Screen small
aliases:
- RTS_219a3d_01
The status of the cover is not maintained. The arrows Up or Down do not grey out after pressing them. So far I have not found a solution.
Voice control Alexa
Via the emulated hue trick https://www.home-assistant.io/integrations/emulated_hue/ I control the lights and switches. For the 4 sunscreens I want to say: āAlexa turn on Screensā to make all of the 4 screens to go down. For this a template switch https://www.home-assistant.io/integrations/switch.template/ is created:
- platform: template
switches:
screens:
value_template: "{{ states('input_boolean.screens') }}"
icon_template: '{% if is_state("input_boolean.screens", "on") %}mdi:garage{% else %}mdi:garage-open{% endif %}'
turn_on:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.screens
- service: cover.close_cover
data:
entity_id: cover.screen_big
- delay:
milliseconds: 5000
- service: cover.close_cover
data:
entity_id: cover.screen_small
- delay:
milliseconds: 5000
- service: cover.close_cover
data:
entity_id: cover.screen_left
- delay:
milliseconds: 5000
- service: cover.close_cover
data:
entity_id: cover.screen_right
turn_off:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.screens
- service: cover.open_cover
data:
entity_id: cover.screen_big
- delay:
milliseconds: 5000
- service: cover.open_cover
data:
entity_id: cover.screen_small
- delay:
milliseconds: 5000
- service: cover.open_cover
data:
entity_id: cover.screen_left
- delay:
milliseconds: 5000
- service: cover.open_cover
data:
entity_id: cover.screen_right
The delays are absolutely necessary in order to avoid a collision of RF signals. By introducing a delay the screens open or close sequential. That is why I had to use a switch template to incorporate the script (How do I turn a script into a switch?)
Do not forget to add the newly created switch to the emulated hue list:
emulated_hue:
host_ip: 192.168.2.33
listen_port: 80
#off_maps_to_on_domains:
# - script
# - scene
expose_by_default: false
exposed_domains:
# - light
# - switch
- scene
- script
entities:
switch.0x00124b000e95c57b_switch_bottom_left:
name: "Egg"
hidden: false
switch.0x00124b001d861b70_switch_bottom_right:
name: "Amplifier"
hidden: false
switch.screens:
name: "Screens"
hidden: "false"
Automation
Here are my objectives:
a) Automate the closing of the sunscreens in the morning when a very hot day is expected (based on the forecast of dutch Buienradar https://www.home-assistant.io/integrations/sensor.buienradar/).
b) Automatic opening at certain rain and/or wind conditions
This thread How to automate my awning (sunscreen) is a good read.
This is how I build it:
I have created 3 input_booleans:
wind_low_tomorow:
name: "Wind < 5 Bft tomorow"
icon: mdi:weather-windy
temp_high_tomorow:
name: "Temp >24 C tomorow"
icon: mdi:weather-sunny
rain_low_tomorow:
name: "Rain < 0.2 mm tomorow"
icon: mdi:weather-pouring
Every evening these booleans are set with the latest forecast:
automation:
- alias: Read temp tomorrow
initial_state: 'on'
trigger:
platform: time
at: '22:00:00'
condition:
condition: numeric_state
entity_id: sensor.br_temperature_1d
above: 24
action:
service: input_boolean.turn_on
entity_id: input_boolean.temp_high_tomorow
- alias: Read Windforce tomorrow
initial_state: 'on'
trigger:
platform: time
at: '22:00:00'
condition:
condition: numeric_state
entity_id: sensor.br_wind_force_1d
below: 5
action:
service: input_boolean.turn_on
entity_id: input_boolean.wind_low_tomorow
- alias: Read Rain tomorrow
initial_state: 'on'
trigger:
platform: time
at: '22:00:00'
condition:
condition: numeric_state
entity_id: sensor.br_rain_1d
below: 0.2
action:
service: input_boolean.turn_on
entity_id: input_boolean.rain_low_tomorow
And the automation to get the screens down early morning
- alias: Screens down
initial_state: 'on'
trigger:
platform: sun
event: sunrise
offset: +00:30:00
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.wind_low_tomorow
state: 'on'
- condition: state
entity_id: input_boolean.rain_low_tomorow
state: 'on'
- condition: state
entity_id: input_boolean.temp_high_tomorow
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.screens
And an automation to get the screens up when the wind or rain are too strong:
- alias: Screens up
initial_state: 'on'
trigger:
- platform: time
at: '17:00:00'
- platform: sun
event: sunset
offset: -02:00:00
- platform: numeric_state
entity_id: sensor.br_wind_force
above: 4
for:
minutes: 5
- platform: numeric_state
entity_id: sensor.br_precipitation_forecast_total
above: 0.2
- platform: numeric_state
entity_id: sensor.br_irradiance
below: 100
for:
minutes: 5
action:
- service: switch.turn_off
entity_id: switch.screens
I am sure that each sunscreen integration and automation case is different but I hope that this post helps you a bit to design your own.