ESP Somfy RTS Integration

I will look into this. No sure exactly how to allow this configuration and what it would do to group management but there is a nugget here.

By the way I got the integration working, I hadnā€™t updated my HA instance since 2022 so after updating, it showed up and integrated flawlessly.

Iā€™m trying to compile SomfyController.ino with all of the files and am not having a lot of luck, I added all the libraries and when I compile and upload, trying to access it via 192.168.4.1 gives this error: Error opening/index.html.

As for the light level sensor, as I wanted the exact values to use with my HA instance, I added the following:

header:

#include <Wire.h>
#include <BH1750.h>
unsigned long send2mqtt = 0;

to void setup:

Wire.begin();
lightMeter.begin();

and I added a function that I call in the loop:

void light2mqtt(){
  float lux = lightMeter.readLightLevel();
  if (millis() - send2mqtt >= 1000) {
  send2mqtt = millis();
  if(mqtt.connected()) {
    mqtt.publish("somfy/lightlevel",String(lux));
    }
  }
}

It did compile but I canā€™t test it as the webpage wonā€™t load. Troubleshooting now, in case you know what the issue is and can help me speed things along. Thanks!

This is because there is a file system that must be uploaded. This is pre-compiled on the SomfyController.littlefs.bin so if you install the onboard file then recompile your firmware to export compiled binary you can upload your firmware and not have to mess with the littlefs. If you donā€™t then that is a much larger subject where you must install the tools to perform an ESP32 Sketch Data upload.

Thank you so much for the quick reply, worked like a charm testing it on a 2nd esp32 chip. Now that the code works, if I update the firmware on the actual controller, it keeps all of my shades and settings or do I have to restore from backup? Assuming it should keep all of the settings, right?

It should keep all your shades and settings.

1 Like

Please submit an issue here so I can better track this functionality. I need to know a few things about how these are energized. For instance, is there a limit switch or does the ESP32 need to honor the timing for the up/down? I currently have this working (I think).

I have the LilyGO T-Internet POE and flashed using ESPHome Web.
I flashed ā€œSomfyController.onboard.esp32.binā€
I got the message flash

But after powering it with PoE it just doensā€™t work. No activity on the LAN port lights, only the blue LED of the board works.

Any pointers? Yes I reflashed again same result. Before flashing I powered up the Lilygo and got an IP adres 192.168.1.198 I was thinking that would be the interface but nope. Also canā€™t find any new IP in the DHCP listā€¦

Ensure you have removed any jumpers required for flashing the device and you must not connect PoE and external power at the same time.

Just figured it out, it was worseā€¦ I should start readingā€¦

Last part of Installing the Firmware:
ā€œThen follow the instructions to connect the device to your network in the Configuring the Software wiki.ā€

ā†’ When the software is first connected it will start its own ESPSomfy RTS wifi network in Access Point (AP) mode. You will need to connect to this network so you can configure ESPSomfy RTS to connect to your network.

I was on my desktop without WiFi, the SomfyRTS was broadcastingā€¦ Connecting to the AP and going to 192.168.4.1 and changing the adapter and choosing the right type makes it work.

The good news is that you no longer need AP mode.

1 Like

This works incredible. Thank you so much for contributing such an amazing integration. This works so much better than the manufacturers version.

Is there a way to send the toggle command via home assistant. That is the only button that seems to call the my preset. The my button only works only as a stop button. When I use the virtual keypad the toggle button functions as the my button and the stop button.

@hyperfive Interesting. Which motors and remotes do you have?

Somfy RTS Tells remote. Itā€™s not a big deal, as the positions seem to be working.

One strange and problematic issue I am experiencing is the shades work perfectly from the ESPSomfy web app, the home assistant integration, and mqtt integration as well. They work by clicking up / down / stop in the apps. However when I program them in an automation to move up / down when a pico button is pressed they do not move. It shows in the app that the shade is opening/closing/stopping but they donā€™t move under any circumstance. If I click run automation in the browser they move fine. Iā€™ve tried both cover open and ESPSomfy open service as well as calling the HACS entity as well as the MQTT entity and they all respond the same. It shows in the emulator / ui that the shade is moving but the actual motor does not move.

This is the only thing I am unable to get working. FYI Iā€™m running the latest app & firmware on the unit.

Thank you so much for your help.

Install the firmware from Main using the github update. Also, are you running the plugin or using MQTT discovery? If you are using the plugin use the ESPSomfy RTS services.

Iā€™ve tried both the plugin and mqtt integration. Both work when I use the device / entity controls. But neither work when I trigger them from automation. Using both espsomfy service for plugin and regular cover service for mqtt

It shows they are moving but the motors donā€™t move.

Same effect on multiple shades.

I even tried making a script that calls the shade open service and it works if I press run script but if I call it from an automation it shows they are moving but it doesnā€™t fire the motor.

Did you update your device to 2.1.1b?

Hmmmā€¦ I just added an automation to my test system and it sent the appropriate radio signals to move the motors. Can I get you to open an issue on the repository and post your backup file?

HI. Love the little project - my first venture into Pi and these little boards. All gone well thanks to your great clear instructions until I try to congifure the device in HA. It gives me this screen :
image

I can access the ddevice directly on the IP it is using.

Is it obvious and I am showing my inexperience ?

Mike

@GenevaMike60 please restart home assistant and refresh your browser. This sometimes happens after installing a HACS component without a restart. Its like Home Assistant knows about the integration be hasnā€™t loaded the required dependencies.

Thanks for the quick response. Done that and no joy. Also tried switching from Firefox to Chrome with no joy. Any other suggestions appreciated