User Tools

Site Tools


somfy

Somfy 433 MHz wireless

Requirements

FeatureSupport
Sending
Receiving
Config

Supported Brands

BrandProtocolTypeNameStatus
SomfyRTSRemoteTelis-1 RTSTested
SomfyRTSRemoteTelis-4TBC
SomfyRTSRemoteTelis 4 RTS PURE GX 433TBC
SomfyRTSRemoteSmooveTBC
SomfyRTSDeviceCentralis UNO RTSTested
SomfyRTSDeviceSolaris Modulis Slim Receiver RTS PlugNot supported

Sender Arguments

-a --address=address          remote device with this address code
                              (0 ... 16777215)
-t --up                       up command button
-f --down                     down command button
-m --my                       my command button
-g --prog                     prog command button
-n --command_code             all command codes using the numeric presentation (0 .. 15)

optional:
-k --rollingkey=rollingkey    use this rollingkey value (0 .. 15)
-c --rollingcode=rollingcode  use this rollingcode value (0 .. 65535)
-w --wakeup=wakeup_type       use this wakeup type (0-10750, 17750, 1-9415,89565)

Config

{
    "devices": {
        "ScreenONE": {
            "protocol": [ "somfy_rts" ],
            "id": [{
                    "address": 1234567
            }],
            "state": "my",
            "rollingcode": 1,
            "rollingkey": 1,
            "repeats": 4,
            "wakeup": 0
        }
    },
    "rules": {},
    "gui": {
        "ScreenONE": {
            "name": "WindowStudy",
            "group": [ "TabGroup" ],
            "media": [ "all" ]
        }
    },
    "settings": { .... },
    "hardware": { .... },
    "registry": { .... }
}

Optional Settings

If the config.json file does not contain a valid device configuration, the values for rollingkey and rollingcode have to be specified, and automatic increment is not supported.
The parameter repeats specifies how often a command is repeated, the standard is 4.
Automatic increment is also not supported for pilight clients running in ssdp standalone configuration.
Adhoc network configuration is supported, no special entries in config.json are required on the client.
If the wakeup element is omitted, the default value 0 is used.

Protocol

Before the first payload data pulsetrain is sent, two wakeup preamble pulses are sent:
wakeup_type 0: 10750, 17750
wakeup_type 1: 9415, 89565

The protocol sends between 63 and 174 pulses like this:

10750 17750 2560 2560 2560 2560 4750 1280 1280 1280 1280 640 640 640 6340 840 640 1280 640 640 1280 640 640 640 640 640 640 1280 1280 640 640 1280 1280 640 640 640 640 640 640 640 640 640 640 1280 640 640 1280 1280 1280 640 640 640 640 640 640 640 640 640 640 1280 1280 640 640 1280 1280 640 640 640 640 640 640 640 640 640 640 1280 640 640 640 640 640 640 1280 640 640 1280 1280 1280 1280 1280 1280 1280 640 27500

followed by repetitive pulsetrains that have all the same content, if the button on the remote control remains being pressed:

2560 2560 2560 2560 2560 2560 2560 2560 2560 2560 2560 2560 2560 2560 4750 1280 1280 1280 1280 640 640 640 6340 840 640 1280 640 640 1280 640 640 640 640 640 640 1280 1280 640 640 1280 1280 640 640 640 640 640 640 640 640 640 640 1280 640 640 1280 1280 1280 640 640 640 640 640 640 640 640 640 640 1280 1280 640 640 1280 1280 640 640 640 640 640 640 640 640 640 640 1280 640 640 640 640 640 640 1280 640 640 1280 1280 1280 1280 1280 1280 1280 640 27500

The 56bit payload of the pulse stream is “Manchester” encoded with a symbol rate of 1280µS.
Each data transmission starts with SYNC pulses of 2560µS length.
The START pulse with the duration 4750µS in the header part defines the High level condition required for proper decoding and marks the start of data transmission. The end of the next pulse has a rising edge and depending on the length of the pulse either defines a neutral transition (pulse length 640µS) or a logical “1” (pulse length 1280µS).

The following footer values are currently supported:
27500, 32500

!--------!--------!--------!---------------!---!-------!-------!-------!-------/ .. /------!--------!
!     S   Y   N   C      H E A D E R           !      P    A    Y    L    O    A    D      ! FOOTER !   
!                                              !  1st     2nd     3rd     4th        56th  !        !
!--------!--------!--------!---------------!---!-------!-------!-------!-------/ .. /------!--------!
+  2560  +  2560  +  2560  +      4750     +640+ 1280  + 1280  + 1280  + 1280  / .. /1280  + 27500  +
!--------!--------!--------!---------------!---!-------!-------!-------!-------/ .. /------!--------!

         +--2560--+        +------4750-----+       +--1280-+       +--1280-+     .. /--+   
         !        !        !               !       R       F       R       F           F   
+--2560--+        +--2560--+               +--1280-+       +--1280-+       +---/ ..    +640+-27500--!

         +--2560--+        +------4750-----+   +640+   +640+   +640+   +640+        640+
         !        !        !               !   !   F   !   F   !   F   !   F           F
+--2560--+        +--2560--+               +---+   +640+   +640+   +640+   +---/ .. /  +640+-27500--!

         +--2560--+        +------4750-----+   +640+       +--1280-+       +---/       +640+
         !        !        !               !   !   F       R       F       R           R   !
+--2560--+        +--2560--+               +---+   +--1280-+       +--1280-+     .. /--+   +-27500--!

Data bits are encoded using the rising and falling edges of the pulse stream. A rising edge in the middle of a clock period encodes a logical “1”, a falling edge encodes a logical “0”. The footer with a length of 27500µS terminates the stream.

Group       A       B       C       D       F               G
Byte:       0H      0L      1H      1L      2       3       4       6       7
        +-------+-------+-------+-------+-------+-------+-------+-------+-------+
Content ! 0xA   + R-KEY ! C M D ! C K S !  Rollingcode  ! Remote Handheld Addr. !
        +-------+-------+-------+-------+MSB----+----LSB+LSB----+-------+----MSB+

Each Somfy remote control has its own unique address and uses its own rollingcode for protection of data. Typically a Somfy device can listen to multiple remote controls.

The pilight GUI interface supports the common remote control buttons UP, MY, DOWN. For all other command sequences, the CLI interface (pilight-send) has to be used.

GroupBit #config nameparamRangeDescription
A0-3 0xA key_left
B4-7rollingkey:-k rollingkey
C8-11command_code:-n0 to 15Command
state: my -m1My
state: up -t2Up
3My+Up
state: down -f4Down
5My+Down
6Up+Down
state: prog -g8Prog
9Sun+Flag (Telis Solaris RC)
10Flag (Telis Solaris RC)
D12-15 0 to 15Checksum
E16 - 31rollingcode:-c0 to 65535 Rolling_Code
F32 .. 55address:-a0 to 16777215 Addr. of remote controller

Configuration Steps

Configuring of the config.json file is a must do.
Use above example as a start.
To keep an existing Somfy remote control with pilight synchronized, ensure that the Somfy remote control address is configured in config.json and that pilight is able to properly receive the pulsetrains.
pilight will always try to keep track of the remote control, but the remote control is not doing the same with pilight, thus it is best that you configure your own remote address for pilight and that you program this “pilight remote address” into your receiver.

Examples

The corresponding CLI command of DOWN for a remote control with the address 3443485 using pilight-send is :

pilight-send -p somfy_rts -a 1234567 -f
pilight-send -p somfy_rts -a 1234567 -n 4

To program a Somfy RTS device for accepting a pilight connection, ensure that you have configured your config.json file, put the Somfy RTS device in programming mode and issue the prog command from the CLI using pilight-send (replace the address 1234567 with your own one):

pilight-send -p somfy_rts -a 1234567 -g -c 1 -k 1 -w 0

The Somfy RTS device should react as defined in the corresponding manual (roller shutters will move up and down, the programming LED turns off, the device will sound a beep, …).

Hints

Be careful with your config.json file as that is the place where the protocol is performing its housekeeping tasks.
If you have lost synchronisation, the easiest way to get back in sync is resetting the somfy device.
Reception distance with approved receivers should be 1 wall/5 meters minimum.
Transmitter distance with approved transmitters should be several meters. Distance varies, depending on supply voltage and quality of the antenna used it may be no more than one meter.
The problem is that the frequency of Somfy devices differs from the frequency of the standard 433 MHz devices.
Using a second pi in an adhoc network configuration, positioned close to the receiving device, is one possibility to increase area coverage.
If the config.json file contains multiple remote control addresses, rollingkey and rollingcode are updated individually for each remote control address. This does allow the creation of device groups and to handle them with one single remote control / button on the GUI.
To get started pick-up the address from your existing remote control and test all functions. Once it is working, configure a unique remote control address for the use with pilight.
If the rollingkey and/or rollingcode is specified on the CLI, those values are used, otherwise the values from the config.json file are used and automatically incremented.
Text shown on the GUI buttons varies with the GUI language of your browser.

Known Limitations

Support for the protocol is not yet part of the development branch, but of the s_mfy branch. Due to the frequency mismatch (433,42MHz vs. 433.92MHz) the approved standard transmitters will work over short ranges only.
Like most standard remote controls, the GUI interface of the s_mfy branch supports the 3 buttons DOWN/MY/UP, it does not support the simultaneous pressing of two buttons.
For programming mode, and for all other functions, you have to use the pilight-send CLI interface.
There is a possibility that the protocol stack interferes with other protocols, most notably IMPULS and/or X10 protocol. As a standard both protocols are disabled in the pilight configuration options. If you need them, it is appreciated yours enabling/disabling them and to report the results in the forum.
Programming of the favorite position is not yet supported from the GUI, use your existing remote control for this. There is a known bug in the address range, that is stopping pilight from starting up, until fixed please lower the number until pilight starts up.

Literature Aforementioned information was created based on the research and literature links provided from the following source:
https://pushstack.wordpress.com/somfy-rts-protocol/

somfy.txt · Last modified: 2016/05/18 10:36 by wo_rasp