Closed rom289 closed 6 years ago
ca risque peut etre de poser problème sur d'autres protocoles, je regardes ca :(
On peut peut être faire ça :
if infoType == "0" and protocol == "PARROT":
id=Options['id']
lineinput='ZIA++' + str(Command.upper()) + " " + protocol + id
SerialConn.Send(bytes(lineinput + '\n\r','utf-8'))
if Command == "On":
Devices[Unit].Update(nValue =1,sValue = "on")
if Command == "Off":
Devices[Unit].Update(nValue =0,sValue = "off")
if infoType == "0" and protocol != "PARROT":
id=Options['id']
lineinput='ZIA++' + str(Command.upper()) + " " + protocol + " ID " + id
SerialConn.Send(bytes(lineinput + '\n\r','utf-8'))
if Command == "On":
Devices[Unit].Update(nValue =1,sValue = "on")
if Command == "Off":
Devices[Unit].Update(nValue =0,sValue = "off")
if infoType == "1" or infoType == "2":
id=Options['id']
lineinput='ZIA++' + str(Command.upper()) + " " + protocol + " ID " + id
SerialConn.Send(bytes(lineinput + '\n\r','utf-8'))
if Command == "On":
Devices[Unit].Update(nValue =1,sValue = "on")
if Command == "Off":
Devices[Unit].Update(nValue =0,sValue = "off")
c est mis à jour avec ton code ;) version 1.0.8
merci ;)
Bonjour,
J'utilise des prises télécommandées dont le protocole est inconnu du rfplayer. Grâce à la télécommande d'origine, j'ai enregistré les trames ON/OFF sur les ID A1 et A2 du mode Parrot.
Lors de l'ajout des interrupteurs sur Domoticz, quelque soit l'ID renseigné (A1 ou A2), c'est toujours la télécommande correspondant à A1 qui est piloté.
En creusant un peu dans le code, j'ai trouvé une solution pour que cela fonctionne.
Ligne 472 supprimée
lineinput='ZIA++' + str(Command.upper()) + " " + protocol + " ID " + id
et remplacée par lineinput='ZIA++' + str(Command.upper()) + " " + protocol + id
Cependant, je ne maitrise pas les effets de bord de cette modification qui est valable pour : infoType == "0" et protocol =="11": protocol="PARROT" Mais pas forcément pour les autres cas.
zaraki673 pourrais-tu stp valider cette modification. Merci