it works but when it sets off volumio, it starts logging to domoticz about 10times /sec, so everything else logging goes "lost"
what I am doing wrong ?
script
Code: Select all
if (devicechanged['Home']) then
--if (devicechanged['Home'] == 'On') then
commandArray['Volumio'] = 'On'
commandArray['Variable:VolumioVar'] = '1'
elseif (time.hour >=21 or otherdevices['Home'] == 'Off') then
commandArray['Volumio'] = 'Off'
commandArray['Variable:VolumioVar'] = '0'
elseif (time.hour <10 or otherdevices['Home'] == 'Off') then
commandArray['Volumio'] = 'Off'
commandArray['Variable:VolumioVar'] = '0'
end
--end
return commandArray
Code: Select all
2018-04-22 21:33:47.026 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.078 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.130 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.182 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.233 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.285 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.337 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.389 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.442 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.493 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.545 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.597 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.650 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.702 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.755 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.806 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.860 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.909 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua
2018-04-22 21:33:47.961 EventSystem: Script event triggered: /home/timo/domoticz/scripts/lua/script_device_Volumio.lua