ESP Somfy RTS Integration

I made a second attempt, refreshed the browser and now i got a backup file.
Means as a next step a fresh installation and load the backup afterwrads?

That is the shortest route. I am taking a spare device and loading the 2.0.3 firmware then attempting an upgrade to see if there is anything with that. I have not seen an instance where it thought it actually loaded a firmware but it really did not. The logs you have above are reading out of the client data on the ESP file system and it clearly has an old version on it.

You can do a fresh install and in the meantime I will see what I can do to break it on a spare device.

If i remember it right it happend after i configured MQTT in parallel to my WiFi. Can that be an issue?

Can you shut down the broker? There are protections from overzealous qos on the MQTT client so I donā€™t think it is eating up cycles from MQTT. I added these a while back because while MQTT is relatively quick to publish and receive, it takes a long time to connect and handshake on the ESP. Shutting down the broker and restarting the device should rule any of that out as the subscriptions will not be made if the broker cannot be contacted.

I made fresh install and restored the backup but the shades where not restored. Then i noticed that the created backup file via browser was empty.

Luckily i had an older backup and that worked. The shades are available again. But i can not control the shaded via the web interface. Maybe the rolling code is asynch?

Yes the rolling codes are likely the issue. How long ago was the backup from?

Two month ago

Try adding the number of estimated times you have moved the shade over the last two months to the Set Rolling Code. The motor should recognize it if it is within whatever magical number that is acceptable to it. Also, please ensure the TX pin is set to 13 and the RX pin is set to 12 on the transceiver settings.

1 Like

I am going to disable the mqtt broker during firmware upload in a future release. I have not seen an instance where the littlefs upload failed to write the partition and still applied the update. In the past there was an instance where the user needed to manually remove power from the device after it updated because the firmware wouldnā€™t install. I am trying different scenarios to break it and cannot get it to chokeā€¦ yet.

1 Like

Actually you will find the lastRollingCode in the MQTT data. If you use MQTT explorer you should see it there as it is published.

Iā€™m having a heck of a time getting the radio working on my handbuilt version. Iā€™m using this radio:
CC1101 433M Wireless Transceiver Module [Version] ā€“ ElectroDragon
and while my ESP says it can configure the radio, no events show up when I push the button on my Somfy remote.

Iā€™ve tried sweeping through the bandwidth and frequency deviation settings, and nothing seems to work.

Iā€™ve also tried swapping antennas, to no avail as well.

Any tips for the non-RF engineer?

From a non-RF engineer to another non-RF engineer here are some tips.

  1. Look on your remote for any signs of the these two letters in sequence io. If this is a Somfy IO controller then it will not work. This is for RTS motors only.
  2. Double check the wiring from the ESP to the Transceiver. The wire that is connected to GDO0 on the transceiver should be connected to GPIO pin that is set up in the radio section as TX. The GDO2 wire should be connected to the one that is set up in the radio section as RX.
  3. Shoot a picture of the transceiver they sent you as your link has pictures of transceivers that I have not used.


The Somfy controller Iā€™m using has on the back:
74300 - France
TELIS
RTS US PATIO
5012858B0103
Made in Tunisia
GX125

Based on the information from your remote this should work beautifully. The pictured transceiver however may be the issue. It looks like the pictures in the electrodragon web site show different versions of the board. The one you are showing there does look like it uses a cc1101 chip which I circled in red but it appears to also use a separate amp circuit because I see some power regulators and other circuitry that appears to need power from another source. Do you have a pinout for this transceiver by chance.
image

Thereā€™s a silkscreened pinout on the board, and I couldnā€™t find a pinout elsewhere. It doesnā€™t show up well in the image, but the pinout that I have been using is (from top to bottom, left to right, top of board):

5V    GND
5V    GND
3V3   SI
SO    SCLK
PMC   GDO2
CSN   GDO0
NC    NC
NC    NC
GND   GND

I made the following assumptions while wiring:

SO   -> MISO
SI   -> MOSI
SCLK -> SCK
3V3  -> VCC

and left PMC unconnected. I didnā€™t want to connect 5V, as Iā€™m pretty sure that the ESP32 isnā€™t 5V tolerant. It sorta works, in that I donā€™t get a 'RADIO NOT CONFIGURED` error (and the logs donā€™t show any errors, either); but, as Iā€™ve said, it doesnā€™t seem to be receiving anything.

I assume you connected GDO0 to the TX pin and GDO2 to the RX pin as well. The 5v might be for the amplifier which probably needs engaged. The CC1101 is also not 5v tolerant. I could not find any documentation that says how to hook this up. And I would be hesitant to add 5v to the 5v pins as well without assurance there is some isolation with it.

Yes, GDO0 connected to TX, GDO2 to RX, CSN to GPIO 5.

Iā€™ve decided to get a different radio and will try again next week.

First, thanks for you amazing work on this! Iā€™ve been suffering using the MyLink. Everything works fine directly from the ESPSomfy RTS web interface, and I can control individual shades perfectly from the Home Assistant. However, the groups I configured in the ESPSomfy interface come up as essentially empty entities in Home Assistant. See the screen shot below. ā€œAll Shadesā€ is defined within ESPSomfy as a group. Any advice you can give would be appreciated.

Screenshot_1

Did you link any of the existing motors to the group? If so post a backup of your config and I will run it through the plugin.

EDIT: You may also need to reload the integration after making changes to the group. This is because it use the covergroup entity in HA.

thanks for this great piece of work. my blinds work great.
i just have a problem now, after a couple of weeks, i cannot login to my ESP Somfy. i get to the login page, write my login details, but nothing happens when i push login. anyone tried and fixed this issue?
My curtains still work as they should through HA