Should I be using $currentEventDevice

I have gone through most of the post and I’m really confused. Was hoping someone could help.

I want to know once I leave the house (when my presence sensor changes to not present) if I have left any of the contact sensors (Back Door, Front Door and Side Gate) open. I would then like to push a message to me telling me which door is still open.

I have tried using system variable $currentEventDevice but it either returns a value of null or “time”. Why does it not return the name of the open contact sensor ?

Thanks for any assistance you can provide

IF presence sensor changes to not present
any of front door, back door, garage door, front window is open (save matching device list to variable {openDoors})
All of front door, back door, garage door, front window is closed
Using location…
Send push/SMS to you “The following doors/windows are open: {openDoors}”

You will get this notification every time you leave. It can be done up so it only happens when something is left open by removing the group and just using the IF any is open.

Edit: to answer your question about $currentEventDevice variable. This will only be the current device that is firing the piston. So if you have a piston set for a certain time, then time will be in that variable. If a door being opened is the executor then the door will be in the variable.

1 Like

Thanks so much for your help Dustin, your comment about

(save matching device list to variable {openDoors})

This is where I am having some trouble understanding, how do I assign the contact that is open to the variable {openDoor}.

Is there some system variable that returns the contact or door that is open ?

Set variable {openDoor} to $xxxxxxxxxx ???

Also what happens if I have more than one door open ?

Thanks again

When you choose contact sensor, select all the doors/windows you want, attribute is contact, and comparison “is” then select open. Scroll down you will see a section titled “Set Variables” in there you will see one called “save matching device list”. In that box is where you create a variable. So in my example I would write “openDoors” without the quotes. That will copy any open doors at the time you leave to that variable.

1 Like

Regarding “When you choose contact sensor” - where is this???

When creating a new condition, I choose my windows and doors, select “contact”, open, then hit that gear icon. I get an option “Store the list of matching devices into variable…”, but the only option that I can open says “Nothing Selected”. Please help!

Define a device type variable first

also you will get a lot quicker responses on the webcore community board

1 Like

Got it. Thanks for both clues!