Re: Plugin Rfplayer Rfp1000
Publié : 13 nov. 2022, 00:57
Elo,
Ne sachant pas trop quoi faire avec blockly ne m'en servant pas habituellement, j'ai modifié le plugin.
J'avais un interrupteur VMC en on/off qui fonctionnait bien et les volets en open/close qui ne fonctionnaient plus. Ils passaient tous les deux vers le infotype1.
J'ai donc modifié le plugin python Rfplayer de Zaraki modifié par Daafunky comme suit :
ligne 524
De
Vers
Depuis tout fonctionne.
Bonne soirée
Ne sachant pas trop quoi faire avec blockly ne m'en servant pas habituellement, j'ai modifié le plugin.
J'avais un interrupteur VMC en on/off qui fonctionnait bien et les volets en open/close qui ne fonctionnaient plus. Ils passaient tous les deux vers le infotype1.
J'ai donc modifié le plugin python Rfplayer de Zaraki modifié par Daafunky comme suit :
ligne 524
De
Code : Tout sélectionner
if infoType == "1" or infoType == "2":
lineinput='ZIA++' + str(Command.upper()) + " " + protocol + fulltextid
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")Code : Tout sélectionner
if infoType == "1" :
#lineinput='ZIA++' + str(Command.upper()) + " " + protocol + fulltextid
if Command == "On":
lineinput='ZIA++' + str("ON" + " " + protocol + fulltextid)
Devices[Unit].Update(nValue =1,sValue = "on")
if Command == "Off":
lineinput='ZIA++' + str("OFF" + " " + protocol + fulltextid)
Devices[Unit].Update(nValue =0,sValue = "off")
if Command == "Open":
lineinput='ZIA++' + str("ON" + " " + protocol + fulltextid)
Devices[Unit].Update(nValue =1,sValue = "on")
if Command == "Close":
lineinput='ZIA++' + str("OFF" + " " + protocol + fulltextid)
Devices[Unit].Update(nValue =0,sValue = "off")
#Devices[Unit].Update(nValue =0,sValue = "off")
SerialConn.Send(bytes(lineinput + '\n\r','utf-8'))
if infoType == "2":
lineinput='ZIA++' + str(Command.upper()) + " " + protocol + fulltextid
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")Bonne soirée