Announce Doors and Windows that are Open, or announce all closed


#1

Just call this Piston

All you need to change are the definitions.


#2

Cool idea.

At the end, speak text (variable) and resumeā€¦ Iā€™m trying to do that with a push notification.
How do I "push notification ā€œ(playclosedreport)ā€ and resume?

Or is it true that since Iā€™m not using a {speaker} variable, I donā€™t need to resume?

EDIT; never mind, I got it
Now I just have to make it work via Alexa. :slight_smile:


#3

Here you go.


To make it call from Alexa. Create a virtual switch and then if Virtual switch is on then run this piston.
If you do not use a speaker then delete the Speaker statement in Lines 53 and 60 and the definition in Line 21


#4

Thanks, I had figured it outā€¦ I omitted the ā€˜speakerā€™ stuff entirely, and had added the push notification which speaks on my android control tablet.

To call it via Alexa, I might use ifttt

EDIT: done, easy as pie. Simple endpoint, http get in the Alexa Webhooks function. No need for a virtual switch.
But Iā€™ll want to eventually write an Alexa skill that does it, rather than using ifttt.

Further edit: Iā€™m deploying this in two ways. First is as a sort of ā€œAsk Alexa Very Liteā€. I donā€™t need to inquire about individual devices, and I donā€™t need to inquire about lights. I can issue commands to make lights do what I want. So all I need is a general inquiry about security status. This does exactly that job. I even used virtual contacts that represent whole rooms, rather than individual sensors, in this. So if it tells me the office is open, I check both windows in the office. Easy.

The second way Iā€™m deploying it is as an automated pre-bed thing. The tv always has the AVR for audio. So in another piston I f the AVR is being turned off and its after 10pm, that means we are in all likelihood going to bed and shutting down the houseā€¦ so when those two conditions are met, this piston gets fired by the other.


#5

Also Mike, thanks for posting this in the first place. Not only is it useful, but itā€™s simple enough to be utilized as a great jump-off point for grasping how variables are structured and deployed in webcore.


#6

Glenn

My application was to detect the relative temperature between inside and out, you either open or close the doors/windows. To open the windows its a simple announcement but when you announce to close the windows, I wanted to know which Doors/Windows.

For Alexa I use Michael Struck Ask Alexa but this requires a fair amount of code in the amazon cloud.


#7

And this is exactly why, to this point, itā€™s been impossible to produce a ā€˜standardā€™ smart home configuration. Each use case will necessarily be different from every other case.
Itā€™s like imagining there can be ā€œone standard houseā€ that will work for everyone.


#8

This was a great jumping off point for something that I wanted, that was hinted at here. I modified it to take into account the external temperature, and once it exceeds a saved value, it checks if there are any open doors or windows and announces they need to be closed. This comes in really handy as we like to keep the patio doors open in the morning before the temperature goes up!


#9

I use it for the same thing, that is why the announcement says its colder outside, but I made it a separate piston that can be called. I use it to check when I go to bed and when I leave the house and set the alarm. These are set as Global Variables.


#10

Nice


#11

Tried to import this piston but get the message below:


How do I use the code ā€œfor each ($device in {Doors})ā€??
I do not see the option when making a statement.


#12

Donā€™t use import, use restore from backup code


#13

Great idea I use it together with my air condition
But we must Compare the inside and outside tempreture to say different messenger for winter and different on summer

Did we have any good speaker for SmartThings notification to suggest? Amazon echo?


#14

Can you do both? Use Alexa and Speakers?

BlockquoteThis was a great jumping off point for something that I wanted, that was hinted at here. I modified it to take into account the external temperature, and once it exceeds a saved value, it checks if there are any open doors or windows and announces they need to be closed. This comes in really handy as we like to keep the patio doors open in the morning before the temperature goes up!

@mtuckman - can you share your piston? I was looking at an alternative to Ask Alexa to use natively in WC.

Blockquote


#15

I stole a bunch of this from other people/pistonsā€¦hereā€™s what Iā€™m doing - this runs when I execute a ā€œgood nightā€ event via voice w/my Google Home (which among other things trips a virtual switch to run this piston).

The annoucement goes to all my Google Homes and is done using the very cool new Google Assistant Relay that is in pre-release on the ST forum.


#16

So am i reading this right this notifies you through Alexa as text to speech?
I didnā€™t think it was possible to send things to Alexa to read out.
Iā€™ve got Ask Alexa installed but itā€™s probably out of date now as i donā€™t use it.
Or am i reading this wrong lol


#17

Can you show an example of how you did this?


#18

Hi,

Sorry, not been on in awhile. Iā€™m actually going to revamp this using the new Alexa Speaks smartapp,so I wonā€™t even need the endpoint anymore - it will speak directly thru Alexa.


#19

This was done in the Smartthings community.


#20

I love this example. I have a whole house fan and sometimes I leave it running longer than I should.

I am not sure I understand where you are specifying internal vs external temp.