New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Somfy RTS blind remote control via RF module #7870
Comments
Two more things: |
A PR is welcome. None of the main developers / contributors have somfy devices. |
I'm afraid my dev skills won't be sufficient for that :/ If nobody else is interested then I guess it'll just remain the hack on 4.1.1 for me |
Maybe someone does it. |
So, if the code was working, the integration should not be the problem. Regarding storing the rolling code counter and device ID, this is exaclty the same I was using for my keeloq integration for the jarolift roller shutter. So one should share this config setting? |
@pnuding: You need to test this please, since I do not have the Somfy hardware. This implements the SomfySet command with the parameters: Furthermore, there are SomfyUp, SomfyDown, SomfyStop and SomfyProg commands without parameter. So have fun using those with the shutter driver. |
I'd like to try this code and help because I own Somfy blinds, but it is, at least for me, not quite clear how. I've taken a look at the other repo, so should I connect this 433.32Mhz transmitter to the GPIO X? Am I able to use the Remote and the Sonoff Bridge? And last but not least, where could I find the code, or is it already in the release? I'd like to help but I'm stuck right now. |
@Chaosflori25 No, Sonoff Bridge can NOT be used for. You need a extra rf transmitter supporting the |
@Chaosflori25 basically yes, connect that transmitter with the appropriate frequency to one gpio pin. I don't see an issue at using the original remote and the tasmotized mqtt remote for the same shutter. It's about you to verify this. Other RF roller shutters i know are capable of "learning" the serials of multiple remotes. For the esp8266 hardware, you can use any device that has a spare gpio. I tested the code on a Wemos D1 R2. If you are able to build the firmware, download the development branch of my fork: https://github.com/he-so/Tasmota The binary is attached here. You need to configure the GPIO to the pin of your transceiver as shown in the screenshot. |
It took me a while to try this but in principle it looks good. Thanks so much for stepping in to help! |
Do you have the firmware known to work, so I can make a trace of the signal with a logic analyser and compare it to my fork. |
Sorry, i've had a bit of a trip down the rabbithole, but great idea with the logic analyser. |
The Arduino code in the meantime: /* This sketch allows you to emulate a Somfy RTS or Simu HZ remote. The rolling code will be stored in EEPROM, so that you can power the Arduino off. Easiest way to make it work for you: Then: //#include <EEPROM.h> #define REMOTE 0x123300 // Remote ID we're using (changeable) unsigned int rollingCode = 1; void BuildFrame(byte *frame, byte button); void setup() { Serial.print("Simulated remote number : "); Serial.println(REMOTE, HEX); void loop() { void BuildFrame(byte *frame, byte button) { // Checksum calculation: a XOR of all the nibbles //Checksum integration // Obfuscation: a XOR of all the bytes Serial.print("Rolling Code : "); Serial.println(code); void SendCommand(byte *frame, byte sync) { // Hardware sync: two sync for the first frame, seven for the following ones. // Software sync //Data: bits are sent one by one, starting with the MSB. digitalWrite(PORT_TX, LOW); delayMicroseconds(30415); // Inter-frame silence |
(note that in the above I had removed the bits with the eeprom for simplicity) |
Attachign the Sigrok Pulseview files for sending the "same" thing (Command "Up", Remote serial 123300, rolling code 1) with the Arduino code above and then with the code from the PR: However something is defo off here, my damn Somfy motor now ignores everything except my original remote, even a genuine remote i borrowed from my neigbors is not recognised. |
Ok, since both don't work, there is no point in looking for differences here. |
Thread continues on #7969 |
Have you looked for this feature in other issues and in the docs?
Yes, there was a discussion about using a Sonoff RF bridge but since Somfy's code is rolling things get messy
Is your feature request related to a problem? Please describe.
Somfy roller shutter motors run using their custom RTS protocol with rolling code and home automation integrations are very limited unless one splurge a lot of money on their integrator gateways
Describe the solution you'd like
I'd like to see an option to use a GPIO pin for a 433MHz RF module emitting Somfy commands, with Tasmota persisting the rolling code in flash
Describe alternatives you've considered
Some years ago when i encountered this need first with an awning equipped with a Somfy motor.
I found https://github.com/Nickduino/Somfy_Remote addressing the issue for Arduino, so i slapped together a hack onto Tasmota 4.1.1 which I was using at the time. It works but it's ugly (e.g. it has discrete commands for Prog, up, stop and down rather than using parameters as one should) and my skills aren't sufficient to integrate it nicely with current Tasmota versions.
It would be nice to get this functionality properly integrated.
Additional context
Attached is the xdrv I hacked together back then. It went with a GPIO pin definiton and modification for storing the rolling count.
Also my hacking version went with some lines for setting an inital rolling code and the remote ID, which probably should be done nicer
xdrv_somfy_send.txt
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: