Execute Alert when event does NOT happen


#1

1) Give a description of the problem
I have a robot vacuum that is not ‘smart’, so I have made it smart with a button pusher . Unfortunately this disconnects every now and then, so every night I want to test the pusher and send an alert if it does not beep (via camera sound alert) as expected.

2) What is the expected behavior?
The expected behavior is to send a push notification if there is no sound detected via the IFTTT webhook (which I have tested working) between 11:58pm and 12:02am.

3) What is happening/not happening?
The piston is not generating the alert during the defined execute time. Most likely I am not understanding how to activate a piston when something does not happen, and not execute the piston when something does happen. I am using logical negation of the IFTTT webhook implementation, which may not be the best way to implement this. Any suggestions welcomed!

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach any logs (From ST IDE and by turning logging level to Full)


#2

What does VacStatus do?


#3

That is the input WebHook from IFTTT. So I am trying to get an alert when that WebHook does not come in as anticipated between 11:58 and 12:02.


#4

In your webhook, it is possible to append some parameters to it, like ?status=true / false? instead of webcore waiting for the ifttt event?

The reason I asked is maybe you can just call the piston URL directly with the extra parameters above. For example, you can have IFTTT execute:

http://your_piston_url?status=true

In your piston, you just evaluate the value of the variable $args.status, which would contain the value you passed in the parameter.


#5

I am not sure how to do that from the IFTTT channel - where would I place that here in IFTTT, and how would I read that back in WebCore?

<Edit:removed image with direct link to piston>


#6

In the URL box, remove ifttt/VacStatus and substitute it with ?status=true (or false) whichever one makes sense to you.


#7

I think I figured out a solution that worked, thanks for pointing me towards using variables. Now I am setting a variable based on that IFTTT webhook, and then checking the variable at a certain time, with the variable clearing after a 5 minute period. Seems to work so far.