Hyper débutant domoticz script_time.lua
Publié : 23 juin 2017, 00:13
Bonjour
Je viens vers vous pour comprendre, voici mon problème :
J'essaie d mettre en place sur mon domoticz (sous rasberry pi), un détecteur de presence de mon smartphone, j'ai adapté le script (vu sur le forum), j'ai mis des pro=int pour voir mais rienau niveau du "LOG", j'ai bien placé le script dans le dossier LUA.
voici le script
commandArray = {}
ping_success=os.execute(‘sudo arping -q -c3 192.168.1.76 -W 1’)
if ping_success then
if ( otherdevices[‘Presence Fabrice’] == ‘Off’) then
commandArray[‘Presence Fabrice’]=’On’
end
else
if (otherdevices[‘Presence Fabrice’] == ‘On’) then
commandArray[‘Presence Fabrice’]=’Off’
end
end
ping_success=os.execute(‘sudo arping -q -c5 192.168.1.22 -W 1’)
if ping_success then
if ( otherdevices[‘Presence Valerie’] == ‘Off’) then
commandArray[‘Presence Valerie’]=’On’
end
else
if (otherdevices[‘Presence Valerie’] == ‘On’) then
commandArray[‘Presence Valerie’]=’Off’
end
end
return commandArray
je n'ai rien, je ne trouve pas de solution, merci de m'aider même si je suis sur que le problème est évident pour vous.
MERCI
Je viens vers vous pour comprendre, voici mon problème :
J'essaie d mettre en place sur mon domoticz (sous rasberry pi), un détecteur de presence de mon smartphone, j'ai adapté le script (vu sur le forum), j'ai mis des pro=int pour voir mais rienau niveau du "LOG", j'ai bien placé le script dans le dossier LUA.
voici le script
commandArray = {}
ping_success=os.execute(‘sudo arping -q -c3 192.168.1.76 -W 1’)
if ping_success then
if ( otherdevices[‘Presence Fabrice’] == ‘Off’) then
commandArray[‘Presence Fabrice’]=’On’
end
else
if (otherdevices[‘Presence Fabrice’] == ‘On’) then
commandArray[‘Presence Fabrice’]=’Off’
end
end
ping_success=os.execute(‘sudo arping -q -c5 192.168.1.22 -W 1’)
if ping_success then
if ( otherdevices[‘Presence Valerie’] == ‘Off’) then
commandArray[‘Presence Valerie’]=’On’
end
else
if (otherdevices[‘Presence Valerie’] == ‘On’) then
commandArray[‘Presence Valerie’]=’Off’
end
end
return commandArray
je n'ai rien, je ne trouve pas de solution, merci de m'aider même si je suis sur que le problème est évident pour vous.
MERCI