Create piston to help with good night safety check


#1

Hey guys, was hoping to get some tips to start a piston for the following, didn’t use the template since I don’t have it created yet. I’m thinking that using webCoRE to run this rather than a smartthings routine would give me more customization.

I’d like to be able to do the following, which can be either accessed via a simulated switch on my actiontiles tablet on the wall, or by asking alexa to run the safety check.

When button is pressed:

Check the status of:
Garage Door (Contact sensor)
Door to Garage (Contact Sensor)
Patio Door (Contact Sensor)
Front Door (Contact sensor)
Front Door (If door is locked)

From there ideally I’d like Alexa to say:

All doors are shut and front door is locked.

IF something is open, I’d then like her to tell me which door is open.

I have Echo Speaks installed and it works, (I’ve tested it)

Just kind of looking for the right commands to do, I can obviously build it and test, and want to learn, just curious which commands I’m looking for.

Thanks for any help you could provide.


#2

Try this one, substitute your devices and edit Line 50 to use your Echo Speaks device to speak textMessage.

Switch 33 is a virtual switch that Alexa flips on via a routine.


#3

Thanks, this is what I was looking for to start learning, appreciate your help.


#4

You’re welcome. You can probably test it out by sending a Push message and then use your ES device when you’re satisfied with the result.


#5

So I’m getting closer. :slight_smile: Confused on what I need to put for line 45. (Don’t mind the “weather announcements” it’s just the name I have for the virtual switch.


#6

Line 45 is just to show the last message that was created in the piston state. Line 46 is what you need to edit, variables are case sensitive, in this case that should read textMessage. You probably have to enclose that in curly brackets if it’s not an Expression field… {textMessage}


#7

Thanks, I’ll give that a whirl, really appreciate your help.