rfd-fhem / signalduino_tool Goto Github PK
View Code? Open in Web Editor NEWFHEM Module for the SIGNALduino project.
License: GNU General Public License v3.0
FHEM Module for the SIGNALduino project.
License: GNU General Public License v3.0
Sollten wir diese Datei nicht auch mit in die controls_SD_TOOL.txt aufnehmen?
Allerdings bemerke ich gerade, das die Listen im Verzeichnis /SD_TOOL beim Update nicht aktualisiert werden. Das funktioniert dann bei der *.json wahrscheinlich auch nicht.
Ein ähnliches Problem hatte @sidey79 ja auch schon bei der Umstellung der SD_ProtocolData.hash.
Der Dispatch von DMSG aus der Datei SD_Device_ProtocolList.json funktioniert bei mir nicht mehr 100%ig.
2020.05.10 17:19:59 3: sduino_dummy: Unknown code P46, help me!
2020.05.10 17:26:43 3: sduino_dummy: Unknown code P7, help me!
2020.05.10 17:28:11 3: sduino_dummy: Unknown code U49, help me!
2020.05.10 21:12:55 3: sduino_dummy: Unknown code P9, help me!
2020.05.10 21:14:00 3: sduino_dummy: Unknown code P14, help me!
2020.05.10 21:14:22 3: sduino_dummy: Unknown code W27, help me!
Es wird offensichtlich nur der Teil vor "#" übergeben. Dispatche ich Nachrichten direkt miitels
set SIGNALduino_TOOL Dispatch_DMSG P9#FF4A63E4AA040802F40168
funktioniert es. DMSG für z.B. CUL_TCM97001, IT oder OREGON sind davon nicht betroffen.
Ich bin mir fast sicher, das das vor wenigen Tagen noch funktioniert hat. Probiert habe ich sowohl master als auch pre-release auf 2 Systemen. Keine Ahnung, welches Update dafür verantwortlich ist. Am SIGNALduuino_TOOL kann es eigentlich kaum liegen, daran wurde ja seit Monaten nichts geändert.
kannst du bitte zu folgendem Protokoll
"49" => ## QUIGG GT-9000, EASY HOME RCT DS1 CR-A, uniTEC 48110 and other
# The remote sends 8 messages in 2 different formats.
# SIGNALduino decodes 4 messages from remote control as MS then ...
# https://github.com/RFD-FHEM/RFFHEM/issues/667 - Oct 19, 2019
# DMSG: 5A98B0 MS;P0=-437;P3=-1194;P4=1056;P6=297;P7=-2319;D=67634063404063406340636340406363634063404063636363;CP=6;SP=7;R=37;
# DMSG: 887F92 MS;P1=-2313;P2=1127;P3=-405;P4=379;P5=-1154;D=41234545452345454545232323232323232345452345452345;CP=4;SP=1;R=251;
# DMSG: E6D12E MS;P0=1062;P1=-1176;P2=315;P3=-2283;P4=-433;D=23040404212104042104042104212121042121042104040421;CP=2;SP=3;R=26;
{
name => 'GT-9000',
comment => 'Remote control EASY HOME RCT DS1 CR-A',
id => '49',
knownFreqs => '433.92',
clockabs => 383,
one => [3,-1], # 1150,-385 (timings from salae logic)
zero => [1,-3], # 385,-1150 (timings from salae logic)
sync => [1,-6], # 385,-2295 (timings from salae logic)
format => 'twostate',
preamble => 'P49#',
clientmodule => 'SD_GT',
modulematch => '^P49.*',
length_min => '24',
length_max => '24',
},
mir 2 RAWMSG liefern welche dann zusammen in dem SD_GT Modul verarbeitet werden ohne das der State
version not unique, please press another button
oder
learned code 1, please press another button
erscheint?
Die Daten im JSON
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 726 to 732 in 770d865
sind nicht aktuelle und unzureichend ;-)
Besser ist es vielleicht, das wir 4 RAWMSG besitzen wo deine V1 und V2 abgedeckt sind.
Exprected dmsg doen't match the preambe of 91.1
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 600 to 607 in 6bdf352
Tests are failing because tihis.
Einfach mal zur Diskussion freigegeben. Mir schwebt vor, aus der getesteten JSON Datei die Vorlage für die Github README.md anzufertigen. Somit haben wir eine Copy & Paste Dokumentation. Getestet habe ich es schon und dies würde vieles erleichtern.
Wir müssen uns nur mit den Namen "beschäftigen" und dann diese ggf mal verbessert oder wie eine Festlegung treffen was wir dort erfassen.
Es gibt etliche DMSGs die nicht zur RMSG passen.
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 84 to 96 in f5548f3
Es gibt nun zwei Möglichkeiten
a) Die DMSG in der JSON Datei ist falsch
b) Das Modul arbeitet nicht korrekt
Ich habe mir das Ergebnis mittels folgendem Signal angesehen:
MS;P1=309;P2=-1130;P3=1011;P4=-429;P5=-11466;D=15123412121234123412141214121412141212123412341234;CP=1;SP=5;R=38;
Es handelt sich um ein Signal mit Float:
0100 0101 0F0F 0F0F 0001 0101
die sub ´SIGNALduino_bit2itv1` macht aus den 0F Bezeichnungen 01
0100 0101 0101 0101 0001 0101
4 5 5 5 1 5
In der JSON Datei wird allerdings
dmsg":"i45FF15",
erwartet.
Dieses Ergebnis sollte bereits seit Januar 2018 bestehen:
RFD-FHEM/RFFHEM@5fb5814
Wieso wird in der JSON ein anderes Ergebnis erwartet?
Das ist leider bei ganz vielen Protokollen der Fall :(
Seit dem #84 funktioniert das schreiben nicht mehr korrekt nachdem mich @elektron-bbs im Gespräch darauf aufmerksam machte.
@sidey79 wie hier https://github.com/RFD-FHEM/SIGNALduino_TOOL/pull/84/files schonmal angefragt von mir, ist es nicht günstiger diese Erweiterungen für die Tests in eine "Rubrik" zu schieben oder direkt in die Tests zu verfrachten?
Es muss auf jedenfall das Schreiben als Bug behoben werden, aber das habe ich nocht nicht angegriffen, da ich nicht weiß wie weit du vielleicht mal noch was ergänzen möchtest in den vielen Tests ...
bitte mal verifizieren.
Ich suche mir gerade den "Wolf" und bin der Meinung, wir hatten das als letzte Tat von uns zusammen nochmal geändert.
Hier sind zwei Wiederholungen im Signal die beide die gleiche DMSG ergeben:
In der SD_Device_ProtocolList.json sind fehlerhafte MC Daten, die aus irgendeiner Debug Firmware stammen.
Diese werden nicht mehr verarbeitet, wenn Parse_MC auf valide Datensätze z.B. if ($rmsg !~ /^M[cC];LL=-\d+;LH=\d+;SL=-\d+;SH=\d+;D=[0-9A-F]+;C=\d+;L=\d+;(?:R=\d+;)?$/){
prüft .
SD_Device_ProtocolList.json unterstützt aktuell keine fehlerhaften Daten. Um fehlerhafte Daten erkenne zu können müsste ein Flag eingebaut werden oder z.B. ein vorhandenes "dispatch_repeats":"-1" gesetzt werden.
Hier haben wir auch einen interessanten Fall:
Im Signal selbst ist in der Tat drei mal die gleiche Nachricht enthalten.
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 408 to 416 in b4314bd
Allerdings verlässt diese Information (Anzahl Übertragungen) nicht die sub SIGNALduino_MCTFA
Es gibt ein paar Logmeldungen dazu, das war es aber auch.
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA 30.3208.0 preamble_pos = 12
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA 30.3208.0 preamble_pos = 12
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA message start(1)=12 end=64 with length=52
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA message start(1)=12 end=64 with length=52
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino: TFA message part(1)=0100010111001000000101000010010001000101110110110000
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 5: dummyDuino: TFA message part(1)=0100010111001000000101000010010001000101110110110000
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA message part(1)=45C8142445DB0
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA message part(1)=45C8142445DB0
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA message start(2)=77 end=129 with length=52
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA message start(2)=77 end=129 with length=52
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino: TFA message part(2)=0100010111001000000101000010010001000101110110110000
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 5: dummyDuino: TFA message part(2)=0100010111001000000101000010010001000101110110110000
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA message part(2)=45C8142445DB0
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA message part(2)=45C8142445DB0
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA message start(3)=142 end=194 with length=52
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA message start(3)=142 end=194 with length=52
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino: TFA message part(3)=0100010111001000000101000010010001000101110110110000
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 5: dummyDuino: TFA message part(3)=0100010111001000000101000010010001000101110110110000
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: TFA message part(3)=45C8142445DB0
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: TFA message part(3)=45C8142445DB0
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: repeated hex 45C8142445DB0 found 3 times
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 4: dummyDuino: repeated hex 45C8142445DB0 found 3 times
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino Dispatch: W58#45C8142445DB0, test ungleich: disabled
2019.06.14 23:57:23 5: End notify loop for dummyDuino
2019.06.14 23:57:23 5: dummyDuino Dispatch: W58#45C8142445DB0, test ungleich: disabled
2019.06.14 23:57:23 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino Dispatch: W58#45C8142445DB0, -57 dB, dispatch
2019.06.14 23:57:23 5: End notify loop for dummyDuino
Effektiv gibt es einen einzigen dispatch Aufruf:
2019.06.14 23:57:23 5: dummyDuino Dispatch: W58#45C8142445DB0, -57 dB, dispatch
2019.06.14 23:57:23 5: dummyDuino: dispatch W58#45C8142445DB0
Der Wert lässt sich nicht über die Anzahl der Dispatches prüfen. Können wir den Wert auf 1 setzen?
Der Wert Repat besagt zwei, aber in der RMSG finden sich vier Wiederholungen die auch ausgewertet werden:
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 184 to 191 in 7bc56cc
"repeat":"4"
wäre der korrekte Wert
Habe gerade versucht das SIGNALduino_TOOL in meiner FHEM-Instanz zu installieren.
Beim reload 88_SIGNALduino_TOOL bekomme ich folgende Fehlermeldung:
Can't locate lib/SD_Protocols.pm in @inc (you may need to install the lib::SD_Protocols module) (@inc contains: ./FHEM/lib ./lib . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM) at ./FHEM/88_SIGNALduino_TOOL.pm line 27.
BEGIN failed--compilation aborted at ./FHEM/88_SIGNALduino_TOOL.pm line 27.
Im per git clone kopierten Ordner FHEM/lib gibt es nur ein SD_Device_ProtocolList.json
Wo kommt eigentlich der Wert für dmsg her? Der ist leider falsch wegen der Preamble.
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 581 to 590 in 43dd600
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 592 to 600 in b4314bd
Hier haben wir auch ein Problem.
Die Daten führen dazu, dass 4x ein Dispatch
dummyDuino: dispatch P30#077
und 4x dispatching hex: P83#077
erfolgt.
Das macht dann in Summe 8 dispatches und passt nicht zu repeats.
Ich stelle bei diversen Diskussionen immer wieder fest, dass mit die Funktionsweise und auch der Zweck diverser Features nicht klar ist.
Ich habe da jetzt auch mal wieder ein bisschen was rumprobiert und diverse Dateien erzeugt, aber den roten Faden habe ich irgendwie nicht gefunden.
Wäre toll, wenn das mal zum nachlesen aufgeschrieben wird. Als readme oder auch in einem WIKI in Github.
Wie hier https://forum.fhem.de/index.php/topic,96951.msg918315.html#msg918315 beschrieben verstehe ich aber den bei der Codeumsetzung hapert es.
Hier
SIGNALduino_TOOL/FHEM/88_SIGNALduino_TOOL.pm
Line 1281 in 6ad68d0
Wenn ich das abändere in $ProtocolList{id} = $id_now;
überschreibe ich mir die Werte :-(
Wenn wir die Prüfung der RMSGs wie in RFD-FHEM/RFFHEM#926 angedacht machen, dann sind ganz viele rmsgs im JSON ungültig.
Z.B. diese hier:
Das s4 wird in der Firmware nicht gesetzt. Ich kann mich da auch an nichts erinnern.
Bei MUs ist ein e drinnen, das ist mir auch unbekannt:
Insgesamt sind es 35 ungültige MS Nachrichten und und 15 MU (prerelase und master zusammen gerechnet).
Die Anzahl der repeats ist hier mit eins zu gering angegeben, da sich zwei vollständige Signale in den Daten befinden. Der Wert 2 wäre passender.
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 327 to 333 in 7bc56cc
Im commit 7d02962 wurden die Daten für die WH3080 angepasst:
SIGNALduino_TOOL/FHEM/lib/SD_Device_ProtocolList.json
Lines 177 to 184 in 6e6aa4b
Diese Daten werden für den automatischen Test nun auch verwendet, da der Wert internals gesetzt ist.
Getestet wurde gegen den Modulstand commit 7c6e785456a1c105a7720e5f0b89c8d0566c8da1.
package lib::SD_ProtocolData;
our $VERSION = '1.05';
Anbei das Log:
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino/msg get raw: \002MU;P0=-1424;P1=1417;P2=-1058;P3=453;P4=-24774;P6=288;P7=-788;D=01212121232343232323232323232123232323232121232121212123212121232123212321232121212123212121232321232321212121232323212321212121212121212323467323232323232323212323232323212123212121212321212123212321232123212121212321212123232123232121212123232321232121;CP=3;R=247;O;\003
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 4: dummyDuino/msg get raw: �MU;P0=-1424;P1=1417;P2=-1058;P3=453;P4=-24774;P6=288;P7=-788;D=01212121232343232323232323232123232323232121232121212123212121232123212321232121212123212121232321232321212121232323212321212121212121212323467323232323232323212323232323212123212121212321212123212321232123212121212321212123232123232121212123232321232121;CP=3;R=247;O;�
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: Fingerprint for MU Protocol id 8 -> TX3 Protocol matches, trying to demodulate
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 4: dummyDuino: Fingerprint for MU Protocol id 8 -> TX3 Protocol matches, trying to demodulate
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino: 0. try, regex ((?:)((?:32|32){43,})) did not match
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 5: dummyDuino: 0. try, regex ((?:)((?:32|32){43,})) did not match
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 4: dummyDuino: Fingerprint for MU Protocol id 9 -> CTW 600 matches, trying to demodulate
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 4: dummyDuino: Fingerprint for MU Protocol id 9 -> CTW 600 matches, trying to demodulate
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: part is 323232323232323212323232323212123212121212321212123212321232123212121212321212123232123232121212123232321232121212121212121232 starts at position 13 and ends at 139
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 5: part is 323232323232323212323232323212123212121212321212123212321232123212121212321212123232123232121212123232321232121212121212121232 starts at position 13 and ends at 139
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino: Starting demodulation ( regex: (?:)((?:32|12){60,}) Pos 0) length_min_max (60..120) length=63
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 5: dummyDuino: Starting demodulation ( regex: (?:)((?:32|12){60,}) Pos 0) length_min_max (60..120) length=63
2019.07.02 21:26:42 5: Starting notify loop for dummyDuino, 1 event(s), first is dummyDuino 5: dummyDuino: dispatching hex: P9#FF7C845508D87402
2019.07.02 21:26:42 5: End notify loop for dummyDuino
2019.07.02 21:26:42 5: dummyDuino: dispatching hex: P9#FF7C845508D87402
Ich glaube der String wird wie folgt geschrieben RAMSG´s are dispatched
SIGNALduino_TOOL/FHEM/88_SIGNALduino_TOOL.pm
Line 413 in a97c673
Zumindest steht es bei mir so und das Set Kommando fehlt.
Für das o.g. habe ich das Thema erstellt.
Neuerung welche ins Pre-Release kommt demnächst. Die JSON möchte ich ergänzen mit „revision_modul“ und „revision_entry“.
revision_modul: speichert den Modulstand (Version) vom verarbeitenden Modul
revision_entry: speichert das Datum / Zeit wo der Eintrag geupdatet/erstellt wurde
Die Eintragungen bringen uns bei einer Bewertung oder Fehlersuche weiter. So wird die Sprungmarke ersichtlich wo es funktionierte.
@sidey79 @elektron-bbs spricht da von Euch was dagegen? Die Erläuterung erfolgt kurz und knapp weil vom Handy schreibe.
Der erwartete Wert von 5 Wiederholungen, passt nicht zu den Standardeinstellung des SIGNALduino Modules.
In der Commandref ist vier als default für maxMuMsgRepeat angegeben.
Das ist eine Grundsatzfrage die wir klären müssen, wie das Testszenario aussieht.
a) Testen gegen defaultwerte
b) Testen gegen spezifische Wert, welche auch immer.
ID 81 shoud be correct. 86 isn't
Dieses Issues dient zum Austausch von Informationen der Daten von SD_Device_ProtocolList.json
@Ralf9 bitte prüfen auf Funktion bzw. Plausibilität.
{"name":"NC-3911-675", "id":"38", "data": [
{
"dmsg":"W38#12A2C5D0C", "user":"Harst", "repeat":"4",
"rmsg":"MU;P0=-235;P1=496;P2=253;P3=-479;P4=-957;P5=743;P6=-720;CP=2;D=010231023232310231010232323102310101023102323232310102323245656565623232310232310231023102323231023101023232310231010102310232323231010232324565656562323231023231023102310232323102310102323231023101010231023232323101023232456565656232323102323102310231023232310231010232323102310101023102323232310102323245656565623232310232310231023102323231023101023232310231010102310232323231010232324565656562323231023231023102310232323102310102323231023101010231023232323101023232456565656232323102323102;O;"
}
]
},
diese wird nicht von @sidey79 Version decodiert.
Von #20:
Es soll automatisiert geprüft werden, ob die JSON Datei dem korrekten Syntax entspricht.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.