sasu-drooz / Domoticz-Rfplayer

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

X2D thermostat Infotype 10 #20

Closed zaraki673 closed 6 years ago

zaraki673 commented 7 years ago

Je continue mes tests avec le RFPlayer et mon pack DeltaDore Deltia 833 en X2D.

Une fois les devices créés automatiquement dans Domoticz (6 devices, 2 pour chaque zone), il faut désactiver l'apprentissage automatique du RFPlayer dans Domoticz. En effet, il semble que parfois les devices déjà créés ne soient pas reconnus, et ils sont créés en double ou triple (info communiquée à zaraki673).

idx 46-47 : zone 1 idx 48-49 : zone 2 idx 50-51 : zone 3 (on en profite pour voir que la remontée d'info d'état du bouton n'apparait pas dans la colonne Donnée, le statut STOP correspondant à 50% alors qu'il apparait Off)

Image

Je passe depuis Domoticz la zone 1 (id 1890977024) en mode "OFF", et j'ai un message d'erreur dans la log Domoticz.

Image

2017-06-16 16:20:29.286 (RFPlayer) Calling message handler 'onCommand'. 2017-06-16 16:20:29.286 (RFPlayer) SendtoRfplayer - Options find in DB: {'LevelNames': 'Off|Eco|Moderat|Medio|Comfort|Stop|Out of frost|Special|Auto|Centralised', 'frequency': '868350', 'LevelOffHidden': 'True', 'function': '2', 'subType': '5', 'id': '1890977024', 'LevelActions': '|||||||||', 'protocol': '8', 'SelectorStyle': '0', 'area': '0', 'infoType': '10'} for devices unit 3 2017-06-16 16:20:29.286 (RFPlayer - 8 - 1890977024) Updating device from 0:'50' to have values 0:'0'. 2017-06-16 16:20:29.298 (RFPlayer) Sending 29 bytes of data:. 2017-06-16 16:20:29.298 (RFPlayer) 5a 49 41 2b 2b 44 49 4d 20 25 30 20 38 20 49 44 20 31 38 39 ZIA++DIM.%0.8.ID.189 2017-06-16 16:20:29.298 (RFPlayer) 30 39 37 37 30 32 34 0a 0d .. .. .. .. .. .. .. .. .. .. .. 0977024.. 2017-06-16 16:20:29.398 (RFPlayer) Received 69 bytes of data:. 2017-06-16 16:20:29.398 (RFPlayer) 5a 49 41 2d 2d 0a 65 72 72 6f 72 20 72 65 71 75 65 73 74 20 ZIA--.error.request. 2017-06-16 16:20:29.398 (RFPlayer) 6e 75 6d 62 65 72 3d 30 0a 53 79 6e 74 61 78 20 65 72 72 6f number=0.Syntax.erro 2017-06-16 16:20:29.398 (RFPlayer) 72 3a 20 44 49 4d 20 25 30 20 38 20 49 44 20 31 38 39 30 39 r:.DIM.%0.8.ID.18909 2017-06-16 16:20:29.398 (RFPlayer) 37 37 30 32 34 0a 0a 0a 0d .. .. .. .. .. .. .. .. .. .. .. 77024.... 2017-06-16 16:20:29.399 (RFPlayer) Calling message handler 'onMessage'.

zaraki673 commented 7 years ago

https://easydomoticz.com/forum/viewtopic.php?f=8&t=3934&sid=84c85983825d88d553d597857c6c26ba&start=70#p37522

ogulf commented 7 years ago

Je viens de faire de nouveaux tests, avec la dernière maj du plugin, ce qui me permet d'affiner ce pb d'envoi de commande...

Je suis parti d'une configuration "toute propre", càd que j'ai supprimé mon RFPlayer des matériels, j'ai redémarré Domoticz, recréé le matériel, redémarré une nouvelle fois Domoticz et laissé les devices se créer automatiquement.

Il semblerait que la toute première action faite sur un device (changer le mode de chauffe) soit passée, mais depuis plus aucune ne passe...

Voici les log de Domoticz de la toute première commande après avoir redémarré le service (passage du device de Auto à Eco) :

2017-07-22 16:32:40.417 User: Admin initiated a switch command (62/RFPlayer - 8 - 1890977024/Set Level)
2017-07-22 16:32:40.453 (RFPlayer) Calling message handler 'onCommand'.
2017-07-22 16:32:40.453 (RFPlayer) SendtoRfplayer - Options find in DB: {'frequency': '868350', 'LevelActions': '|||||||||', 'infoType': '10', 'SelectorStyle': '0', 'subType': '5', 'LevelOffHidden': 'True', 'function': '2', 'protocol': '8', 'area': '0', 'id': '1110000101101100000010100', 'LevelNames': 'Off|Eco|Moderat|Medio|Comfort|Stop|Out of frost|Special|Auto|Centralised'} for devices unit 3
2017-07-22 16:32:40.453 (RFPlayer - 8 - 1890977024) Updating device from 0:'50' to have values 0:'10'.
2017-07-22 16:32:40.568 Python: Changed: ID: 62 Name: RFPlayer - 8 - 1890977024, Type: 244, subType: 62, switchType: 18, s_value: 10, n_value: 0, n_value_string: Eco, last_update_string: 2017-07-22 16:32:40
2017-07-22 16:32:40.569 (RFPlayer) Sending 44 bytes of data:.
2017-07-22 16:32:40.569 (RFPlayer) 5a 49 41 2b 2b 44 49 4d 20 25 31 20 38 20 49 44 20 31 31 31 ZIA++DIM.%1.8.ID.111
2017-07-22 16:32:40.569 (RFPlayer) 30 30 30 30 31 30 31 31 30 31 31 30 30 30 30 30 30 31 30 31 00001011011000000101
2017-07-22 16:32:40.569 (RFPlayer) 30 30 0a 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 00..

Puis une autre action (passage du même device de Eco à Stop) :

2017-07-22 16:33:20.628 User: Admin initiated a switch command (62/RFPlayer - 8 - 1890977024/Set Level)
2017-07-22 16:33:20.649 (RFPlayer) Calling message handler 'onCommand'.
2017-07-22 16:33:20.649 (RFPlayer) SendtoRfplayer - Options find in DB: {'LevelActions': '|||||||||', 'LevelNames': 'Off|Eco|Moderat|Medio|Comfort|Stop|Out of frost|Special|Auto|Centralised', 'SelectorStyle': '0', 'LevelOffHidden': 'false'} for devices unit 3
2017-07-22 16:33:20.649 Error: (RFPlayer) 'onCommand' failed 'KeyError'.
2017-07-22 16:33:20.649 Error: (RFPlayer) ----> Line 266 in /home/domoticz/domoticz/plugins/rfplayer/plugin.py, function onCommand
2017-07-22 16:33:20.649 Error: (RFPlayer) ----> Line 221 in /home/domoticz/domoticz/plugins/rfplayer/plugin.py, function onCommand
2017-07-22 16:33:20.649 Error: (RFPlayer) ----> Line 1248 in /home/domoticz/domoticz/plugins/rfplayer/plugin.py, function SendtoRfplayer

On s'aperçoit que le "Option find in DB" n'est pas le même, ce qui me ferait penser à un problème d'initialisation de variable qque part ?

yoannrouzic commented 7 years ago

Bonjour,

Après mise à jour du plugin dans la version d'hier, j'ai tenté un ajout manuel de "X2D - 868 - OPERATING MODE", voici les messages d'erreurs suite à cela. 2017-08-30 15:44:29.596 (RFP) Debug log level set to: 'true'. 2017-08-30 15:44:29.597 (RFP) Options to find or set : {'subType': '0', 'infoType': '10', 'LevelOffHidden': 'True', 'frequency': '868950', 'protocol': '8', 'SelectorStyle': '0', 'LevelActions': '|||||||||', 'area': '1', 'LevelNames': 'Off|Eco|Moderat|Medio|Comfort|Stop|Out of frost|Special|Auto|Centralised', 'id': '724370689', 'function': '2'} 2017-08-30 15:44:29.597 Error: (RFP) 'onStart' failed 'NameError':'name 'stype' is not defined'. 2017-08-30 15:44:29.597 Error: (RFP) ----> Line 166 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onStart 2017-08-30 15:44:29.597 Error: (RFP) ----> Line 91 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onStart 2017-08-30 15:44:29.597 Error: (RFP) ----> Line 1435 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function CreateDevice 2017-08-30 15:44:39.317 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:44:39.317 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:44:39.317 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:39.317 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:49.516 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:44:49.517 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:44:49.517 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:49.517 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:59.736 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:44:59.736 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:44:59.736 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:59.736 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:45:09.935 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:45:09.935 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:45:09.935 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:45:09.936 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat

Pour info, j'ai fait de la même manière pour deux volets roulants "RTS - SHUTTER" et cela a fonctionné mais là plus rien ne fonctionne suite à la manip ci-dessus. Tout devient inopérant, pas de possibilité d'annuler l'adjonction qui pose problème ?

zaraki673 commented 7 years ago

problème sur ton installation, essaie de relancer Domoticz et verifie la configuration du plugin, tu dois utiliser "/dev/ttyUSB0" en port il ne trouve pas la fonction SerialConn qui est une fonction interne a domoticz ou python, pas du plugin

2017-08-30 15:49 GMT+02:00 yoannrouzic notifications@github.com:

Bonjour,

Après mise à jour du plugin dans la version d'hier, j'ai tenté un ajout manuel de "X2D - 868 - OPERATING MODE", voici les messages d'erreurs suite à cela. 2017-08-30 15:44:29.596 (RFP) Debug log level set to: 'true'. 2017-08-30 15:44:29.597 (RFP) Options to find or set : {'subType': '0', 'infoType': '10', 'LevelOffHidden': 'True', 'frequency': '868950', 'protocol': '8', 'SelectorStyle': '0', 'LevelActions': '|||||||||', 'area': '1', 'LevelNames': 'Off|Eco|Moderat|Medio|Comfort|Stop|Out of frost|Special|Auto|Centralised', 'id': '724370689', 'function': '2'} 2017-08-30 15:44:29.597 Error: (RFP) 'onStart' failed 'NameError':'name 'stype' is not defined'. 2017-08-30 15:44:29.597 Error: (RFP) ----> Line 166 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onStart 2017-08-30 15:44:29.597 Error: (RFP) ----> Line 91 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onStart 2017-08-30 15:44:29.597 Error: (RFP) ----> Line 1435 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function CreateDevice 2017-08-30 15:44:39.317 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:44:39.317 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:44:39.317 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:39.317 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:49.516 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:44:49.517 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:44:49.517 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:49.517 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:59.736 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:44:59.736 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:44:59.736 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:44:59.736 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:45:09.935 (RFP) Calling message handler 'onHeartbeat'. 2017-08-30 15:45:09.935 Error: (RFP) 'onHeartbeat' failed 'NameError':'name 'SerialConn' is not defined'. 2017-08-30 15:45:09.935 Error: (RFP) ----> Line 186 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat 2017-08-30 15:45:09.936 Error: (RFP) ----> Line 155 in /usr/local/domoticz/var/plugins/RFPlayer/plugin.py, function onHeartbeat

Pour info, j'ai fait de la même manière pour deux volets roulants "RTS - SHUTTER" et cela a fonctionné mais là plus rien ne fonctionne suite à la manip ci-dessus. Tout devient inopérant, pas de possibilité d'annuler l'adjonction qui pose problème ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20#issuecomment-325995951, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGF7DsBcB5jfHXQkSJHAjrCiPUMMz35ks5sdWhdgaJpZM4N8qYB .

yoannrouzic commented 7 years ago

En relançant domoticz, ça repart.. désolé pour le dérangement..

zaraki673 commented 7 years ago

pas de soucis ;)

2017-08-30 16:00 GMT+02:00 yoannrouzic notifications@github.com:

En relançant domoticz, ça repart.. désolé pour le dérangement..

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20#issuecomment-325999475, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGF7GJAOpBmqjyXppWbJsWYx69gk3Jhks5sdWsEgaJpZM4N8qYB .

yoannrouzic commented 7 years ago

Par contre, je m'en sors pas avec le X2D :-(. J'ai un Deltia truc muche 2 zones. J'ai les id et l'area de chaque zone, j'essaie d'ajouter un OPERATING MODE et HEATING SPEED pour chaque zone. Je ne peux ajouter qu'un seul item. L'autre quand je l'ajoute, le rfp redémarre et m'indique que le device existe déjà. J'ai un simple interrupteur on/off qui remonte au final et pas un interrupteur sélecteur avec tous les modes listés. Dur dur la vie d'artiste... ;-) !

lnussbaum commented 7 years ago

je ne comprends pas comment ce code est supposé marcher :

        if infoType == "10" :
                id=Options['id']
                Area=Options['area']
                if Level == 0 :
                        lineinput='ZIA++' + str("DIM %0 " + protocol + " ID " + id )
                if Level == 10 :
                        lineinput='ZIA++' + str("DIM %1 " + protocol + " ID " + id)
                if Level == 20 :
                        lineinput='ZIA++' + str("DIM %2 " + protocol + " ID " + id)
                if Level == 30 :
                        lineinput='ZIA++' + str("DIM %3 " + protocol + " ID " + id)
                if Level == 40 :
                        lineinput='ZIA++' + str("DIM %4 " + protocol + " ID " + id)
                if Level == 50 :
                        lineinput='ZIA++' + str("DIM %5 " + protocol + " ID " + id)
                if Level == 60 :
                        lineinput='ZIA++' + str("DIM %6 " + protocol + " ID " + id)
                if Level == 70 :
                        lineinput='ZIA++' + str("DIM %7 " + protocoaisl + " ID " + id)
                if Level == 80 :
                        lineinput='ZIA++' + str("DIM %8 " + protocol + " ID " + id)
                if Level == 90 :
                        lineinput='ZIA++' + str("DIM %9 " + protocol + " ID " + id)
                SerialConn.Send(bytes(lineinput + '\n\r','utf-8'))
                Devices[Unit].Update(nValue =0,sValue = str(Level))

Area est défini, mais pas passé au rfplayer. Mais j'ai demandé l'API, je comprendrai peut-être mieux avec :-)

lnussbaum commented 7 years ago

https://www.jeedom.com/forum/viewtopic.php?f=162&t=27226&start=20 a pas mal d'infos (notamment, que ça ne marche pas non plus sur jeedom)

lnussbaum commented 7 years ago

j'ai recu l'API de ZiBlue, et les commandes pour les radiateurs sont documentées dans la version 1.10 de la doc (je ne peux pas la diffuser, mais vous pouvez la demander à ZiBase). Les commandes sont différentes de ce qui est implémenté. Je regarde la semaine prochaine pour proposer une version qui fonctionne.

lnussbaum commented 7 years ago

j'ai eu le temps de regarder.

pour associer un récepteur (Deltia Dore 1.03 dans mon cas), il faut:

puis, pour changer l'ordre:

et ça marche \o/

ogulf commented 7 years ago

Je vais regarder ça ce we... Merci beaucoup !!

-------- Message d'origine -------- De : Lucas Nussbaum notifications@github.com Date : 29/09/2017 11:13 (GMT+01:00) À : sasu-drooz/Domoticz-Rfplayer Domoticz-Rfplayer@noreply.github.com Cc : ogulf ogulf@hotmail.com, Comment comment@noreply.github.com Objet : Re: [sasu-drooz/Domoticz-Rfplayer] X2D thermostat Infotype 10 (#20)

j'ai eu le temps de regarder.

pour associer un récepteur (Deltia Dore 1.03 dans mon cas), il faut:

puis, pour changer l'ordre:

et ça marche \o/

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20#issuecomment-333074850, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcsFq2l7_e6BcSICmKM-K34p3Z_i6PGLks5snLSggaJpZM4N8qYB.

zaraki673 commented 7 years ago

Merci, je vais regarder pour modifier le code la semaine prochaine 😉

Envoyé de mon téléphone Windows 10

De : Lucas Nussbaum Envoyé le :vendredi 29 septembre 2017 11:13 À : sasu-drooz/Domoticz-Rfplayer Cc : zaraki673; Author Objet :Re: [sasu-drooz/Domoticz-Rfplayer] X2D thermostat Infotype 10 (#20)

j'ai eu le temps de regarder. pour associer un récepteur (Deltia Dore 1.03 dans mon cas), il faut: • appuyer 5s sur le bouton d'association du récepteur • envoyer ASSOC X2DELEC A1 (A1 = zone 1) puis, pour changer l'ordre: • confort: ON X2DELEC A1 %3 • eco: OFF X2DELEC A1 %0 • HG: OFF X2DELEC A1 %5 et ça marche \o/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ogulf commented 7 years ago

Alors j'ai essayé (via le configurateur V1.4) ==> impeccable ! Par contre, j'ai la version 1.9 de la doc API, obtenue début juillet : aucun détail sur les commandes pour le chauffage... Pourtant le firmware n'a pas changé, lui : toujours en 1.20 C'est vraiment dommage !... Car je pense que je l'aurai vu, et donc signalé à zaraki673.

Pour mon test, j'ai d'abord fait à l'identique en 'zone 1' puis j''ai tenté une zone 9 (donc A9 dans les exemples) : les ordres sont bien reconnus ! Et j'ai testé avec un récepteur RF660FP, donc parfaitement compatible (il est bien dans la liste des périphériques X2D sur le site RFPLayer, mais pas encore annoncé compatible).

Vivement l'implémentation dans le plugin RFPlayer pour Domoticz ^_^

lnussbaum commented 7 years ago

Oui, ma version de la doc est la 1.10, datée du 04/09/2017.

Le changelog dit:

V1.10 : X2D thermostat frames generation precisions (X2DGAS and X2DELEC).

Par contre, pour l'implem dans Domoticz, je me demande comment la phase d'association pourra être gérée.

ogulf commented 7 years ago

Je vais laisser zaraki673 répondre mais je pense qu'un device suffirait, de type dimmer, avec 4 fonctions : Assoc, HG, Eco et Confort. Le script crée déjà ce type de device : tu l'as vu dans le code qui t'as amené à enrichir cette issue :-)

Ok c'est bien ce que je pensais... 1.10 = précision.... donc déjà implémenté dans le firmware mais pas documenté avant 1.10 :-( Pas de OFF dans la doc ??

lnussbaum commented 7 years ago

La doc complète est: 0: ECO, 3: COMFORT, 4: STOP, 5: OUT OF FROST, 7: AUT0

ogulf commented 6 years ago

Côté Domoticz, je pense qu'il faut :

Je vais voir pour adapter le plugin chez moi.

lnussbaum commented 6 years ago

bonjour,

dans la pull request https://github.com/sasu-drooz/Domoticz-Rfplayer/pull/31 j'ai ajouté le support pour l'utilisation des commandes X2DELEC. Je suis nul en Python, et je ne suis pas sûr d'avoir compromis le rôle des différents identifiants numériques (infotype, protocol) donc j'ai fait de mon mieux.

Pour l'utiliser, il faut ajouter des devices en "updatant" le hardware rfplayer, et y entrant à chaque fois des params différents. Cad que si je veux créer 3 devices pour des zones 1, 2, 3, il faut faire:

Ensuite, pour associer les modules: (dans mon cas des Deltia 1.03)

lnussbaum commented 6 years ago

sinon, je ne sais pas s'il y a des modes ECO+1/ECO+2, ni à quoi correspond le mode AUTO, donc je n'ai ajouté que Off / HG / ECO / Confort. (l'API ne dit rien sur ECO+1/ECO+2)

lnussbaum commented 6 years ago

à la réflexion, je ne suis pas sûr que le type d'interrupteur choisi soit le meilleur: visiblement, ça ne permet pas de programmer plusieurs niveaux dans les "Timers" de domoticz, seulement Off/On. Ou alors j'ai raté un truc ?

ogulf commented 6 years ago

J'ai réussi à lancer les ordres suivants par Domoticz, après modif du plugin :

On va y arriver !

-------- Message d'origine -------- De : Lucas Nussbaum notifications@github.com Date : 09/10/2017 19:20 (GMT+01:00) À : sasu-drooz/Domoticz-Rfplayer Domoticz-Rfplayer@noreply.github.com Cc : ogulf ogulf@hotmail.com, Comment comment@noreply.github.com Objet : Re: [sasu-drooz/Domoticz-Rfplayer] X2D thermostat Infotype 10 (#20)

à la réflexion, je ne suis pas sûr que le type d'interrupteur choisi soit le meilleur: visiblement, ça ne permet pas de programmer plusieurs niveaux dans les "Timers" de domoticz, seulement Off/On. Ou alors j'ai raté un truc ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20#issuecomment-335223543, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcsFq32YMPtJl7hLT8tGHNTiwA5MVYTDks5sqlXmgaJpZM4N8qYB.

lnussbaum commented 6 years ago

tu as quoi comme modules côté radiateur ? comment as-tu vérifié que confort-1/confort-2 marchaient ?

tu es reparti de mes modifs ou tu as fait tes propres modifs ? l'association marche sans pb chez moi. Comment tu envoies les ordres si tu n'as pas associé avant ?

ogulf commented 6 years ago

J'ai un pack DeltaDore 836, avec module émetteur 3 zones et des récepteurs RF660P. Domoticz et le plugin Rfplayer ont capté les ordres du programmateur et m'ont créé des devices (cf historique de ce thread).

J'ai modifié le plugin avec les ordres que tu as trouvés dans la doc v1.10 : chacune des commandes que j'ai listée est bien transmise au dongle Rfplayer qui émet la led rouge. Par contre n'étant pas associés avec Domoticz je n'adresse pas les recepteurs...

Côté association : elle marche bien en direct avec le soft Rfplayer. Mais la trame n'est même pas envoyée par le dongle quand je l'active dans Domoticz : il faut que je revoie ce côté.

Enfin, dans le code du plugin on voit qu'entre le state Eco (0) et le state Confort (3) il y a deux ordres Medium et je-ne-sais-plus-lequel en state 1 et 2 : j'ai codé ces ordres dans le plugin et ils sont bien envoyés par le dongle (led rouge activée).

Je posterai mes modifs ce soir (assez simples en fait) car là pas possible !

-------- Message d'origine -------- De : Lucas Nussbaum notifications@github.com Date : 10/10/2017 08:23 (GMT+01:00) À : sasu-drooz/Domoticz-Rfplayer Domoticz-Rfplayer@noreply.github.com Cc : ogulf ogulf@hotmail.com, Comment comment@noreply.github.com Objet : Re: [sasu-drooz/Domoticz-Rfplayer] X2D thermostat Infotype 10 (#20)

tu as quoi comme modules côté radiateur ? comment as-tu vérifié que confort-1/confort-2 marchaient ?

tu es reparti de mes modifs ou tu as fait tes propres modifs ? l'association marche sans pb chez moi. Comment tu envoies les ordres si tu n'as pas associé avant ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20#issuecomment-335372910, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcsFq-J2z-cOYOXpUKxtERNEHAwFN0dCks5sqw1LgaJpZM4N8qYB.

ogulf commented 6 years ago

Je viens seulement de voir ta pull request #31 : j'essaye ce soir et vous dis ce qu'il en est !

ogulf commented 6 years ago

Il me semble que les "infotype" et "protocol" sont spécifiques au dongle RFPlayer. Cad que tant que les infotype 12 ou protocol 20 ne seront pas exploités ton code marchera. Par contre, après...

Mes modifications sur le SendToRfplayer sont les mêmes que toi, mais pour l'infotype = 10 et adaptées aux différents Level (différents chez toi). La création manuelle de device est à faire sur X2D Operating Mode (en 433 ou 868). Cela devrait créer un switch avec toutes les commandes... Par contre chez moi ça ne marche pas : j'ai une erreur dans la log et le device n'est pas créé... :-(

Voilà mon code modifié (l'association ne marche pas....) :

if infoType == "10" :
    id=Options['id']
    Area=Options['area']
    if Level == 0 : #Off = Stop
        lineinput='ZIA++' + str("OFF X2DELEC A"+area + " %4")
    if Level == 10 : #Eco
        lineinput='ZIA++' + str("OFF X2DELEC A"+area + " %0")
    if Level == 20 : #Conf-2 ???
        lineinput='ZIA++' + str("OFF X2DELEC A"+area + " %1")
    if Level == 30 : #Conf-1 ???
        lineinput='ZIA++' + str("OFF X2DELEC A"+area + " %2")
    if Level == 40 : #Conf
        lineinput='ZIA++' + str("ON X2DELEC A"+area + " %3")
    if Level == 50 : #Stop = Off
        lineinput='ZIA++' + str("OFF X2DELEC A"+area + " %4")
    if Level == 60 : #Hors Gel
        lineinput='ZIA++' + str("OFF X2DELEC A"+area + " %5")
    if Level == 70 : #Assoc
        lineinput='ZIA++' + str("ASSOC X2DELEC A"+area)
    if Level == 80 : #Auto
        lineinput='ZIA++' + str("DIM %8 " + protocol + " ID " + id)
    if Level == 90 : #Centralised
        lineinput='ZIA++' + str("DIM %9 " + protocol + " ID " + id)
zaraki673 commented 6 years ago

Bonsoir, desolé pas bcp de temps en ce moment, je merge la request https://github.com/sasu-drooz/Domoticz-Rfplayer/pull/31 ?

je me remets sur le sujet des que possible,

merci ;)

lnussbaum commented 6 years ago

de mon point de vue tu peux, même s'il y a aura probablement besoin de qqes cycles en plus pour nettoyer. notamment j'ai ajouté mon patch à côté du support existant pour X2D, alors qu'il valait peut-être mieux remplacer ce qui ne marchait pas, mais en conservant ce qui marchait.

lnussbaum commented 6 years ago

@ogulf je ne vois pas tes RF660P dans http://rfplayer.com/peripheriques/?cat=98 ? peut-être que c'est pour ça que l'association ne fonctionne pas ?

zaraki673 commented 6 years ago

je verrais plus tard pour le ménage ^^,

merci beaucoup ;)

ogulf commented 6 years ago

@lnussbaum : si si, ils y sont bien, regarde bien (ne liste que le matériel X2D : il est tout à la fin) Quant à l'association, elle marche avec le rfplayer_configuratorV1_4.jar et la commande que tu as donnée : j'ai essayé en zone A1 et en zone A9 directement (sans passer par Domoticz)

@zaraki673 : il semble qu'il y ait une régression dans le décodage de l'infotype 10, cf ci-dessous pour fonction 1 et fonction 2. Je crée une issue ? A noter : mes devices ont été créés avec une ancienne version du plugin, c'est peut-être pour ça ?

Je pense par ailleurs que Inussbaum a raison : il faut implémenter ses modif dans l'infotype 10 sans en créer un nouveau.

2017-10-10 19:00:46.982 (RFPlayer) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "1", "rfLevel": "-60", "floorNoise": "-105", "rfQuality": "10", "protocol": "8", "protocolMeaning": "X2D", "infoType": "10", "frequency": "868350"},"infos": {"subType": "5", "subTypeMeaning": "DRIVER RF", "id": "1890977025", "area": "1", "qualifier": "32", "qualifierMeaning": { "flags": []}, "function": "2", "functionMeaning": "OPERATING MODE", "state": "7", "stateMeaning": "AUTO"}}} 2017-10-10 19:00:46.982 (RFPlayer) infoType : 10 2017-10-10 19:00:46.982 (RFPlayer) id binary : 1110000101101100000010100000001 2017-10-10 19:00:46.983 (RFPlayer) area b: 000001 2017-10-10 19:00:46.983 (RFPlayer) id decode b: 1110000101101100000010100 2017-10-10 19:00:46.983 (RFPlayer) area i: 2 2017-10-10 19:00:46.983 (RFPlayer) id decode i: 29546516 2017-10-10 19:00:46.983 (RFPlayer) id decode h: 1c2d814 2017-10-10 19:00:46.983 (RFPlayer) Options to find or set : {'LevelActions': '|||||||||', 'function': '2', 'infoType': '10', 'LevelNames': 'Off|Eco|Moderat|Medio|Comfort|Stop|Out of frost|Special|Auto|Centralised', 'id': '1110000101101100000010100', 'area': '1', 'protocol': '8', 'subType': '5', 'SelectorStyle': '0', 'LevelOffHidden': 'True', 'frequency': '868350'} 2017-10-10 19:00:46.983 (RFPlayer) Error while decoding Infotype10 frame

2017-10-10 19:00:51.995 (RFPlayer) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "1", "rfLevel": "-55", "floorNoise": "-105", "rfQuality": "10", "protocol": "8", "protocolMeaning": "X2D", "infoType": "10", "frequency": "868350"},"infos": {"subType": "5", "subTypeMeaning": "DRIVER RF", "id": "1890977026", "area": "2", "qualifier": "32", "qualifierMeaning": { "flags": []}, "function": "1", "functionMeaning": "HEATING SPEED", "state": "0", "stateMeaning": "OFF"}}} 2017-10-10 19:00:51.995 (RFPlayer) infoType : 10 2017-10-10 19:00:51.996 (RFPlayer) id binary : 1110000101101100000010100000010 2017-10-10 19:00:51.996 (RFPlayer) area b: 000010 2017-10-10 19:00:51.996 (RFPlayer) id decode b: 1110000101101100000010100 2017-10-10 19:00:51.996 (RFPlayer) area i: 3 2017-10-10 19:00:51.996 (RFPlayer) id decode i: 29546516 2017-10-10 19:00:51.996 (RFPlayer) id decode h: 1c2d814 2017-10-10 19:00:51.996 (RFPlayer) Options to find or set : {'function': '1', 'infoType': '10', 'id': '1890977026', 'area': '2', 'protocol': '8', 'subType': '5', 'frequency': '868350'} 2017-10-10 19:00:51.996 (RFPlayer) Error while decoding Infotype10 frame

ogulf commented 6 years ago

Tout marche nickel ce matin avec seulement mes modifs du code sur infotype 10 de La procédure SendToRfplayer :-) 1- j'avais une erreur de code pour l'association des récepteurs, c'est pour ça que ça ne marchait pas... bonjour le boulet... corrigé ! 2- j'avais renommé et supprimé certains Level d'un des devices créé il y a qques mois par une ancienne version du plugin. Du coup la dernière version plantait sur le DOption ["id"] qui n'existait plus (pkoi j'en sais rien). Suppression des anciens devices ! 3- création manuelle Operating Mode en 868 (valeur 7). Je n'ai pas essayé avec 433 mais pas de raison que ça ne marche pas. ATTENTION : ne pas modifier le device créé ! 4- association avec RF660P ok 5- ordres Eco, Off, Stop, Confort ok 6- testé sur deux zones differentes ok

ogulf commented 6 years ago

Je viens de voir que les modifications proposées par Inussbaum ont été intégrées pour l'envoi des commandes de chauffage X2D aux récepteurs :+1:

Cependant le plugin ne fonctionne pas pour les devices créés automatiquement par le plugin. En effet, ces derniers sont identifiés avec un Infotype 10 et pas avec un Infotype 12, du coup l'envoi des commandes échoue.

Comme je l'avais déjà proposé, est-il possible de modifier le plugin comme suit (je ne sais pas créer de Pull Requests) ?

Version V1.0.6 Modifications identifiées par # Modif ogulf + Inussbaum

def SendtoRfplayer(Unit, Command, Level, Hue):
...
        if infoType == "10" :
                 id=Options['id']
                 Area=Options['area']
        # Modif ogul + Inussbaum - Début
         if Level == 0 :
                         lineinput='ZIA++' + str("OFF X2DELEC A" + Area + " %4")
                 if Level == 10 : #Eco
                         lineinput="ZIA++" + str("OFF X2DELEC A" + Area + " %0")
                 if Level == 20 : #Confort-2
                         lineinput='ZIA++' + str("OFF X2DELEC A" + Area + " %1")
                 if Level == 30 : #Confort-1
                         lineinput='ZIA++' + str("OFF X2DELEC A" + Area + " %2")
                 if Level == 40 : #Confort
                         lineinput="ZIA++" + str("ON X2DELEC A" + Area + " %3")
                 if Level == 50 : #Stop
                         lineinput="ZIA++" + str("OFF X2DELEC A" + Area + " %4")
                 if Level == 60 : #HorsGel
                         lineinput="ZIA++" + str("OFF X2DELEC A" + Area + " %5")
                 if Level == 70 : #Association
                         lineinput="ZIA++" + str("ASSOC X2DELEC A" + Area)
        # Modif ogul + Inussbaum - Fin
         if Level == 80 : #Auto
                         lineinput='ZIA++' + str("DIM %8 " + protocol + " ID " + id)
                 if Level == 90 : #Special
                         lineinput='ZIA++' + str("DIM %9 " + protocol + " ID " + id)
                 SerialConn.Send(bytes(lineinput + '\n\r','utf-8'))
                 Devices[Unit].Update(nValue =0,sValue = str(Level))
...
lnussbaum commented 6 years ago

@ogulf si tu as une version basée sur la mienne, mais corrigée, peux-tu l'envoyer (directement le fichier modifié, en piece jointe dans le commentaire) ? comme ça je teste chez moi, et je propose quelque chose d'intégrable dans une pull request.

ogulf commented 6 years ago

Ça marche, je m'en occupe au plus tard ce we 😀

-------- Message d'origine -------- De : Lucas Nussbaum notifications@github.com Date : 19/10/2017 15:40 (GMT+01:00) À : sasu-drooz/Domoticz-Rfplayer Domoticz-Rfplayer@noreply.github.com Cc : ogulf ogulf@hotmail.com, Mention mention@noreply.github.com Objet : Re: [sasu-drooz/Domoticz-Rfplayer] X2D thermostat Infotype 10 (#20)

@ogulfhttps://github.com/ogulf si tu as une version basée sur la mienne, mais corrigée, peux-tu l'envoyer (directement le fichier modifié, en piece jointe dans le commentaire) ? comme ça je teste chez moi, et je propose quelque chose d'intégrable dans une pull request.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20#issuecomment-337911007, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcsFq11zvY-tfcwilIEq1W5PfhEtIBm4ks5st1FWgaJpZM4N8qYB.

ogulf commented 6 years ago

Voila en PJ le plugin complet que j'ai chez moi et qui fonctionne.

Deuc corrections (identifiées par # modif ogulf) :

Attention, cette version n'a pas les modifications du pullrequests #31 (infotype 12).

Avec cette version que je propose du plugin, les modifications proposées par Inussbaum font double emploi.

plugin.zip

lnussbaum commented 6 years ago

ok, j'ai créé une nouvelle pull request en intégrant tes changements + des fixes supplémentaires: https://github.com/sasu-drooz/Domoticz-Rfplayer/pull/34

donc cette fois ci, c'est bien l'infotype 10 qui est utilisé. la création manuelle fonctionne. je suppose que la création automatique fonctionne aussi, mais je ne peux pas tester. j'ai aussi trié les niveaux (boutons) pour les avoir par "température" croissante.

lnussbaum commented 6 years ago

à mon avis, cette fois ci, tout est bon, et on peut considérer ça comme résolu

yoannrouzic commented 6 years ago

Bonsoir, perso les commandes fonctionnent nickel mais je n'arrive pas à piloter les inter sélecteur par script ou par planning. Je n'ai que l'état on ou off dispo. Je le fais pour des volets roulants mais là impossible. Une idée ? Ou peut-être une correction à venir dans la dernière version ci-avant ?

lnussbaum commented 6 years ago

ça marche chez moi avec la version de la pull request 34 (mais j'utilise l'API de domoticz avec un script en cron, par contre, je n'ai pas configuré le planning dans domoticz). il faut bien définir le "Level", sinon ça ne marche pas

yoannrouzic commented 6 years ago

Merci pour le retour. Je le fais bien avec les level effectivement mais c'est ko. Je vais attendre la nouvelle version du plugin pour tester à nouveau.

lnussbaum commented 6 years ago

tu peux essayer avec https://github.com/lnussbaum/Domoticz-Rfplayer/blob/master/plugin.py éventuellement

yoannrouzic commented 6 years ago

Effectivement ça fonctionne tout de suite mieux !! Merci ! Au plaisir.

ogulf commented 6 years ago

@Inussbaum : une petite erreur de copier/coller dans le PullRequests #34...

Actuellement : 517 + if Level == 60 : # assoc
518 + lineinput="ZIA++ ON X2DELEC A"+Area + " %3"

A modifier en : 517 + if Level == 60 : # assoc
518 + lineinput="ZIA++ ASSOC X2DELEC A"+Area

Pour le reste ça doit être bon ^_^ Bien vu la francisation des commandes !! :+1:

A noter : pour celles et ceux qui ont déjà des devices créés manuellement ou automatiquement avec le RFPlayer... Et bien il faut les recréer (suite réorganisation des Level du Selector Switch).

zaraki673 commented 6 years ago

Merci a tous pour ces modifications/corrections ;)

ogulf commented 6 years ago

You're welcome :)

lnussbaum commented 6 years ago

On 22/10/17 at 02:26 -0700, ogulf wrote:

@Inussbaum : une petite erreur de copier/coller dans le PullRequests #34...

Actuellement : 517 + if Level == 60 : # assoc
518 + lineinput="ZIA++ ON X2DELEC A"+Area + " %3"

A modifier en : 517 + if Level == 60 : # assoc
518 + lineinput="ZIA++ ASSOC X2DELECT A"+Area

Pour le reste ça doit être bon ^_^

Merci! corrigé dans https://github.com/sasu-drooz/Domoticz-Rfplayer/pull/35

Lucas

yoannrouzic commented 6 years ago

Bonjour, j'ai mis en place la #35 hier soir. Impossible de créer manuellement un device X2D 868 Operating mode ou autre qui me donne un inter sélecteur. J'ai un inter X10 on/off seulement quelques soit le type de device choisi :-/ ! J'ai fait un reset usine partiel du rfplayer aussi.. idem après.

Un petit tuto pour tous les types de device serait le bienvenu à terme non ?

yoannrouzic commented 6 years ago

J'ai écrit trop vite... En relisant le script plugin.py, j'ai finalement pu créer un device Operating mode pour chaque zone. Domoticz a planté une fois sur les deux créations..?

Pour mon histoire de commande de l'interrupteur sélecteur, c'est réglé, le problème venait de moi côté prog blockly, je faisais un test de level (Level=20%) sur un inter sélecteur au lieu de faire un test sur le nom de l'état "Eco" par exemple.

Tout est bon pour moi.

zaraki673 commented 6 years ago

vu que tout est bon , je clos,

Un Grand merci à vous pour vos contributions