What variables should I using for this PUSH?


#1

1) Give a description of the problem
My PUSH is not what I want it to say. If the mode changes and a contact is open. I want to know what contact is open during which mode.

2) What is the expected behavior?
If the mode changes and a contact is open, “I want it to say Contact #1 changed to open/closed while current mode is active.”
I guess instead of “changed to” I should put “currently” since it already changed but whatever.

3) What is happening/not happening?
If I change from Home to Night it says:
Home changed to Night while Night is Active.”
It doesn’t provide the sensor that is open and the status of the sensor, which would be “open.”

**4) Post a Green Snapshot of the piston!


#2

$currentevent* represents values from the device that triggers the piston. the piston uses location as trigger so the values you are seeing represent a location event.

look under options to save the list of contacts that match the if condition of open to a device variable then use that device variable in the notification.


#3

Perfect, thank you.
I have another problem with a different piston.
I basically want a PUSH when any contact is open for 15s.
The problem I have is that if there are five contacts open, I get 5 PUSHs that say the same contact has been open for 15s - it won’t tell me the different contacts that are open, only one contact and I get as many PUSHs as there are contacts open:

I tried a different way, log all the contacts that are open and store in variable. But if 5 contacts are open, I get the the same PUSH 5 times when I only need it once. I was thinking I put a WAIT after the PUSH but if a contact changes, it would cancel the WAIT.

I guess what I ultimately want is a PUSH notification whenever a contact is open for x minutes/seconds.
But I don’t want it repeated every time another sensor is open or the piston is checked.

If {@AllContacts} is open for 5m
Then PUSH notification for that single contact.

Then if that contact closes and reopens for 5m, I would get a repeat for that contact.


#4

you are welcome.

in the first piston don’t save to opencontacts instead use $currenteventdevice


#5

That’s what the first piston is doing.
I am using $currentEventDevice - then I get multiple PUSHs for the same contact.


#6

not the first piston. in the other 2 pistons you posted afterwards.


#7

This one? I’ not saving.
Do you have a sample?
33af2acd51a863ebae98fe3007a14ef3ae20e96a_1_690x230


#8

yes that one.

rather than using 15 secs try a longer interval like 3 mins and open a couple of contacts 30 secs apart and wait 3 mins.


#9

The problem I have is that if there are five contacts open, I get 5 PUSHs that say the same contact has been open for 3m - it won’t tell me the different contacts that are open.


#10

not sure what you mean. just tried this experiment and it seems to report each one correctly: