Struggling with a rule


(Kraeg) #1

Hi all,

I want to setup an alert that if we leave a window/door open and we go out, we get an alert but only the last person to leave gets it - is that possible?

I have rule machine but can’t for the life of me think how to do it.

Anyone any ideas?

Kraeg


(Stuart Buchanan) #2

@kraegd Very possible, can be achieved easily with rule machine, just create a rule with two conditions.

The first condition is to select presence and then choose all your presence sensors and the select leaves as the condition, then flip the toggle that says all of these.

For the second condition you should select contact and select all your contact sensors you wish to be evaluated with the condition of open, but do not select the all of these toggle.

Then set the action on true to be a push notification with whatever message you require.

Job done


(Kraeg) #3

Nearly @Fuzzyligic

That’d notify us both though surely? Not the one who last left?

Kraeg


(Stuart Buchanan) #4

@kraegd misread your first request to only notify a single user. Then this is not something I believe you can do with the inbuilt ST notify as the multi user notifications are not there. To do this you would need to use something like the pushover integration. Now if it was me I would do this via my own smartapp as to do this In rule machine I think would require a single rule per user as well as a virtual switch per user.

Maybe @bravenel or @Mike_Maxwell can think of another way as they are very good at thinking outside the proverbial box

I have planned to create a smartapp for pushingbox integration so notifications can be sent via pushbullet/pushalot etc pet individual user, As I want to be able to include pictures from CCTV cameras as part of the message… But its on my to-do list after a proper Tado integration app and replacement for Sonos Connect via Voxcommando that I am currently working on.


(Bruce) #6

Why not just a one rule per person, like this, a conditional trigger:

Trigger event: my presence leaves
Conditions: window/door open, all other presences sensors not present
Rule: window/door open AND all other not present
Actions for true: send message to me

This rule would trigger as each person left (their rule), but only notify if all others are not there.