Problème execution script LUA
Publié : 27 nov. 2017, 10:29
Bonjour le forum, nouvel arrivant dans ce monde,
J'ai beaucoup avancé grâce à ce forum mais là je cale depuis 2 jours et je n'ai rien trouvé dans les sujets ouverts.
Dans Domoticz quand je suis sur onglet "interrupteurs"
Type d'interrupteur ON/OFF
je mets le lien sur la ligne "Action ON"
script:///home/pi/domoticz/scripts/lua/script_device_test_A_BasGauche.lua
Le script est bien dan le bon répertoire
Mais quand je clique sur l'ampoule cela me dit : Erreur d'envoi de la commande à l’interrupteur, vérifiez le dispositif/matériel !
Pour info j'ai un interrupteur enocean et le script fonctionne bien
Mon script:
commandArray = {}
if (devicechanged['A_BasGauche'] == 'On' and otherdevices['GPIO10_PIN19'] == 'On') then
commandArray['GPIO10_PIN19']='Off'
elseif (devicechanged['A_BasGauche'] == 'On' and otherdevices['GPIO10_PIN19'] == 'Off') then
commandArray['GPIO10_PIN19']='On'
end
return commandArray
Je ne vois pas ou cela bloque
Merci d'avance
Pierre
J'ai beaucoup avancé grâce à ce forum mais là je cale depuis 2 jours et je n'ai rien trouvé dans les sujets ouverts.
Dans Domoticz quand je suis sur onglet "interrupteurs"
Type d'interrupteur ON/OFF
je mets le lien sur la ligne "Action ON"
script:///home/pi/domoticz/scripts/lua/script_device_test_A_BasGauche.lua
Le script est bien dan le bon répertoire
Mais quand je clique sur l'ampoule cela me dit : Erreur d'envoi de la commande à l’interrupteur, vérifiez le dispositif/matériel !
Pour info j'ai un interrupteur enocean et le script fonctionne bien
Mon script:
commandArray = {}
if (devicechanged['A_BasGauche'] == 'On' and otherdevices['GPIO10_PIN19'] == 'On') then
commandArray['GPIO10_PIN19']='Off'
elseif (devicechanged['A_BasGauche'] == 'On' and otherdevices['GPIO10_PIN19'] == 'Off') then
commandArray['GPIO10_PIN19']='On'
end
return commandArray
Je ne vois pas ou cela bloque
Merci d'avance
Pierre