voici
Ouverture:
Code : Tout sélectionner
http://192.168.0.251:8080/json.htm?type=command¶m=switchlight&idx=538&switchcmd=On
Code : Tout sélectionner
http://192.168.0.251:8080/json.htm?type=command¶m=switchlight&idx=538&switchcmd=Off
Code : Tout sélectionner
http://192.168.0.251:8080/json.htm?type=command¶m=switchlight&idx=538&switchcmd=On
Code : Tout sélectionner
http://192.168.0.251:8080/json.htm?type=command¶m=switchlight&idx=538&switchcmd=Off
Code : Tout sélectionner
commandArray={}
print ('Lancement du script de fermeture')
-- Fermeture du Store Terrasse
if (devicechanged['Nuit']=='On') then
print ('Le device Nuit est passé à On')
local config = assert(io.popen('/usr/bin/curl "http://192.168.0.251:8080/json.htm?type=command¶m=switchlight&idx=538&switchcmd=Off"'))
end
print ('Fin du script de fermeture')
return commandArray
Code : Tout sélectionner
commandArray = {}
print('otherdevices[\'Pluie\'] '..otherdevices['Pluie'])
print('otherdevices[\'UV\'] '..otherdevices['UV'])
print('otherdevices[\'Vent\'] '..otherdevices['Vent'])
return commandArray