ESP Somfy RTS Integration

To start with, very nice project!! Appreciating all the effort put in, it is a lot of work.

I am controlling my Somfy RTS Sonesse blinds currently with RFLink. Decided to give this project a try since it would be nice to know the state of the blinds. So i ordered a ESP32 board and the antenna. I got it working so far with my Somfy RTS Sonesse blinds and my Telis 4 Lounge remote.

But what i notice is that the percentage is not really precise. So i already played with the “Step Size” since i have the 80-Bit variant. But i cant get it to fully work, it feels like sometimes my blind does a mini move when fully closed and i scroll the wheel 1 step and this causes the out of sync?

When i configure the “My” position and i tilt the blinds some random steps, the my position never goes to the position i programmed it within the UI. Is this a known issue, or am i doing something wrong here?

On the old RFLink integration i have only the option for full open, full down, or the MY position, When i hit the my position its always the same programmed position, no matter what i put my blinds at. If i put them half up and then tilt, always goes into the correct position.

Ok I managed to make it work for some reason the pins for tx and rx where inversed in the app. Made a new board. Something happens in the app that inverses rx with tx gpio 13 with 12 I remade it now I will see how long will it last.
I do have 2 errors though. One it is not the correct time it says its 2019 for some reason and second is this error: E (298) psram: PSRAM ID read error: 0xffffffff

this is the logs:
[21:46:09]ets Jul 29 2019 12:21:46
[21:46:09]
[21:46:09]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[21:46:09]configsip: 0, SPIWP:0xee
[21:46:09]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[21:46:09]mode:DIO, clock div:1
[21:46:09]load:0x3fff0030,len:1344
[21:46:09]load:0x40078000,len:13964
[21:46:09]load:0x40080400,len:3600
[21:46:09]entry 0x400805f0
[21:46:09]E (298) psram: PSRAM ID read error: 0xffffffff
[21:46:09]
[21:46:09]Startup/Boot…
[21:46:09]Mounting File System…
[21:46:09]File system mounted successfully
[21:46:12]Chip Model ESP32-
Preference IP Free Entries: 477
SECURITY Type:0 Username: Password: Pin: Permissions:0
[21:46:12]Connection Type: 1
NTP Settings
[21:46:12]pool.ntp.org TZ:CET-1CEST,M3.5.0,M10.5.0/3
[21:46:12]WIFI Settings
[21:46:12] SSID: [redacted] PassPhrase: [redacted]
[21:46:12]
[21:46:12]Launching web server…
[21:46:12]Creating Web MicroServices…
[21:46:13]WiFi Mode: 0
21:46:13 WiFi interface ready
[21:46:13]WiFi station mode started
[21:46:13]Socket Server Started…
[21:46:13]App Version:2.4.6
shades.cfg exists so we are using that
[21:46:13]Reading header at 0
version:24 len:76 roomSize:29 roomRecs:4 shadeSize:276 shadeRecs:5 groupSize:200 groupRecs: 0 pos:76
Applying radio settings Setting Data Pins RX:12 TX:13
Setting SPI Pins SCK:18 MISO:19 MOSI:23 CSN:5
Radio Pins Configured!
[21:46:13]Successfully set up the radio
[21:46:13]Enabled receive on Pin #12 Timing: 1
Initializing RX Queue
21:46:17 Completed scan for access points (1)
Connecting to AP CC:00:F1:58:4E:58 CH: 10
WiFi begin…
[21:46:35]Timing Net: 113ms
(evt) Connected to WiFi STA access point
21:46:35 Got WiFi STA IP: 192.168.1.30
[21:46:35]Setting connected…
[21:46:35]
[21:46:35]Successfully Connected to WiFi!!!192.168.1.30 (-59dbm)
[21:46:35]MDNS Responder Started: serverId=6772B4
Max Heap: 110580
[21:46:35]Free Heap: 166120
[21:46:35]Min Heap: 161212
[21:46:38]Socket [0] Connected from 192.168.1.3 url: /
Initializing Socket Client 0
SSDP: urn:schemas-rstrouse-org:device:ESPSomfyRTS:1 - true
Connected to SSDP…
[21:46:44]Socket [1] Connected from 192.168.1.25 url: /
Initializing Socket Client 1
Client 1 joining room 0
Max Heap: 90100
[21:46:44]Free Heap: 135956
[21:46:44]Min Heap: 132748

Hello I have trouble with the my position. I have outside blinds with slats that when i press the normal remote on the my button it goes all the way down and then the slats tilt to open or if i press it when the blinds are moving it just stops.
On the app it just stops. I do not know how to make them tilt open.

I have 6 Somfy blinds. One lost its lower limit setting so I had to reset the blind. This blind was called “Nook Center.”

I deleted “Nook Center” from ESP Somfy and added it back in. (Probably should have re-paried, I guess).

The pairing worked fine and I could control the Nook Ceter via the ESP Somfy interface. BUT, it also, at the same time, runs the Kitchen blind. If I tell the “Nook Center” to lower then the “Kitchen” also lowers. (Those blinds are on different physical remotes.)

If I tell the “Kitchen” to lower just the kitchen lowers. So, I’m a bit confused.

The physical remote only runs the “Nook Center” – that is, it doesn’t also run “Kitchen”.

How is it that ESP Somfy is running both blinds?

The Kitchen and Nook Center do not share the same Remote Address.

I do not have any groups set up.

Should I un-pair where possible and set everything up again?

It appears you have both addresses stored in the Kitchen motor. To fix: using your physical remote press and hold the prog button on the back of the remote – The kitchen blind should jog. Next open the the virtual remote tab in ESPSomfy RTS and select the Nook Center blind from the dropdown then press the prog button. The kitchen blind should jog once to indicate it was unpaired from the address. Short press the prog button on the physical remote to close the programming.

This can happen when you have more than one motor in paring mode at the same time.

Thanks, that fixed it. Kind of odd because the two blinds are run by completely different remotes.

Here’s another odd behavior, which I missed originally. In that image from my post “Living Room Left” has gone missing. So, I simply clicked “Add Shade” and typed “Living Room Left” and it showed up as already paired. And indeed works to control the blind. But then another blind vanished: Nook Left. Now it looks like this:

So, again, I added back “Nook Left” and it also showed already paired:

and again it shows that it is paired.

But now “Nook Right” is missing.

Do I need to upgrade to the “Gold” subscription to have more than five shades at a time? :wink:

Here’s another image showing the existing shades:

Update: All working now.

Later in the day I tried adding Nook Left, and then Kitchen vanished. Later I created a backup (below) and reviewed it and could see there’s only 5 blinds.

Is it possible “Add Shade” was somehow replacing an existing shade? That would explain how they were already paired after adding.

I then added “Kitchen” back in and now there are six blinds. Although the Kitchen was operating “Nook Right” after first adding it back, so I had to re-pair both of those.

Backup file
 24, 76,   29,  0,  276,  5,  200,  0,   77,  1,   75,  171,   74,FC0384+++
  1,false,  0,    102721,Nook Center         ,  0,  0, 56,     10000,     10000,      7000,  100,   5404990,         0,         0,         0,
  2,true ,  0,    102722,Living Room Left    ,  0,  0, 56,     10000,     10000,      7000,  100,   5273918,         0,         0,         0,
  3,true ,  0,    102723,Living Room Right   ,  0,  0, 56,     10000,     10000,      7000,  100,   5339454,         0,         0,         0,
  4,true ,  0,    102724,Nook Left           ,  0,  0, 56,     10000,     10000,      7000,  100,   5470526,         0,         0,         0,
  5,true ,  0,    102725,Nook Right          ,  0,  0, 56,     10000,     10000,      7000,  100,   1049647,         0,         0,         0,
         0,         0,         0,         0,         0,         0,         0
"v2.4.6","ESPSomfyRTS","pool.ntp.org","PST8PDT,M3.2.0,M11.1.0",false,true+
  1,true ,"192.168.0.200","192.168.0.1","255.255.255.0","192.168.0.1","192.168.0.1","mqtt://","ESPSomfyRTS", 1883,false,"","homeassistant",  0,
true ,  0, 56, 18,  5, 23, 19, 13, 12,   433.420,    99.97,    47.60,  10

Any idea what I was doing wrong? I was just clicking Add Shade and filling in the name.

@Linax Hi Linax

May I ask you, how you managed to pair ESPSomfy with your IQ2 motors?
I have tried many times now, and I simply cannot get the IQ2 motors to pair, even though all my other motor types have paired easily.

Today I asked Google Gemini, and it suggested that “IQ2 motors employ an enhanced rolling code system with increased security”?
If that is true, how did you then get ESPSomfy to handle that?

Cheers,
Alex

Got it working, finally. Like some others above I had TX and RX switched.
@rstrouse tries to keep us sharp :grinning:. In the hardware setup instructions the TX and RX are switched compared to the default settings in ESP Somfy.

All seems to work. 100% sure I followed the hardware instructions. The remote shows up in the logs etc. …untill you try to pair. I discoverd after I read an issue here: RX an TX are switched in the settings.

Hi @alex.zilmer

Sorry for the late reply.

Did not do anything special but follwed this guide. It could be that you have already paired the maximum amount of remotes to it. I had one motor where i had to “Delete all settings” and start from scratch to get it working.

1 Like

Hello all,

Hopefully one of you is able to help me.
I found this project and it sounded like heaven to my ears because I have 4 blinds and a sunscreen of Somfy. And I’m looking to buy a Somfy curtain rail.

Excited as I was I bought a wesp32 POE board and a E07-M1101D transceiver.

Put it all together and I was able to put the ESP Somfy firmware on it. But after configuring it I can’t get the transceiver working. And it keeps saying “radio not initialized”

I first followed the configuration for the wesp32 in the github post, but that didn’t work. And then I tried putting it all together with the wesp documentation.

I have the following configured:
SCLK = GPIO-18
CSN = GPIO-05
MOSI = GPIO-25
MISO = GPIO-32
TX = GPIO-33
RX = GPIO-39

And the wiring from the E07-M1101D to the Wesp32 is as followed:
First column is the pin of the transceiver, the second column is the pin of the wesp32
1 = 1
2 = 2
3 = 10
4 = 12
5 = 3
6 = 11
7 = 7
8 = 5

wesp32 diagram:

Thank you Linax.
I have 4 of these, so I am going to try them all, where until now I have only tried to get two of them connected.
Cheers,
Alex

I am having the exact same issue! I just built my ESP32 board and got this project working (which is awesome, BTW – thanks @rstrouse!). The device itself works great for controlling the shade via virtual remote, and the HA integration works when I manually trigger the device. But for the life of me, I cannot get the actions to work as the action of an automation triggered by a Lutron Pico button press (using the Caseta integration/I have a RadioRA3 setup). The virtual controls in HA do start moving as a result of the button press but the actual shade does not.

Is this some issue with the Lutron eventing? Or something with HA, or this project? I’m very new to HA so just learning how to debug and diagnose issues – any pointers would be appreciated. And if you got this working on your end, @hyperfive, can you share what the fix is?

OK, I finally figured this one out. Turns out Lutron Pico’s and Somfy seem to use the same 433Mhz frequency, and when you press a Pico button it transmits for a few seconds to make sure the command is sent. If you try to transmit a Somfy command during that time, it seems the motor doesn’t understand it. So the fix for me was to set the number of retries in the ESPSomfyRTS config for the shade to 10. Now, the automation works as expected, albeit with a bit of a delay until the Pico finishes transmitting the button press. If anyone’s got insight into how/whether the transmit time can be reduced on the Pico, I’d love to know!

Issue is fixed with the pins I found in karibou54’s post: On that picture the SCK and MOSI needed to be switched and now the Radio not initialized is gone.

Hi! Maybe someone can assist me here. I have the following diagram, I managed to map 3v3,GND, RX, TX … but have a hard time finding MISO,MOSI, CSN and SCK. Anyone an idea which of these Pins that would be? Would be great if someone can help.

Hello, thanks for the work done so far
I setup my own and tried to use home assistant integration. It works as expected with covers. I can click on up / down or my.
One of my shade is of type garage (1 button). In home assistant I do not have any control to toggle the door. Is this behavior expected ?
If I add a button with toggle action I have an error telling me that close cover is not supported. This is expected as in EspSomfy the entity is defined a 1 button.
How to map toggle action ?

Thanks