sasu-drooz / Domoticz-Rfplayer

Domoticz python Plugin for Ziblue RfPlayer Rfp1000
GNU General Public License v3.0
12 stars 16 forks source link

Problème RFPlayer + Sondes Température Oregon #43

Closed Martiou77 closed 6 years ago

Martiou77 commented 6 years ago

Bonsoir,

Je viens de m'équiper d'un Raspberry Pi 3, d'un RFPlayer et de sondes de température Oregon (2 THGR122NX et 2 THGR810 lors du Black Friday Amazon). J'ai également acheté des modules Qubino pour le chauffage et j'attends ma clé Aeon Labs Z-Wave Plus Z-Stick GEN5. Le but est de domitiser le chauffage dans un 1er temps.

J'ai installé Domoticz sans problème, je suis passé en version beta pour installer le plugin de zaraki673. Mais, à chaque fois, 1 seule sonde de chaque est détectée. Par exemple, pour les 2 THGR122NX, Domoticz a détecté la 1ere sonde à émettre et ensuite il considère que la 2eme existe déjà.

Voici le contenu de la log de Domoticz lorsque je mets le RFPlayer en debug : 2017-12-06 19:42:09.724 (RFPlayer) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "0", "rfLevel": "-64", "floorNoise": "-90", "rfQuality": "6", "protocol": "5", "protocolMeaning": "OREGON", "infoType": "4", "frequency": "433420"},"infos": {"subType": "0", "id_PHY": "0x1A2D", "id_PHYMeaning": "THGR122/228/238/268,THGN122/123/132", "adr_channel": "12289", "adr": "48", "channel": "1", "qualifier": "32", "lowBatt": "0", "measures" : [{"type" : "temperature", "value" : "+19.9", "unit" : "Celsius"}, {"type" : "hygrometry", "value" : "50", "unit" : "%"}]}}} 2017-12-06 19:42:09.725 (RFPlayer) infoType : 4 2017-12-06 19:42:09.725 (RFPlayer) id : 0x1A2D adr_channel : 12289 2017-12-06 19:42:09.725 (RFPlayer) Options to find or set : {'adr_channel': '12289', 'protocol': '5', 'id': '0x1A2D', 'infoType': '4', 'Temp': '1'} 2017-12-06 19:42:09.725 (RFPlayer) Devices already exist. Unit=2 2017-12-06 19:42:09.725 (RFPlayer) Options find in DB: {'adr_channel': '57090', 'infoType': '4', 'id': '0x1A2D', 'Temp': '1', 'protocol': '5'} for devices unit 2 2017-12-06 19:42:09.725 (RFPlayer - Temp - 57090 (channel 2)) Updating device from 1:'+19.9;50;1' to have values 1:'+19.9'. 2017-12-06 19:42:09.727 (RFPlayer) Options to find or set : {'adr_channel': '12289', 'protocol': '5', 'id': '0x1A2D', 'infoType': '4', 'Hygro': '1'} 2017-12-06 19:42:09.727 (RFPlayer) Devices already exist. Unit=2

On peut voir que les 2 ont le même id (0x1A2D), mais des adr_channel différentes (12289 et 57090). Actuellement, c'est la sonde avec l'adr_channel 57090 qui est listée dans les dispositifs.

Voici la log obtenue avec rfplayer_configurator ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "0", "rfLevel": "-61", "floorNoise": "-91", "rfQuality": "7", "protocol": "5", "protocolMeaning": "OREGON", "infoType": "4", "frequency": "433420"},"infos": {"subType": "0", "id_PHY": "0x1A2D", "id_PHYMeaning": "THGR122/228/238/268,THGN122/123/132", "adr_channel": "57090", "adr": "223", "channel": "2", "qualifier": "32", "lowBatt": "0", "measures" : [{"type" : "temperature", "value" : "+20.5", "unit" : "Celsius"}, {"type" : "hygrometry", "value" : "52", "unit" : "%"}]}}} ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "0", "rfLevel": "-58", "floorNoise": "-92", "rfQuality": "8", "protocol": "5", "protocolMeaning": "OREGON", "infoType": "4", "frequency": "433420"},"infos": {"subType": "0", "id_PHY": "0x1A2D", "id_PHYMeaning": "THGR122/228/238/268,THGN122/123/132", "adr_channel": "12289", "adr": "48", "channel": "1", "qualifier": "32", "lowBatt": "0", "measures" : [{"type" : "temperature", "value" : "+20.0", "unit" : "Celsius"}, {"type" : "hygrometry", "value" : "50", "unit" : "%"}]}}}

Le problème est similaire pour les 2 THGR810 (même id mais adr_channel différentes).

Je précise que j'ai mis des canaux différents (1 à 4) pour les sondes.

De plus, je ne récupère que la température, pas l'humidité.

Enfin, avec le driver Ziblue, le problème est le même mais je récupère bien la température et l'humidité.

Patricen1 commented 6 years ago

Pareil pour moi, 1 seule TGHR 122NX, ça fonctionne avec le driver d'origine mais que la température sur le plugin, et au bout d'un "certain temps" plus d'upload des données.

Voici mon log : 2017-12-09 18:10:42.355 (RFPlayer avec plugin) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "0", "rfLevel": "-73", "floorNoise": "-102", "rfQuality": "7", "protocol": "5", "protocolMeaning": "OREGON", "infoType": "4", "frequency": "433920"},"infos": {"subType": "0", "id_PHY": "0x1A2D", "id_PHYMeaning": "THGR122/228/238/268,THGN122/123/132", "adr_channel": "49154", "adr": "192", "channel": "2", "qualifier": "32", "lowBatt": "0", "measures" : [{"type" : "temperature", "value" : "+20.6", "unit" : "Celsius"}, {"type" : "hygrometry", "value" : "54", "unit" : "%"}]}}} 2017-12-09 18:10:42.355 (RFPlayer avec plugin) infoType : 4 2017-12-09 18:10:42.355 (RFPlayer avec plugin) id : 0x1A2D adr_channel : 49154 2017-12-09 18:10:42.355 (RFPlayer avec plugin) Options to find or set : {'protocol': '5', 'adr_channel': '49154', 'id': '0x1A2D', 'infoType': '4', 'Temp': '1'} 2017-12-09 18:10:42.355 (RFPlayer avec plugin) Creating device 'Temp - 49154 (channel 2)'. 2017-12-09 18:10:42.357 (RFPlayer avec plugin - Temp - 49154 (channel 2)) Updating device from 0:'' to have values 1:'+20.6'. 2017-12-09 18:10:42.359 (RFPlayer avec plugin) Options to find or set : {'protocol': '5', 'adr_channel': '49154', 'id': '0x1A2D', 'Hygro': '1', 'infoType': '4'} 2017-12-09 18:10:42.359 (RFPlayer avec plugin) Devices already exist. Unit=2 2017-12-09 18:10:42.359 (RFPlayer avec plugin) Options find in DB: {'protocol': '5', 'infoType': '4', 'id': '0x1A2D', 'adr_channel': '49154', 'Temp': '1'} for devices unit 2 2017-12-09 18:10:42.359 (RFPlayer avec plugin - Temp - 49154 (channel 2)) Updating device from 1:'+20.6' to have values 54:'1'. 2017-12-09 18:10:42.360 (RFPlayer avec plugin) Options to find or set : {'protocol': '5', 'adr_channel': '49154', 'id': '0x1A2D', 'infoType': '4', 'TempHygro': '1'} 2017-12-09 18:10:42.360 (RFPlayer avec plugin) Devices already exist. Unit=2 2017-12-09 18:10:42.361 (RFPlayer avec plugin) Options find in DB: {'protocol': '5', 'infoType': '4', 'id': '0x1A2D', 'adr_channel': '49154', 'Temp': '1'} for devices unit 2 2017-12-09 18:10:42.361 (RFPlayer avec plugin - Temp - 49154 (channel 2)) Updating device from 54:'1' to have values 1:'+20.6;54;1'. 2017-12-09 18:10:46.470 (RFPlayer avec plugin) Calling message handler 'onHeartbeat'.

zaraki673 commented 6 years ago

merci, j'essaie de vous corriger ça la semaine prochaine ;)

Patricen1 commented 6 years ago

👍

zzdomi commented 6 years ago

J'ai fait un pull request pour corriger ce problème.

zaraki673 commented 6 years ago

je viens de merge, merci ;)

j attends vos confirmation

zzdomi commented 6 years ago

OK pour moi.

Patricen1 commented 6 years ago

De mon côté, toujours des erreurs : 2017-12-12 18:44:11.348 (RFPlayer avec plugin) Calling message handler 'onHeartbeat'. 2017-12-12 18:44:11.548 (RFPlayer avec plugin) Received 496 bytes of data: 2017-12-12 18:44:11.548 (RFPlayer avec plugin) 5a 49 41 33 33 7b 20 22 66 72 61 6d 65 22 20 3a 7b 22 68 65 ZIA33{."frame".:{"he 2017-12-12 18:44:11.548 (RFPlayer avec plugin) 61 64 65 72 22 3a 20 7b 22 66 72 61 6d 65 54 79 70 65 22 3a ader":.{"frameType": 2017-12-12 18:44:11.548 (RFPlayer avec plugin) 20 22 30 22 2c 20 22 63 6c 75 73 74 65 72 22 3a 20 22 30 22 ."0",."cluster":."0" 2017-12-12 18:44:11.548 (RFPlayer avec plugin) 2c 20 22 64 61 74 61 46 6c 61 67 22 3a 20 22 30 22 2c 20 22 ,."dataFlag":."0",." 2017-12-12 18:44:11.548 (RFPlayer avec plugin) 72 66 4c 65 76 65 6c 22 3a 20 22 2d 36 33 22 2c 20 22 66 6c rfLevel":."-63",."fl 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 6f 6f 72 4e 6f 69 73 65 22 3a 20 22 2d 31 30 32 22 2c 20 22 oorNoise":."-102",." 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 72 66 51 75 61 6c 69 74 79 22 3a 20 22 39 22 2c 20 22 70 72 rfQuality":."9",."pr 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 6f 74 6f 63 6f 6c 22 3a 20 22 35 22 2c 20 22 70 72 6f 74 6f otocol":."5",."proto 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 63 6f 6c 4d 65 61 6e 69 6e 67 22 3a 20 22 4f 52 45 47 4f 4e colMeaning":."OREGON 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 22 2c 20 22 69 6e 66 6f 54 79 70 65 22 3a 20 22 34 22 2c 20 ",."infoType":."4",. 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 22 66 72 65 71 75 65 6e 63 79 22 3a 20 22 34 33 33 39 32 30 "frequency":."433920 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 22 7d 2c 22 69 6e 66 6f 73 22 3a 20 7b 22 73 75 62 54 79 70 "},"infos":.{"subTyp 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 65 22 3a 20 22 30 22 2c 20 22 69 64 5f 50 48 59 22 3a 20 22 e":."0",."id_PHY":." 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 30 78 31 41 32 44 22 2c 20 22 69 64 5f 50 48 59 4d 65 61 6e 0x1A2D",."id_PHYMean 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 69 6e 67 22 3a 20 22 54 48 47 52 31 32 32 2f 32 32 38 2f 32 ing":."THGR122/228/2 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 33 38 2f 32 36 38 2c 54 48 47 4e 31 32 32 2f 31 32 33 2f 31 38/268,THGN122/123/1 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 33 32 22 2c 20 22 61 64 72 5f 63 68 61 6e 6e 65 6c 22 3a 20 32",."adr_channel":. 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 22 34 39 31 35 34 22 2c 20 20 22 61 64 72 22 3a 20 22 31 39 "49154",.."adr":."19 2017-12-12 18:44:11.549 (RFPlayer avec plugin) 32 22 2c 20 20 22 63 68 61 6e 6e 65 6c 22 3a 20 22 32 22 2c 2",.."channel":."2", 2017-12-12 18:44:11.550 (RFPlayer avec plugin) 20 20 22 71 75 61 6c 69 66 69 65 72 22 3a 20 22 33 32 22 2c .."qualifier":."32", 2017-12-12 18:44:11.550 (RFPlayer avec plugin) 20 20 22 6c 6f 77 42 61 74 74 22 3a 20 22 30 22 2c 20 22 6d .."lowBatt":."0",."m 2017-12-12 18:44:11.550 (RFPlayer avec plugin) 65 61 73 75 72 65 73 22 20 3a 20 5b 7b 22 74 79 70 65 22 20 easures".:.[{"type". 2017-12-12 18:44:11.550 (RFPlayer avec plugin) 3a 20 22 74 65 6d 70 65 72 61 74 75 72 65 22 2c 20 22 76 61 :."temperature",."va 2017-12-12 18:44:11.550 (RFPlayer avec plugin) 6c 75 65 22 20 3a 20 22 2b 32 30 2e 30 22 2c 20 22 75 6e 69 lue".:."+20.0",."uni 2017-12-12 18:44:11.550 (RFPlayer avec plugin) 74 22 20 3a 20 22 43 65 6c 73 69 75 73 22 7d 2c .. .. .. .. t".:."Celsius"}, 2017-12-12 18:44:11.550 (RFPlayer avec plugin) Calling message handler 'onMessage'. 2017-12-12 18:44:11.550 (RFPlayer avec plugin) Last Message was 22.042011 seconds ago, Message clear 2017-12-12 18:44:11.601 (RFPlayer avec plugin) Received 60 bytes of data: 2017-12-12 18:44:11.601 (RFPlayer avec plugin) 20 7b 22 74 79 70 65 22 20 3a 20 22 68 79 67 72 6f 6d 65 74 .{"type".:."hygromet 2017-12-12 18:44:11.601 (RFPlayer avec plugin) 72 79 22 2c 20 22 76 61 6c 75 65 22 20 3a 20 22 34 35 22 2c ry",."value".:."45", 2017-12-12 18:44:11.601 (RFPlayer avec plugin) 20 22 75 6e 69 74 22 20 3a 20 22 25 22 7d 5d 7d 7d 7d 0a 0d ."unit".:."%"}]}}}.. 2017-12-12 18:44:11.601 (RFPlayer avec plugin) Calling message handler 'onMessage'. 2017-12-12 18:44:11.601 (RFPlayer avec plugin) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "0", "rfLevel": "-63", "floorNoise": "-102", "rfQuality": "9", "protocol": "5", "protocolMeaning": "OREGON", "infoType": "4", "frequency": "433920"},"infos": {"subType": "0", "id_PHY": "0x1A2D", "id_PHYMeaning": "THGR122/228/238/268,THGN122/123/132", "adr_channel": "49154", "adr": "192", "channel": "2", "qualifier": "32", "lowBatt": "0", "measures" : [{"type" : "temperature", "value" : "+20.0", "unit" : "Celsius"}, {"type" : "hygrometry", "value" : "45", "unit" : "%"}]}}} 2017-12-12 18:44:11.601 (RFPlayer avec plugin) infoType : 4 2017-12-12 18:44:11.602 (RFPlayer avec plugin) id : 0x1A2D adr_channel : 49154 2017-12-12 18:44:11.602 (RFPlayer avec plugin) Options to find or set : {'infoType': '4', 'id': '0x1A2D', 'Temp': '1', 'protocol': '5', 'sensorType': '80', 'adr_channel': '49154'} 2017-12-12 18:44:11.602 (RFPlayer avec plugin) Error while decoding Infotype4 frame 2017-12-12 18:44:21.370 (RFPlayer avec plugin) Calling message handler 'onHeartbeat'.

Martiou77 commented 6 years ago

Bonsoir,

Alors là, je dis BRAVO Messieurs !!!

Ça fonctionne parfaitement chez moi avec mes 4 sondes depuis pratiquement 45 minutes. Par contre, j'ai dû supprimer les sondes et le RFPlayer pour que ça fonctionne.

De plus, bonne initiative de nous permettre de choisir si on veut la température, l'humidité ou les 2 ensemble.

Merci beaucoup pour la réactivité et la résolution du problème.

Martiou77 commented 6 years ago

Bonsoir,

Ça fonctionne toujours aussi bien pour mes 4 sondes. Par contre, juste pour que ce soit parfait, pouvez-vous récupérer le niveau de la batterie (en fait l'usure des piles) ? Voici un exemple de la log en debug : 2017-12-13 19:33:19.043 (RFPlayer) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "0", "rfLevel": "-52", "floorNoise": "-95", "rfQuality": "10", "protocol": "5", "protocolMeaning": "OREGON", "infoType": "4", "frequency": "433420"},"infos": {"subType": "0", "id_PHY": "0x1A2D", "id_PHYMeaning": "THGR122/228/238/268,THGN122/123/132", "adr_channel": "12289", "adr": "48", "channel": "1", "qualifier": "32", "lowBatt": "0", "measures" : [{"type" : "temperature", "value" : "+18.8", "unit" : "Celsius"}, {"type" : "hygrometry", "value" : "49", "unit" : "%"}]}}} C'est donc la valeur du lowBatt qu'il faudrait récupérer et le soustraire à 100 pour avoir le niveau de charge des piles.

Merci.

zzdomi commented 6 years ago

Ca ne fonctionne pas comme cela. LowBat est une information binaire (0/1) qui dit: 0 >= 20% de capacité des piles 1 < 20% de la capacité des piles. Mais je peux faire un effort et le remonter dès que j'ai peu de temps.

zaraki673 commented 6 years ago

Patricen1, Martiou77, zzdomi qu elles sont les modeles de vos sondes ?

le patch semble bon pour certaines sondes uniquement :(

Martiou77 commented 6 years ago

Bonjour,

@zzdomi je suis étonné, je suis à peu près certain d'avoir vu un 99 pour le niveau de batterie d'une sonde une fois avec le driver Ziblue, d'où mon interprétation. Mais bon, je n'ai pas étudié le sujet.

@zaraki673 comme écrit dans mon premier message, j'ai 2 THGR122NX et 2 THGR810. Et ça fonctionne toujours aussi bien pour mes 4 sondes.

zzdomi commented 6 years ago

@zaraki673 J'ai 6 THGR122NX et 1 THGR810. Effectivement, le patch est fait uniquement pour les sondes de températures OREGON correspondantes au type "infoType4". Il me semble que le numéro de version du plugin n'a pas évolué après le patch.

@Patricen1 Efface ton RfPlayer et les sondes de ta config puis recréé le device RfPlayer en mode learning.

@Martiou77 Je n'invente rien, c'est dans le document de l'API RfPlayer en ce qui concerne le type "infoType4". Il se peut que pour d'autres sondes on ait une information plus détaillée.

Martiou77 commented 6 years ago

@zzdomi Il n'y a pas de souci, je vous crois. Comme je l'ai dit, je n'ai pas étudié le sujet donc je ne remettrai pas en doute vos dires. Je n'ai que ces 4 sondes, je ne peux donc pas dire pour d'autres.

zaraki673 commented 6 years ago

voir #46

zzdomi commented 6 years ago

C'est fait pour les infoTypes4. Le niveau de réception est également pris en compte. A généraliser pour les autres infoTypes.

Martiou77 commented 6 years ago

Bonsoir, Merci beaucoup pour cette nouvelle mise à jour, avec encore un petit plus, ça fonctionne parfaitement.