IF statement location/text mssgs


#1

1) Give a description of the problem
If the contact sensor (refrigerator door) is open for 2 minutes, it announces over Sonos. I’d like to add a second IF statement- If it’s STILL open after 2 additional minutes, announcements are made and notifications sent via text message. Where and how can I do this additional IF statement? (Also I’m not sure how to get it to send a text mssg). Thanks for any help!

**4) Post a Green Snapshot of the pistonimage


#2

See if you can build off of this example. The times are short for testing.


#3

Thanks! Hoping I’ll be able to try this tonight. Can you explain line 38 to me- What’s in the quotes?


#4

Just basically resetting it back to ‘not set’ or false, ready for next initial notification.


#5

So I would replace ‘Log Info’ lines with my Sonos announcements, right? What does Log Info to Console do?


#6

Yep, you got it. The Log Info just spits out the information in the Logs section, nice for debugging or just printing values to screen without using Notification or SMS.

12/2/2017, 10:40:39 AM +461ms
+134ms ║Contact has been open for more than 2 minutes
12/2/2017, 10:40:20 AM +276ms
+118ms ║Contact has been open for 2 minutes


#7

This is working beautifully… thanks so much!