Yes, the system#clock interval is max. 1 per minute, if you need a shorter interval you can set a loop-timer:
Code: Select all
on system#boot do
loopTimerSet,1,10
endon
on rules#timer=1 do
let,1,[Airco#Count]*360 // *3600/10 == *360, why do an unneeded division?
SendToHTTP ipdomoticz,port,/json.htm?type=command¶m=udevice&idx=156&nvalue=0&svalue=[var#1] //Sent to Domoticz
endon
But your solution also works fine, so just keep that
An actual improvement would be to use the %eventvalue1% argument that is passed to the event:
Code: Select all
on Airco#Count do
let,1,%eventvalue1%*360 // *3600/10 == *360, why do an unneeded division?
SendToHTTP ipdomoticz,port,/json.htm?type=command¶m=udevice&idx=156&nvalue=0&svalue=[var#1] //Sent to Domoticz
endon
The advantage is that %eventvalue1% holds the value of that variable
at the moment the event was generated, and, as rules can be delayed during execution, the count value could have changed in the meantime.