I have a Sonoff relay.
I would like to send a http request when ever the relay switches.
In general it works fine with this rule:
Code: Select all
on Relay#Switch do
if [Relay#Switch]=1
SendToHTTP 192.168.1.1,80,/espEvent.php?device=%sysname%&state=1
else
SendToHTTP 192.168.1.1,80,/espEvent.php?device=%sysname%&state=0
endif
endon
How ever it also fires a call once every second.
How can this be suppressed?
Example log:
Code: Select all
Tue, 03 Jul 2018 20:42:35 +0200: device=Sonoff, state=0, # unwanted call
Tue, 03 Jul 2018 20:43:35 +0200: device=Sonoff, state=0, # unwanted call
Tue, 03 Jul 2018 20:44:35 +0200: device=Sonoff, state=0, # unwanted call
Tue, 03 Jul 2018 20:45:35 +0200: device=Sonoff, state=0, # unwanted call
Tue, 03 Jul 2018 20:46:35 +0200: device=Sonoff, state=0, # unwanted call
Tue, 03 Jul 2018 20:47:35 +0200: device=Sonoff, state=0, # unwanted call
Tue, 03 Jul 2018 20:48:24 +0200: device=Sonoff, state=1, #### expected call ###
Tue, 03 Jul 2018 20:48:35 +0200: device=Sonoff, state=1, # unwanted call
Tue, 03 Jul 2018 20:49:35 +0200: device=Sonoff, state=1, # unwanted call
Tue, 03 Jul 2018 20:50:35 +0200: device=Sonoff, state=1, # unwanted call
Tue, 03 Jul 2018 20:51:35 +0200: device=Sonoff, state=1, # unwanted call
Tue, 03 Jul 2018 20:52:35 +0200: device=Sonoff, state=1, # unwanted call