Somfy RTS, RFLink and Home Assistant
Shutters automation.
(Unfortunately) we have some Somfy RTS shutters in the house, and I wanted these shutters tied into the automation system together with all the other, non-Somfy-RTS shutters that are automated, and to eliminate using the Somfy remote controls. I’m not interested in buying a Somfy home automation system. The Somfy shutter-motors should be tied into a Home Assistant setup.
Somfy RTS shutters can be controlled via RF transmission on 433.42 MHz, so how hard can it be?
My first solution for controlling a few Somfy RTS blinds was just using the pcb from a Somfy Telis 4 remote control, and connect some relays to it.
Basically, same principle as can be bought as a Somfy RTS Dry Contact Interface
Controlling the Telis pcb using some relays under control of Home Assistant worked, but a more robust and scalable solution would be to use a microcontroller with a 433MHz transmitter/receiver and have that act as a remote.
More information about the Somfy RTS protocol can be found at https://pushstack.wordpress.com/somfy-rts-protocol/
Luckily, an excellent RF Gateway exists with the RFLink, and that can serve as a quick way to integrate a 433MHz sender/receiver. Even better, the RFLink people have integrated the Somfy RTS protocol into their firmware.
The goal here is to have the RFLink behave as if it were an additional Somfy RTS remote control. Just cloning the messages as send out by a Somfy RTS remote control will not suffice, because Somfy employs a rolling code in their RTS protocol. (I guess my take is that I don’t want to award these kind of user-hostile companies with buying an additional 'home automation' box. Their automation options are also &@$!#*% expensive)
This means that you could either record the signal of an existing Somfy remote, take over the counter for that remote, and make sure not to use that remote control anymore, or, better, to pair the RFLink as an additional remote control to the RTS receiver. This has the added benefit that next to being able to integrate the RTS blinds into your home automation system, you can also still use the original RTS remote control if wanted.
Following is the configuration for RFLink & Somfy RTS:
Pair RFLink as a remote control with the RTS shutters
-
Use the RFLink Loader program to put latest firmware on the RFLink
-
Connect to RFLink & turn on Serial Port Logging
RFLink should output some feedback like
20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R48;
10;version;
20;01;VER=1.1;REV=48;BUILD=04;
10;status;
20;02;STATUS;setRF433=ON;setNodoNRF=OFF;setMilight=OFF;setLivingColors=OFF;setAnsluta=OFF;setGPIO=OFF;setBLE=OFF;setMysensors=OFF;
-
Check the current slots for storage of rolling codes in the RFLink’s internal EEPROM
10;RTSSHOW;
which for an empty rolling codes table would look like:
-
Put RTS shutters into pairing mode
See Somfy documentation, with an already programmed RTS transmitter, it’s just a case of pushing the programming button on the back of the remote control for a few seconds until the shutter jogs.
-
Pair Somfy shutter with the RFLink
Send pairing command : 10;RTS;0A0A0A;0123;1;PAIR;
Pairing command breakdown | |
---|---|
10 |
indication for RFlink that a command is send to interpret |
RTS |
RTS protocol |
0A0A0A |
address (needs to be a unique remote control code - hexadecimal) |
0123 |
rolling code number |
1 |
position in the rolling code table stored in internal EEPROM. (hexadecimal) |
PAIR |
RFLink RTS pair command |
-
Verify the pairing by checking the internal EEPROM slots (using
RTSSHOW
command)
-
At this point, it should be possible to control the shutter using the RFLink
Moving shutter down:
10;RTS;0A0A0A;0;DOWN;
RFLink protocol | |
---|---|
10 |
send command to RFlink |
RTS |
RTS protocol |
0A0A0A |
address |
0 |
(zero = currently unused parameter) |
DOWN |
command |
Moving shutter up:
10;RTS;0A0A0A;0;UP;
Stop shutter movement:
10;RTS;0A0A0A;0;STOP;
For my 4 shutters, pairing all 4 of them:
shutter 1 (left to right)
10;RTS;0A0A0A;0123;1;PAIR;
shutter 2
10;RTS;0B0B0B;0234;2;PAIR;
shutter 3
10;RTS;0C0C0C;0345;3;PAIR;
shutter 4
10;RTS;0D0D0D;0456;4;PAIR;
4 shutter configurations are programmed into the RFLink, and the 4 corresponding rolling codes are now under control of the RFLink gateway:
Home Assistant has an rflink integration to support the RFLink gateway and support for RFLink-controlled shutters.
Enable rflink in Home Assistant by adding the rflink
section to configuration.yaml
# Enable RFLink integration in Home Assistant
rflink:
port: /dev/ttyACM1
or
port: /dev/serial/by-id/usb-xxxxxxxxx
Add the necessary covers to configuration.yaml
:
Associate a shutter with the previously configured addresses in RFLink.
The RFLink cover ID’s are composed of: protocol (RTS), address id & gateway id. For example: RTS_0A0A0A_0
# Add Somfy RTS covers
cover:
- platform: rflink
devices:
RTS_0A0A0A_0:
name: Shutter Office Room
...
https://www.home-assistant.io/integrations/rflink/
https://www.home-assistant.io/integrations/cover.rflink/
https://github.com/Nickduino/Pi-Somfy
https://www.letscontrolit.com/forum/viewtopic.php?t=3399
https://matdomotique.wordpress.com/2016/04/21/domoticz-rflink-et-somfy/
http://rflink.nl/blog2/
https://www.instructables.com/id/How-to-Connect-Your-Somfy-Remote-to-Alexa-With-an-/
https://bithead942.wordpress.com/2014/04/12/motorized-window-blinds-phase-2/
https://romor.github.io/blind-control/
https://www.smbaker.com/automated-cellular-shades-with-somfy