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 Thanks
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.
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.
I love to see other examples. It helps me to understand how this webCORE environment works.
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
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.
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.
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.
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…
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?
I figured it out. I was testing it with both presence sensors at home. I removed line 69 and it worked.