I can not use the command line " os.execute" in a lua script.
I get the following error:
Code: Select all
Error: Error executing script command (/home/pi/domoticz/scripts/lua/script_device_hyperion.lua). returned: 32256
I add a new "Manual Light/Switch" on my hardware "Equipement Virtuel" :
I attached the script (script:///home/pi/domoticz/scripts/lua/script_device_hyperion.lua) on my switch Hyperion :
Here are the contents of my folder "lua" :
Here is the code of my script "script_device_hyperion.lua" :
Code: Select all
commandArray = {}
if (devicechanged['Hyperion'] == 'Off') then
commandArray['Lumière Salon']='On'
os.execute ('/home/pi/domoticz/scripts/lua/script-ssh_reboot-hyperion.sh')
end
return commandArray
Code: Select all
#!/bin/bash
ssh root:[email protected] //storage/reboot_hyperion.sh
When I press my button "Hyperion," the light of my living room lights ("Lumière Salon").
But my script "script-ssh_reboot-hyperion.sh" is not executes and I get the following logs:
Can you help me ???
Thank you.
misterg94