Door Left Open Reminder - Configurable by Individual Contact


#101

Thanks for the code and the notes on the side. I did notice the change for the time. I used your example and it looks good. I feel confident it will work :slight_smile: Thanks


#102

Correct. I was trying to get “A” to pass through to “B” but needed that time condition. I saw that “B” had the looping logic and getting “A” to set it off was the better way to go; i.e. trying to do that in “B” would be messy. Thanks.


#103

FWIW, I’ve done something similar in my ‘home’ version of the piston, wherein the “B” piston uses a different set of Alert & Repeat times for day vs. night. That approach gives me a bit more granular control for each door and also covers the edge case @WCmore was addressing (when a door is opened before sunset and left open into the night). I’ve never posted it here just to avoid complicating matters, but could do so if there was interest.


#104

I love to see other examples. It helps me to understand how this webCORE environment works.


#105

I had another idea about this type of code. Could I do this to make the trigger for the contacts fire less often?

boolean runMe = false

IF runMe AND Door's contact stays open for X min
Then 
        Then Do Stuff
END IF

Every day at $sunset 
    IF Door's contact is open 
        Then Do stuff
    END IF

    runME = true
END EVERY


Every day at $sunrise
    runME = false
END EVERY

Thanks


#106

Something like that should work. FWIW, I wouldn’t set runMe to false in the top of the piston, but rather to ‘nothing selected’. Although conceptually setting the initial value to false as you have done should work, there are circumstances wherein webCoRE will reset the value to the initial value when it’s not intended.


#108

I have the below two pistons working correctly except for two issues related to notifications. First, in line 74 of the “B” piston, I had my wife’s phone number and she would never get the text message, so I replaced it with the push notification. Any idea on why she would not get the message? Second, I’m using two Echo Dots as a speakers but I can’t get any notification from Alexa. At the bottom is another piston I’ve successfully set up to notify from the Echo but I’d like to merge that notification with this one. I’ve tried Speak, Speak Text, Speak Text and Restore, Set Volume Speak and Restore, etc. and none seem to work.


#109

A few months ago, SmartThings blocked all SMS outside the US… and initiated a strict daily SMS limit to US numbers. Plus, each number will not receive any texts until we reply with (I think it was) YES to the ST number. This grants permission, but the other restrictions still remain…


Amazon does not want Alexa to be controlled by other devices. Any method to get her to talk, is a hack.

Here is the method that I use to get voice alerts.


Pro Tip:

This thread is in the “Example Pistons” category, and is not normally used to troubleshoot. If you are having issues, please create a new thread in the “Piston: Design Help” category…


#110

Thanks for your reply. Regarding the Echo Dots, I have successfully configured Echo Speaks and had it working in the last piston that I posted a photo of. The difference seems to possibly be a prescripted message that was working vs. a variable message that I was trying to get working in the second photo. I read through some of the thread you linked to and it did seem like you could get them to speak a dynamic variable. If so, do you know what might be the issue? Is the “send notification” on line 78 necessary?


#111

I figured it out. I was testing it with both presence sensors at home. I removed line 69 and it worked.


#112

I’m just starting to build my smart home so don’t have much experiences with webcore.
I would like to ask you for help with customizing this code.
I have a line:
integer[] alertAlexaStart; /* {“Bathroom Window”:“45”, “Bedroom Window”:“45”} */

and want to create a new integer list with the same content but the time for each item in array should be greater by 10 so the line should looks like this:

integer[] alertAlexaStop; /* {“Bathroom Window”:“55”, “Bedroom Window”:“55”} */

I tried to set variable alertAlexaStop by this way but it doesn’t work:

Set variable {alertAlexaStop[$device]} = {integer(arrayItem((doorIndex)-1, (doorAlexaTimesCold)+10))}

Please help, Thanks!


#113

Problem solved.


#114

Sorry … just saw this. Glad you got it resolved. :smile: