SomfyPlus
HomeKit Controller for Somfy Motorized Shades
Install / Use
/learn @HomeSpan/SomfyPlusREADME
SomfyPlus - A HomeSpan Project
SomfyPlus is a universal, multi-channel, HomeKit Controller for Somfy RTS Motorized Window Shades and Patio Screens. Built using the HomeSpan HomeKit Library, SomfyPlus is designed to run on an ESP32 device as an Arduino sketch.
Hardware used for this project:
- An ESP32 board, such as the Adafruit HUZZAH32 – ESP32 Feather Board
- A 433 MHz RFM69 Transceiver, such as this RFM69HCW FeatherWing from Adafruit
- Three pushbuttons (normally-open) to serve as the Somfy UP, DOWN, and MY buttons (the MY button also serves as the HomeSpan Control Button), such as these 12 mm round tactile buttons from Adafruit
- One LED and current-limiting resistor to serve as the HomeSpan Status LED
- One LED and current-limiting resistor to provide visual feedback when the RFM69 is transmitting Somfy RTS signals
- a Adafruit FeatherWing Proto Board to mount the buttons and LEDs
Overview
Somfy motors are widely used to drive automated window shades, patios screens, and porch awnings. And though there are many different models, almost all are controlled with an RF system called RTS (Radio Technology Somfy) operated with Somfy RF controllers, such as the 5-channel Somfy Tellis RTS.
All Somfy remotes feature:
- an UP button that typically raises the window shade or screen until it is fully opened
- a DOWN button that typically lowers the window shade or screen until it is fully closed
- a button labeled "MY" that serves two purposes -
- if the shade is moving, pressing the MY button stops the motor
- if the shade is stopped, pressing the MY button moves the shade to a predefined position (the "MY" position)
- a PROGRAM button that is used to put the shade or screen into programming mode so you can link additional remotes
- a channel SELECTOR switch (if the remote allows the user to control more than one shade or screen)
Based on the superb work by Pushstack and other contributors, who reverse-engineered and documented the Somfy-RTS protcols (much thanks!), we can construct a fully-functional, HomeKit-enabled, multi-channel Somfy remote using an ESP32, a simple RF transmitter, and the Arduino HomeSpan Library.
Apart from the obvious benefit of having HomeKit (and Siri!) control of your Somfy shades and screens, a SomfyPlus remote also includes two additional benefits:
-
Control up to 32 channels! Have 20 window shades spread across 5 rooms? No problem - you can operate all of them with a single SomfyPlus device.
-
Use HomeKit to set the absolute position of your window shade or screen! HomeKit natively supports sliders that allow you to specify the exact position of a window shade, from fully open (100%) to fully closed (0%) in increments of 1%. Unfortunately, the Somfy RTS system does not generally support two way communications, nor do the motors transmit any status about the position of the shade or screen. However, some clever logic inside the sketch and a few timing parameters is all that is needed to configure SomfyPlus to track and directly set a window shade to any desired target position.
Before You Begin
This is an intermediate-level project that assumes you are already familiar with HomeSpan, including how to:
- compile Arduino sketches using the HomeSpan Library;
- configure a HomeSpan device with your home network's WiFi Credentials;
- pair a HomeSpan device to HomeKit;
- use the HomeSpan Command Line Interface (CLI); and
- use the HomeSpan Control Button and Status LED.
If you are unfamiliar with these processes, or just need a refresher, please visit the HomeSpan GitHub Repository and review Getting Started with HomeSpan before tackling this project. Note that configuring SomfyPlus to operate your own shades and screens does not require you to develop any of your own HomeSpan code but you nevertheless may want to first try out some of the HomeSpan Tutorials to ensure HomeSpan operates as expected in your environment.
Step 1: Configuring SomfyPlus and Uploading the Sketch to an ESP32 Device
SomfyPlus is designed to operate as a HomeKit Bridge where each each window shade or screen is implemented as a separate HomeKit Accessory containing a single instance of a HomeKit Window Covering Service. The logic for each Somfy shade or screen is encapsulated in the SomfyShade() class.
To customize SomfyPlus for your own home, simply modify the SomfyPlus.ino sketch file and create an instance of SomfyShade() for each Somfy shade or screen you want to control with with SomfyPlus as follows:
new SomfyShade(uint8_t channel, char *name, uint32_t raiseTime=10000, uint32_t lowerTime=10000);
- channel - the channel number you want to assign to the window shade or screen. Must be between 1 and 32
- name - the name of the Somfy Shade as it will appear in the Home App on your iPhone
- raiseTime - the time (in ms) for the shade to raise from fully closed to fully open (optional, default = 10 sec)
- lowerTime - the time (in ms) for the shade to lower from fully open to fully closed (optional, default = 10 sec)
For example, the code snippet below would be used to create 4 window shade/screens in SomfyPlus. Note that the channel numbers you specify do not need to be consecutive - they can be in any order:
new SomfyShade(1,"Screen Door");
new SomfyShade(2,"Living Room Window Shade");
new SomfyShade(6,"Den Blinds",8500,7300);
new SomfyShade(3,"Den Curtains",9000,9000);
Feel free to leave the raise and lower times for your shades as the default of 10 seconds. These times can be calibrated later with SomfyPlus once your remote is fully operational. Note you can add, remove, or modify your channel configuration at any time, even after SomfyPlus has been paired with HomeKit. Changes you make will automatically be reflected in the Home App on your iOS device. However, once you link a shade to a specific channel (see below) that channel must always be used for that same shade unless you unlink the shade.
Complete this step by compiling and uploading your configured SomfyPlus sketch to an ESP32 device.
Step 2: Connecting SomfyPlus to Your Home Network and Pairing with HomeKit
Once the sketch has been uploaded, connect SomfyPlus to your home network as you would any HomeSpan device. Next, pair SomfyPlus to HomeKit. For each instance of the SomfyShade() class in your sketch, you should now see a Tile in your Home App that allows you to control the shade.
Once you have verified the Tiles operate as expected, proceed to the next step.
Step 3: Constructing the Hardware
In addition to an ESP32 board, SomfyPlus requires a "433 MHz" transmitter. However, rather than using a standard carrier frequency of 433.92 MHz, Somfy RTS uses a carrier frequency of 433.42 MHz, which is 0.5 MHz lower than the standard. Though it is possble to use a standard 433.92 MHz transmitter (such as the one used to construct a HomeSpan remote control for a Zephyr Kitchen Vent Hood), there is no guarantee that the Somfy motor will accurately receive the RF signal, or that the range will allow for whole-home coverage.
Instead, this project uses an RFM69 programmable 433 MHz transceiver that can be configured to generate a carrier frequency of 433.42 MHz to properly match the Somfy RTS system. The ESP32 communicates with the RFM69 via the ESP32's external SPI bus. This requires you to connect the MOSI, MISO, and SCK pins on your ESP32 to those same pins on your RFM69. If you are using Adafruit's RFM69 FeatherWing in combination with Adafruit's ESP32 Feather Board, these connections are already hardwired for you. However, you'll also need to make these 3 other connections between the ESP32 and the RFM69 (see diagram below):
-
The SPI Chip Select ("CS") Pin on the RMF69 needs to be connected to a pin on the ESP32 that will be used to enable the RMF69 SPI bus. This sketch uses GPIO pin 33 on the ESP32 for the RFM69 Chip Select. If you are using the AdaFruit combination of boards above, simply solder a jumper wire between the through-holes labeled "CS" and "B" ("B" is conveniently hardwired to GPIO pin 33) on the RFM69 FeatherWing.
-
The Reset Pin on the of the RFM69 needs to be connected to a pin on the ESP32 that will be used to reset the configuration of the RFM69 settings. This sketch uses GPIO pin 27. If you are using the AdaFruit combination of boards above, simply solder a jumper wire between the through-holes labeled "RST" and "A" ("A" is conveniently hardwired to GPIO pin 27) on the RFM69 FeatherWing.
-
The DIO2 Pin on the RFM69 needs to be connected to a pin on the ESP32 that will be used to output the Somfy RF codes generated by SomfyPlus so they can be read by the RFM69 and converted to 433.42 MHz signals. This sketch uses GPIO pin 4. If you are using the AdaFruit combination of boards above, simply solder a jumper wire between the through-holes labeled "DIO2" and "F" ("F" is conveniently hardwired to GPIO pin 4) on the RFM69 FeatherWing.
You can of course use different pins for any of the above connections. Just make sure to update the pin definitions at the top of the sketch to match whatever pins you have chosen:
// Assign pins for RFM69 Transceiver
#define RFM_SIGNAL_PIN 4 // this is the pin on which HomeSpan RFC
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
