It's my first post on this forum so let me first thanks all the team for this great piece of software domoticz is

I'm running into a funny problem, your support will be welcome : I'm running dev version 3.5231 ; I have a On/Off switch which drives a ZK1PA relay via rfxcom. It works well when I click on the switch from the web interface, my relay switches on and off as desired.
Ex :
Code: Select all
2016-06-11 10:44:16.561 User: Admin initiated a switch command
2016-06-11 10:44:16.562 (RfxCom) Lighting 1 (Filtration piscine)
Then, I wrote a lua script to toggle this switch on some criterias :
Code: Select all
[...]
if (MinDuJour >= PpeStart and MinDuJour < PpeStop and Filtration == "Off") then
-- Filtration On
print("Filtration piscine : Démarrage par timer")
commandArray[CmdIdx] = {['UpdateDevice'] = idxPpe..'|1|On'}
CmdIdx=CmdIdx+1
end
if (MinDuJour >= PpeStop and Filtration == "On") then
-- Filtration Off
print("Filtration piscine : Arrêt par timer")
commandArray[CmdIdx] = {['UpdateDevice'] = idxPpe..'|0|Off'}
CmdIdx=CmdIdx+1
end
[...]
Code: Select all
2016-06-11 10:45:01.145 LUA: Script Filtration Piscine
2016-06-11 10:45:01.145 LUA: Filtration piscine : Démarrage par timer
2016-06-11 10:45:01.147 EventSystem: Script event triggered: /opt/domoticz/scripts/lua/script_time_piscine.lua
*nothing here :(*
2016-06-11 10:45:08.587 Hardware Monitor: Fetching data (System sensors)
2016-06-11 10:45:13.321 EventSystem: Script event triggered: /opt/domoticz/scripts/lua/script_device_elec.lua
Thanks for your help !