- Spoiler: show
When activating the script (script:///usr/bin/python /volume1/@appstore/domoticz/var/scripts/python/volumeset.py 031) in the On Action of the device, the volume is changed.
What am I doing wrong?
Moderator: leecollings
You don't need the script:// part when executing from a script.
Code: Select all
return {
on = {
devices = { 'Test' },
},
logging =
{
level = domoticz.LOG_DEBUG, -- change to domoticz.LOG_ERROR when all OK
marker = 'Python execution',
},
execute = function(domoticz, item)
if
domoticz.devices('Test').state == 'On'
then
domoticz.devices('Test').switchOff().afterSec(5)
domoticz.utils.osExecute("/usr/bin/python /volume1/@appstore/domoticz/var/scripts/python/volumeset.py 031")
-- if standard execution does not work you could try with sudo
-- domoticz.utils.osExecute("sudo /usr/bin/python /volume1/@appstore/domoticz/var/scripts/python/volumeset.py 031")
end
end
}Users browsing this forum: No registered users and 1 guest