Trying to send alert if HVAC on and contacts open


#15

If your “notification” is in the same spot as the speak command, you can change the last WAIT to 60 minutes…


#16

Yes, that’s what I did.

I’m now trying to figure out how to do a few more things:

  • Using the Doors and Windows variables in the “Any” (I’ve actually also got them set up as global variables: @Doors, @Main_Floor_Windows, @Upstairs_Windows). I’ve got two copies of this piston, since I have separate HVAC for the main floor and upstairs.
  • Adapt @flyize’s code above for the “save matching devices”

#17

It still baffles me why people keep storing devices in @globals

I can assure you, it does not do what you wish it did…


… be that as it may…

index


#18

I didn’t know. I saw other references to it. I just wanted one place to update the list of devices that would be used by multiple pistons.

Getting rid of the @globals (which I just did), how do I use the ‘Windows’ device list in the Any clause?


#19

Summarized so perfectly by @c1arkbar

(the parenthesis and curly brackets are my additions)


#20

I’m just trying to use the variable for the list of devices in the Any. I finally figured it out… I just needed to scroll down further in the Edit Condition box to where it listed my local variables, and select those instead of the actual physical devices.
image


#21

Did you click on the Cog wheel, and follow the other steps?


#22

Oh I see… You do not care WHICH device is open.
(that is when we normally use save matching device to variable)


#23

Well, actually I do - I just haven’t gotten there yet. That was going to be the next part to tackle after getting it to use the variable

(I realized that I had a variable in a my other lighting piston that I created 3+ years ago. Back then I figured this out… I’d just forgotten how.)


#24

And so it looks like this now. Thank you for the help!


#25

Lookin’ Good!!


#26

I’ve done that to reference multiple devices for more than one piston. I think they work. What am I missing?


#27

This is the final version for now, which all the configuration mostly at top and a slightly nicer message.

I worked on a variant to collect the names of the doors and windows into separate variables, so I could format the message listing the doors and windows like “Door Front and Windows Kitchen Left and Dining Room Right are open …”. But since my device naming scheme has Door or Window in the name, I realized that I would go to all that work and end up with the message “Door Front Door and Windows Kitchen Left Window and Dining Room Right Window are open …”, which wasn’t all that nice. So I backed all that out to just leave this.


#28

Some people are using a device list in a @global to make adding new devices in the future easier… but when we update the @global device list, it does not change the subscriptions to any of those pistons.

IE: When you buy a new device, you will STILL have to edit and save each and every piston that triggers off of that @global.


#29

Ahhhh! Good to know!

Do you have any fancy workarounds, or better ways to write pistons to deal with this issue?


#30

So I removed the wait before sending the notification (as you can see in the image I posted). Just now I opened the front door and got the notification instantly – I don’t want that; for doors I want the notification only if they have been left open for some period (say 1 minute). It looks like the wait before the notification was accomplishing that - webCore cancels execution if the contact closes during that wait. Am I correct?


#31

It is really just a change in my thinking process…

I rarely use devices in a list, and when I do, I keep in mind it only benefits that one single piston.
(so I keep that variable local)

Any new devices you buy, will have to be added to whatever piston you want to see or control it.


Don’t laugh, but a spreadsheet (or pen and paper) is really helpful to keep track of what connects to what.


#32

As long as you do not mess with TCP, then yes.
(It should abort when the last window & door is closed)

Of course, if you idle your thermostat, that would also abort the WAIT.


#33

Just to confirm, if I do this:

IF TIME == 12:00
TURN OFF @ALLDEVICES

That won’t turn off a device I’ve added to the variable after that piston is saved?


#34

My earlier statement was recommending avoiding using a @global device list as triggers.
(the piston subscribes to devices at the moment the piston is saved)