sasu-drooz / Domoticz-Rfplayer

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

confusion lors de l'ajout manuelle d'un nouveau dispo avec un dispo existant #28

Closed GregBaum closed 6 years ago

GregBaum commented 7 years ago

Salut, Lorsque j'essaie de creer un nouveau dispositif, damned le plugin me dit qu'il est deja crée. Evidement ce n'est pas dans tous les contextes... Par exemple avec X2D je ne peux pas creer un dispositif OPERATING_MODE et un dispositif REGULATION car
if DOptions["id"] == Options["id"] and DOptions["protocol"] == Options["protocol"] and DOptions["infoType"] == Options["infoType"]

retourne true. (c'est la même id à la base).

zaraki673 commented 7 years ago

hum effectivement il va falloir que je revois ca, je m 'en occupe dès que possible merci ;)

yoannrouzic commented 7 years ago

Bonjour, Je suis dans ce cas. Concrètement, j'ai créé deux devices X2D 868 Operating mode avec id 1 area 1(hardware id 10 device id 000A0007, puis id 2 area 2 (hardware id 10 device id 000A0008). Lorsque je veux créé un troisième ou un quatrième... il veut le créer avec le même couple 10:8 que le deuxième. Du coup c'est mon id2 area2 qui est modifié en id3 area3 ou id4 area4 si je persiste...

2017-10-27 16:36:01.957 (RFP) Initialized version 1.0.6, author 'zaraki673 - Drooz' 2017-10-27 16:36:01.962 (RFP) Debug log level set to: 'true'. 2017-10-27 16:36:02.021 (RFP) Options to find or set : {'function': '2', 'subType': '62', 'LevelOffHidden': 'False', 'LevelActions': '|||||||||', 'frequency': '868950', 'LevelNames': 'Off|HG|Eco|Moderat|Medio|Comfort|Assoc', 'SelectorStyle': '0', 'area': '3', 'id': '3', 'infoType': '10', 'protocol': '8'} 2017-10-27 16:36:02.021 (RFP) Creating device 'X2DELEC Switch - Area 3'. 2017-10-27 16:36:02.022 Error: (RFP) Device creation failed, Hardware/Unit combination (10:8) already exists in Domoticz. 2017-10-27 16:36:02.022 (RFP - X2DELEC Switch - Area 2) Updating device from 0:'50' to have values 0:'0'. 2017-10-27 16:36:02.129 (RFP) Plugin has 5 devices associated with it. 2017-10-27 16:36:02.129 (RFP) 'Mode4':'False' 2017-10-27 16:36:02.129 (RFP) 'Mode5':'7' 2017-10-27 16:36:02.129 (RFP) 'Mode6':'Debug' 2017-10-27 16:36:02.129 (RFP) 'Mode2':'3' 2017-10-27 16:36:02.129 (RFP) 'Mode3':'3' 2017-10-27 16:36:02.129 (RFP) 'Author':'zaraki673 - Drooz' 2017-10-27 16:36:02.130 (RFP) 'HardwareID':'10' 2017-10-27 16:36:02.130 (RFP) 'Version':'1.0.6' 2017-10-27 16:36:02.130 (RFP) 'Key':'RFplayer' 2017-10-27 16:36:02.130 (RFP) 'Name':'RFP' 2017-10-27 16:36:02.130 (RFP) 'Port':'0' 2017-10-27 16:36:02.130 (RFP) 'HomeFolder':'/usr/local/domoticz/var/plugins/RFPlayer/' 2017-10-27 16:36:02.130 (RFP) 'SerialPort':'/dev/ttyUSB0' 2017-10-27 16:36:02.130 (RFP) Device count: 5 2017-10-27 16:36:02.130 (RFP) Device: 8 - ID: 167, Name: 'RFP - X2DELEC Switch - Area 2', nValue: 0, sValue: '0' 2017-10-27 16:36:02.130 (RFP) Device ID: '167' 2017-10-27 16:36:02.130 (RFP) Device Name: 'RFP - X2DELEC Switch - Area 2' 2017-10-27 16:36:02.130 (RFP) Device nValue: 0 2017-10-27 16:36:02.130 (RFP) Device sValue: '0' 2017-10-27 16:36:02.130 (RFP) Device LastLevel: 0 2017-10-27 16:36:02.130 (RFP) Options: '{'LevelNames': 'Off|HG|Eco|Moderat|Medio|Comfort|Assoc', 'function': '2', 'id': '3', 'protocol': '8', 'frequency': '868950', 'area': '3', 'SelectorStyle': '0', 'LevelActions': '|||||||||', 'subType': '62', 'infoType': '10', 'LevelOffHidden': 'False'}' 2017-10-27 16:36:02.131 (RFP) Device: 2 - ID: 126, Name: 'RFP - Manual Switch - A1', nValue: 0, sValue: 'off' 2017-10-27 16:36:02.131 (RFP) Device ID: '126' 2017-10-27 16:36:02.131 (RFP) Device Name: 'RFP - Manual Switch - A1' 2017-10-27 16:36:02.131 (RFP) Device nValue: 0 2017-10-27 16:36:02.131 (RFP) Device sValue: 'off' 2017-10-27 16:36:02.131 (RFP) Device LastLevel: 0 2017-10-27 16:36:02.131 (RFP) Options: '{'id': 'A1', 'infoType': '0', 'protocol': '1'}' 2017-10-27 16:36:02.131 (RFP) Device: 5 - ID: 164, Name: 'RFP - RTS - 1', nValue: 0, sValue: '10' 2017-10-27 16:36:02.131 (RFP) Device ID: '164' 2017-10-27 16:36:02.131 (RFP) Device Name: 'RFP - RTS - 1' 2017-10-27 16:36:02.131 (RFP) Device nValue: 0 2017-10-27 16:36:02.131 (RFP) Device sValue: '10' 2017-10-27 16:36:02.131 (RFP) Device LastLevel: 0 2017-10-27 16:36:02.131 (RFP) Options: '{'LevelNames': 'Off/Down|My|On/Up|Assoc', 'subType': '0', 'id': '1', 'protocol': '9', 'SelectorStyle': '0', 'LevelActions': '|||||', 'infoType': '3', 'LevelOffHidden': 'False'}' 2017-10-27 16:36:02.131 (RFP) Device: 6 - ID: 165, Name: 'RFP - RTS - 2', nValue: 0, sValue: '20' 2017-10-27 16:36:02.131 (RFP) Device ID: '165' 2017-10-27 16:36:02.132 (RFP) Device Name: 'RFP - RTS - 2' 2017-10-27 16:36:02.132 (RFP) Device nValue: 0 2017-10-27 16:36:02.132 (RFP) Device sValue: '20' 2017-10-27 16:36:02.132 (RFP) Device LastLevel: 0 2017-10-27 16:36:02.132 (RFP) Options: '{'LevelNames': 'Off/Down|My|On/Up|Assoc', 'subType': '0', 'id': '2', 'protocol': '9', 'SelectorStyle': '0', 'LevelActions': '|||||', 'infoType': '3', 'LevelOffHidden': 'False'}' 2017-10-27 16:36:02.132 (RFP) Device: 7 - ID: 166, Name: 'RFP - X2DELEC Switch - Area 1', nValue: 0, sValue: '50' 2017-10-27 16:36:02.132 (RFP) Device ID: '166' 2017-10-27 16:36:02.132 (RFP) Device Name: 'RFP - X2DELEC Switch - Area 1' 2017-10-27 16:36:02.132 (RFP) Device nValue: 0 2017-10-27 16:36:02.132 (RFP) Device sValue: '50' 2017-10-27 16:36:02.132 (RFP) Device LastLevel: 0 2017-10-27 16:36:02.132 (RFP) Options: '{'LevelNames': 'Off|HG|Eco|Moderat|Medio|Comfort|Assoc', 'function': '2', 'id': '1', 'protocol': '8', 'frequency': '868950', 'area': '1', 'SelectorStyle': '0', 'LevelActions': '|||||||||', 'subType': '62', 'infoType': '10', 'LevelOffHidden': 'False'}' 2017-10-27 16:36:02.189 (RFP) Protocol set to: 'None'. 2017-10-27 16:36:02.189 (RFP) Transport set to: 'Serial', '/dev/ttyUSB0', 115200. 2017-10-27 16:36:02.194 (RFP) Connect directive received, action initiated successfully. 2017-10-27 16:36:02.194 (RFP) Calling message handler 'onConnect'. 2017-10-27 16:36:02.194 (RFP) Connected successfully to: /dev/ttyUSB0 2017-10-27 16:36:02.194 (RFP) Sending 19 bytes of data:. 2017-10-27 16:36:02.194 (RFP) 5a 49 41 2b 2b 52 45 43 45 49 56 45 52 20 2b 20 2a 0a 0d .. ZIA++RECEIVER.+.*.. 2017-10-27 16:36:02.194 (RFP) Sending 18 bytes of data:. 2017-10-27 16:36:02.195 (RFP) 5a 49 41 2b 2b 46 4f 52 4d 41 54 20 4a 53 4f 4e 0a 0d .. .. ZIA++FORMAT.JSON.. 2017-10-27 16:36:02.339 (RFP) Received 109 bytes of data:. 2017-10-27 16:36:02.339 (RFP) 5a 49 41 2d 2d 52 45 43 45 49 56 45 44 20 50 52 4f 54 4f 43 ZIA--RECEIVED.PROTOC 2017-10-27 16:36:02.339 (RFP) 4f 4c 53 3a 20 58 31 30 20 52 54 53 20 56 49 53 4f 4e 49 43 OLS:.X10.RTS.VISONIC 2017-10-27 16:36:02.339 (RFP) 20 42 4c 59 53 53 20 43 48 41 43 4f 4e 20 4f 52 45 47 4f 4e .BLYSS.CHACON.OREGON 2017-10-27 16:36:02.339 (RFP) 56 31 20 4f 52 45 47 4f 4e 56 32 20 4f 52 45 47 4f 4e 56 33 V1.OREGONV2.OREGONV3 2017-10-27 16:36:02.340 (RFP) 2f 4f 57 4c 20 44 4f 4d 49 41 20 58 32 44 20 4b 44 31 30 31 /OWL.DOMIA.X2D.KD101 2017-10-27 16:36:02.340 (RFP) 20 50 41 52 52 4f 54 0a 0d .. .. .. .. .. .. .. .. .. .. .. .PARROT.. 2017-10-27 16:36:02.340 (RFP) Calling message handler 'onMessage'.

zaraki673 commented 7 years ago

résolue avec https://github.com/sasu-drooz/Domoticz-Rfplayer/issues/20

si je ne me trompe pas ? (pas hesiter a réouvrir si ce n'est pas le cas)

yoannrouzic commented 7 years ago

Pour moi j'ai l'erreur reportée ci-avant même avec la dernière version du plugin et un reset rfp et une redeclaration de tous mes devices.

zaraki673 commented 7 years ago

ok, je réouvre

zaraki673 commented 7 years ago

c est corrigé, par contre l id n est pas utilisé pour l envoie de commandes seul le area (il me semble)