j'ai un script LUA qui commande un Volet roulant
Code : Tout sélectionner
commandArray = {}
val= tonumber((otherdevices_svalues['Volet Salon TV']));
val1=101-val
if (devicechanged['Volet Salon TV'])
then
--then val= tonumber((otherdevices_svalues['VR']));
str= "http://192.168.1.152/api/xdevices.json?SetVR03="..val1
commandArray['OpenURL']= str
end
if devicechanged['Volet Salon TV'] == 'On' then
str1= "http://192.168.1.152/api/xdevices.json?SetVR03=0"
commandArray['OpenURL']= str1
end
if devicechanged['Volet Salon TV'] == 'Off' then
str1= "http://192.168.1.152/api/xdevices.json?SetVR03=100"
commandArray['OpenURL']= str1
end
return commandArray
le probleme c'est lorsque je commande l'api domoticz : http://IP:8080/json.htm?type=command&pa ... svalue=Off
cela provoque une autre execution de scripte de commande donc le volet ne s'arrete jamais (loop) ..
ma question est : est ce que je peux changer la valeur du curseur ou ON/OFF du volet roulant via API sans provoqué le script de commande LUA
Merci