Modul-Entwicklung: Somfy RTS

Begonnen von thdankert, 12 Juli 2014, 21:04:31

Vorheriges Thema - Nächstes Thema

RaspiLED

Hi,
als workaround evtl. eine Abwandlung einer notify Endlosschleife:

define SomfyClose notify SomfyButton:state.defined set SomfyButton on

Über das Ende müsste man sich noch Gedanken machen (evtl. Nach gegebener Zeit attr SomfyClose disable 1)

Gruß Arnd


Raspi2 mit FHEM, CUL, MySensor, HomeBridge, Presence, Bravia, ...
Raspberry Pi mit FHEM, CUL, Signalduino, MySensors, HomeBridge, Presence, WifiLight2, Bravia, ...

gessi

Zitat von: viegener am 15 März 2017, 16:08:04
Oh je - das sieht noch nicht gut aus. Kannst DU noch einen Versuch machen:

Zweimal kurz hintereinander on senden, während sich das Rollo noch bewegt?

(Das Verhalten bei stop ist übrigens ganz normal weil es für my-pos keinen eigenen Befehl gibt sondern stop heisst entweder anhalten in der Bewegung oder my-pos wenn der Rolladen still steht)

Hast Du eigentlich so eine Fernbedienung, wie auf dem Bild? Wenn ja könnte man ja mal versuchen rauszufinden,w as die Fernbedienung sendet. Ich vermute, dass die Fernbedienung vielleicht alle 2-3 Sekunden weitere Fahrbefehle sendet und dadurch der Effekt erreicht wird.

Das hatte ich Anfangs auch vermutet aber ich denke das macht die Fernbedienung nicht... es passiert nämlich Nichts wenn man den On Button wiederholt drückt während sich der Rollo nach unten bewegt. Erst wenn dieser wieder gestoppt ist kann man per On den Rollo bewegen.

Ja ich habe diese Fernbedienung, in der Mitte befindet sich das Drehrad für die Lamellen. Ich kann mit meinem Signalduino die original FB auslesen wenn Du mir sagst wie ich das machen soll.

habeIchVergessen

Zitat von: viegener am 15 März 2017, 16:08:04
Hast Du eigentlich so eine Fernbedienung, wie auf dem Bild?

die Telis 4 Mod/Var RTS sollte das erweiterte Funkprotokoll senden (Lamellen-Stellung). Falls SIGNALduino benutzt wird, könnte man auch das Senden dort korrigieren (die abschließende Pause wird weg gelassen).

gessi

Zitat von: habeIchVergessen am 16 März 2017, 10:50:32
die Telis 4 Mod/Var RTS sollte das erweiterte Funkprotokoll senden (Lamellen-Stellung). Falls SIGNALduino benutzt wird, könnte man auch das Senden dort korrigieren (die abschließende Pause wird weg gelassen).

Danke für den Hinweis, ja ich denke Du hast Recht. Ich nutze einen Singalduino (siehe Screenshot). Kannst Du mir jetzt noch erklären was ich genau machen muss?

habeIchVergessen

00_SIGNALduino.pm ändern

alt

"43" => ## Somfy RTS
{
name => 'Somfy RTS',
id => '43',
clockrange  => [610,670], # min , max
format => 'manchester',
preamble => 'Ys',
clientmodule => 'SOMFY', # not used now
modulematch => '^YsA[0-9A-F]{13}',
length_min => '56',
length_max => '56',
method          => \&SIGNALduino_SomfyRTS, # Call to process this message
msgIntro => 'SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;',
#msgOutro => 'SR;P0=-30415;D=0;',
frequency => '10AB85550A',
},


neu

msgOutro => 'SR;P0=-2560;D=000000000000;',


reload 00_SIGNALduino/shutdown restart

wenn du verbose auf 4 gestellt hast, dann kannst du bitte mal die empfangenen Nachrichten posten. Länge interessiert mich. Sollte dann > 56 sein.

viegener

Zitat von: habeIchVergessen am 16 März 2017, 10:50:32
die Telis 4 Mod/Var RTS sollte das erweiterte Funkprotokoll senden (Lamellen-Stellung). Falls SIGNALduino benutzt wird, könnte man auch das Senden dort korrigieren (die abschließende Pause wird weg gelassen).

Hast Du einen Link zum erweiterten Protokoll ?
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

habeIchVergessen

#231
wenn ich mich recht erinnere, denn gibt es nur wage Beschreibungen.
32 zusätzliche Bits + das 1 Bit nach v1-Daten ist HIGH (schwirrt mir noch im Kopf).

FIG. 4 shows the organization of the data in a new generation RTS frame. It is seen that the frame of the new generation protocol contains a first part constituted by an RTS base frame of 56 bits to which a second part constituted by 24 bits of additional information is added; in particular a relay bit and 23 other bits which can be used for the transmission of data complementary to the data of the base frame. In the context of the invention, the second part of frame transmitted is preferably linked to the first part, i.e. the second data will make it possible to better define the information of the first data transmitted in the RTS base frame. For example, the additional information completes or parameterizes the RTS base frame by adding new functionalities and new parameters, whilst tightening the security of the transmission, etc. The additional information does not necessarily have an intrinsic value, i.e. it may be of no purpose is it is taken independently of the RTS base frame. In this case, if the information of the data of the first part of frame is encrypted for security reasons, it will not be necessary to encrypt the information of the second additional data of the second part of the frame, which in itself does not have a particular control function. If the second data of the second part of the frame had to be encrypted however, the same encryption key as that used for the first data of the RTS base frame could be used, or another encryption key, transmitted with the second data in the second part of the frame.

sind nur 24 zusätzliche Bits.

gessi

#232
Zitat von: habeIchVergessen am 16 März 2017, 12:01:36
00_SIGNALduino.pm ändern

...

wenn du verbose auf 4 gestellt hast, dann kannst du bitte mal die empfangenen Nachrichten posten. Länge interessiert mich. Sollte dann > 56 sein.

So ich habe nun Folgendes gemacht:
1. Die Datei /opt/fhem/FHEM/00_SIGNALduino.pm angepasst (sieht nun so aus):
"43" => ## Somfy RTS
                {
                        name                    => 'Somfy RTS',
                        id                              => '43',
                        clockrange      => [610,670],                   # min , max
                        format                  => 'manchester',
                        preamble                => 'Ys',
                        clientmodule    => 'SOMFY', # not used now
                        modulematch     => '^YsA[0-9A-F]{13}',
                        length_min              => '56',
                        length_max              => '56',
                        method          => \&SIGNALduino_SomfyRTS, # Call to process this message
                        msgIntro                => 'SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;',
                        msgOutro                => 'SR;P0=-2560;D=000000000000;',
                        frequency               => '10AB85550A',
                },


2. Das Modul neu geladen und FHEM neu gestartet:
reload 00_SIGNALduino
shutdown restart


3. Verbose Level auf "4" gesetzt
attr sduino verbose 4

Also wenn ich nun "ab" bzw. "on" drücke dann passiert wieder fast gar nichts.... Folgendes steht im Logfile:
2017.03.16 15:08:56 4: sduino/set: sending via SendMsg: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=A9E8E821333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:56 4: sduino SendFromQueue: msg=SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=A9E8E821333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:56 4: sduino/msg READ: write new ccreg  10AB85550A
2017.03.16 15:08:56 4: sduino/msg READ: Received answer (write new ccreg  10AB85550A) for sendraw does not match ^S(R|C|M);
2017.03.16 15:08:57 4: sduino/msg READ: ccreg write back 10B0715702
2017.03.16 15:08:57 4: sduino/msg READ: Received answer (ccreg write back 10B0715702) for sendraw does not match ^S(R|C|M);
2017.03.16 15:08:57 4: sduino/msg READ: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=A9E8E821333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:57 4: sduino/read sendraw answer: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=A9E8E821333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:57 4: sduino/HandleWriteQueue: nothing to send, stopping timer
2017.03.16 15:08:58 4: sduino/set: sending via SendMsg: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=AAEBEB21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:58 4: sduino SendFromQueue: msg=SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=AAEBEB21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:58 4: sduino/msg READ: write new ccreg  10AB85550A
2017.03.16 15:08:58 4: sduino/msg READ: Received answer (write new ccreg  10AB85550A) for sendraw does not match ^S(R|C|M);
2017.03.16 15:08:59 4: sduino/msg READ: ccreg write back 10B0715702
2017.03.16 15:08:59 4: sduino/msg READ: Received answer (ccreg write back 10B0715702) for sendraw does not match ^S(R|C|M);
2017.03.16 15:08:59 4: sduino/msg READ: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=AAEBEB21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:59 4: sduino/read sendraw answer: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=AAEBEB21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:08:59 4: sduino/HandleWriteQueue: nothing to send, stopping timer
2017.03.16 15:08:59 4: sduino/set: sending via SendMsg: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ABEAEA21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:00 4: sduino SendFromQueue: msg=SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ABEAEA21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:00 4: sduino/msg READ: write new ccreg  10AB85550A
2017.03.16 15:09:00 4: sduino/msg READ: Received answer (write new ccreg  10AB85550A) for sendraw does not match ^S(R|C|M);
2017.03.16 15:09:00 4: sduino/msg READ: ccreg write back 10B0715702
2017.03.16 15:09:00 4: sduino/msg READ: Received answer (ccreg write back 10B0715702) for sendraw does not match ^S(R|C|M);
2017.03.16 15:09:00 4: sduino/msg READ: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ABEAEA21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:00 4: sduino/read sendraw answer: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ABEAEA21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:00 4: sduino/HandleWriteQueue: nothing to send, stopping timer
2017.03.16 15:09:02 4: sduino/set: sending via SendMsg: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ACEDED21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:02 4: sduino SendFromQueue: msg=SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ACEDED21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:02 4: sduino/msg READ: write new ccreg  10AB85550A
2017.03.16 15:09:02 4: sduino/msg READ: Received answer (write new ccreg  10AB85550A) for sendraw does not match ^S(R|C|M);
2017.03.16 15:09:03 4: sduino/msg READ: ccreg write back 10B0715702
2017.03.16 15:09:03 4: sduino/msg READ: Received answer (ccreg write back 10B0715702) for sendraw does not match ^S(R|C|M);
2017.03.16 15:09:03 4: sduino/msg READ: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ACEDED21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:03 4: sduino/read sendraw answer: SC;R=6;SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=640;D=ACEDED21333333;SR;P0=-2560;D=000000000000;;F=10AB85550A;
2017.03.16 15:09:03 4: sduino/HandleWriteQueue: nothing to send, stopping timer

habeIchVergessen

kann der sduino die Hardware-Fernbedienung empfangen? kann diese korrekt steuern?

gessi

#234
Zitat von: habeIchVergessen am 16 März 2017, 15:27:00
kann der sduino die Hardware-Fernbedienung empfangen? kann diese korrekt steuern?

Ich habe einen nanoCUL mit cc1101 welcher keinen Empfänger hat aber wohl Befehle senden kann, dieser hat die sduino Firmware geflasht und kann logischerweise nicht empfangen.

Ich habe einen sduino mit nano328 hardware welcher auch auslesen kann und die originial Somfy Fernbedienung empfangen kann aber beim Senden wohl Probleme hat (scheint ein bekanntes Problem zu sein).

Ich habe den cc1101 als IODev zugewiesen aber leider bewegt sich eben nicht viel (2-3s on/off).

Anbei die Screenshots beider Singalduino...

Und Ja, die original Fernbedienung kann natürlich korrekt steuern.

habeIchVergessen

kannst du bitte noch ein log-Auszug vom sduino328 mit verbose=4 beim Empfang posten? Bitte auch mal das Scrollrad nutzen.

gessi

Zitat von: habeIchVergessen am 16 März 2017, 16:18:41
kannst du bitte noch ein log-Auszug vom sduino328 mit verbose=4 beim Empfang posten? Bitte auch mal das Scrollrad nutzen.

Ich nutze nun den sduino (mit nano328) zum Auslesen der original Fernbedienung.

Original Fernbedienung on/ab:
Zitat2017.03.16 16:25:13 4: sduino328/keepalive ok, retry = 0
2017.03.16 16:25:21 4: sduino/keepalive ok, retry = 0
2017.03.16 16:25:22 4: sduino328/msg READ: MC;LL=-1237;LH=1216;SL=-620;SH=630;D=D6F57D0BC98888E21647;C=617;L=80;
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 43 clock 617 -> Somfy RTS
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 52 clock 617 -> OS_PIR
2017.03.16 16:25:22 4: sduino328/msg READ: MC;LL=-1238;LH=1228;SL=-668;SH=589;D=ADEAFA17931111842C8A;C=620;L=79;
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 43 clock 620 -> Somfy RTS
2017.03.16 16:25:22 4: sduino328: Somfy RTS preprocessing check: 7 enc: ADEAFA17931111842C8A dec: AD4710ED848200
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 52 clock 620 -> OS_PI2017.03.16 16:26:13 4: sduino328/keepalive ok, retry = 0
2017.03.16 16:26:21 4: sduino/KeepAlive not ok, retry = 1 -> get ping
2017.03.16 16:26:21 4: sduino/msg READ: OK
2017.03.16 16:26:21 4: sduino/HandleWriteQueue: nothing to send, stopping timer

Original Fernbedienung off/auf:
Zitat2017.03.16 16:27:25 4: sduino328/msg READ: MC;LL=-1260;LH=1219;SL=-691;SH=575;D=57C7CFB8FABBBBE21000;C=624;L=77;
2017.03.16 16:27:25 4: sduino328: Found manchester Protocol id 43 clock 624 -> Somfy RTS
2017.03.16 16:27:25 4: sduino328: Found manchester Protocol id 52 clock 624 -> OS_PIR
2017.03.16 16:27:25 4: sduino328/msg READ: MC;LL=-1277;LH=1190;SL=-688;SH=571;D=AF8F9F71F5777784200;C=620;L=74;
2017.03.16 16:27:25 4: sduino328: Found manchester Protocol id 43 clock 620 -> Somfy RTS
2017.03.16 16:27:25 4: sduino328: Somfy RTS preprocessing check: 0 enc: AF8F9F71F5777784200 dec: AF2010EE848200
2017.03.16 16:27:25 4: sduino328: Found manchester Protocol id 52 clock 620 -> OS_PIR
2017.03.16 16:27:25 4: sduino328/msg READ: MC;LL=-1272;LH=1190;SL=-655;SH=587;D=5F1F3EE3EAEEEF08401C;C=617;L=78;
2017.03.16 16:27:25 4: sduino328: Found manchester Protocol id 43 clock 617 -> Somfy RTS
2017.03.16 16:27:25 4: sduino328: Found manchester Protocol id 52 clock 617 -> OS_PIR

Biervögelhasso

Hallo,

ich habe meine SDUINO nun endlich ans laufen gebracht. Er empfängt die Somfy Fernbedienung und ich kann die Rolladen mit Fhem fahren.
Gibt es nun eine Möglichkeit beide zu verknüpfen?
Es soll eigentlich über "rawDevice (Rolllo-Nr.)" funktionieren. Leider gibt es aber kein rawDevice in Fhem zur  Auswahl?
FHEM auf Raspy3 mit Stretch, CUL, SDuino, JeeLink, SomfyHomematic, MQTT, Grafana, Node-RED

habeIchVergessen

#238
Zitat von: gessi am 16 März 2017, 16:28:07
2017.03.16 16:25:22 4: sduino328/msg READ: MC;LL=-1237;LH=1216;SL=-620;SH=630;D=D6F57D0BC98888E21647;C=617;L=80;
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 43 clock 617 -> Somfy RTS
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 52 clock 617 -> OS_PIR
2017.03.16 16:25:22 4: sduino328/msg READ: MC;LL=-1238;LH=1228;SL=-668;SH=589;D=ADEAFA17931111842C8A;C=620;L=79;
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 43 clock 620 -> Somfy RTS
2017.03.16 16:25:22 4: sduino328: Somfy RTS preprocessing check: 7 enc: ADEAFA17931111842C8A dec: AD4710ED848200
2017.03.16 16:25:22 4: sduino328: Found manchester Protocol id 52 clock 620 -> OS_PI2017.03.16 16:26:13 4: sduino328/keepalive ok, retry = 0

Da sind ja die 80 Bit. Wie es scheint hat SIGNALduino erhebliche Probleme die sauber zu empfangen.

Was empfängt sduino328, wenn sduino sendet?

gessi

Zitat von: habeIchVergessen am 16 März 2017, 17:49:46
Da sind ja die 80 Bit. Wie es scheint hat SIGNALduino erhebliche Probleme die sauber zu empfangen.

Was empfängt sduino328, sduino328 sendet?

sduino328 empfängt... der nanoCUL mit sduino Firmware sendet (hat keinen Empfänger)