Ah, the case with the Dummy plugin is that it doesn't generate events (after the initial event when started) when the Interval is set to 0.
So if you need a an event to be generated, you should use another member of the TaskValueSet command family: TaskValueSetAndRun:
Code: Select all
On remoteSwitch Do
TaskValueSetAndRun,DummySwitch,Dummy,%eventvalue1% // If no argument is provided, 0 is used, and the value is sent to controllers & rules
LogEntry,'==> DummySwitch is set to %eventvalue1%'
Endon
On DummySwitch Do
TaskValueSet,DummySwitch,Dummy,0
LogEntry,'==> DummySwitch is reset to 0'
Endon
A few more remarks:
- It's more universal to use the Taskname/Valuename for setting a Dummy Device, so the code is more portable, and not bound to a specific task number
- It's better to use an Event, and a matching event-handler in rules, to change a device value from an external source, to make it more of a 'black box', and easier to change. Also, in rules you can use multiple commands for a single event, if needed (like the logentry I added)
The external command would then be:
http://192.168.50.34/control?cmd=event,remoteSwitch=1 (your browser could change that to: cmd=event%2CremoteSwitch%3D1)