I switch a GPIO with http: //192....=gpio,15,1.
I want to monitor the GPIO using the Monitor, GPIO, 15 command.
How can I trigger an event when the value changes?
I tried the following rule:
Code: Select all
on System#Boot do
Monitor,GPIO,15
endon
on plugin#gpio#pinstate#15 do
Publish,%sysname%/GPIO/Lüfter,[plugin#gpio#pinstate#15]
TaskValueSet 12,1,[plugin#gpio#pinstate#15]
endon
on [plugin#gpio#pinstate#15]=1 do
Publish,%sysname%/GPIO/Lüfter,[plugin#gpio#pinstate#15]
TaskValueSet 12,1,[plugin#gpio#pinstate#15]
endon
on [plugin#gpio#pinstate#15]=0 do
Publish,%sysname%/GPIO/Lüfter,[plugin#gpio#pinstate#15]
TaskValueSet 12,1,[plugin#gpio#pinstate#15]
endon