Water leak sensor with alexa routine?

Ah great thankyou. Ive created a virtual switch but can you tell me how i go about creating a smarthings rule to switch that on when the real sensor activates.

Thanks

Did you read the FAQ I Linked to?

It can’t be a virtual switch. It has to be a virtual sensor that has switch capabilities. And the code for that is in the FAQ.

Once you use that code, it will show up as a switch just like any other switch anywhere in SmartThings. But turning it on will also cause the virtual sensor part to be “open.“

As far as a rule, you just have to find one which would trigger a switch to come on when the real sensor triggers.

Usually that’s the official smart lights feature, but to be honest I don’t remember if that will trigger from a leak sensor. If it doesn’t, you should be able to set up a custom alert in smart home monitor that will do it. :sunglasses:

You can. The trigger is called “Water Leak”

1 Like

Now ya see, this is exactly the reason I occasionally scan these forums.

Currently, I have ST making the announcement “bathtub is full” via Alexa Speaks when my Utilitech sensor detects it. Certainly it would be more efficient to simply have Alexa detect a simulated sensor open, and broadcast the message itself.

1 Like

Ok thanks guys, I’ll have to have a play and try and get it to work. Reading the FAQ I’ve installed Alexa helper but there’s so many options I’m unsure on what I’m doing.

You shouldn’t need Alexa helper at all for this: It doesn’t create the right kind of virtual devices and you’re just going to use the built-in Alexa features.

The code for a virtual sensor which has switch capability is in post 97 of the FAQ I already gave you. That’s the one you want.

( I know that FAQ needs to be rewritten as an article in the community wiki, I just haven’t felt up to doing it last couple of weeks. It’s a lot to read through right now because it’s conversation as the features were being released. Sorry if it’s been confusing. )

Update: doing it as I outlined a few posts go isn’t quite as awesome as I imagined. Unless I’m missing something, an Alexa routine is tied to only one Echo. It’s a PITA to write six routines to do the same ting on six echo devices… and the routines don’t play from ecobee devices

You’re missing something. :wink:

If you want to have announcements from multiple devices at the same time, you use the “messaging” choice when you create the routine ( instead of the “Alexa says” choice). That let you pick all devices or multiple selected devices for the announcement. :sunglasses:

Thanks JD - my 1st routine in Alexa, you’re a great help as always

1 Like

Sorry this maybe a daft question but where is post 97? I can’t see any device handler.

Could anyone do me a step by step I’m a tad confused. I just want Alexa to announce when waters detected. Can’t get my head around this.

Thanks

Post 97 is the 97th post in the thread. The thread title is a clickable link.

FAQ: Using Contact and Motion Sensors to Trigger Alexa Routines (DTH in post 97) (Official Amazon Feature)

It was posted on August 31 by BJPierron…
.

Apologies I’ve found them and added them in the smarthings IDE but now how do I use them?

Sorry, I’m not feeling well and I’m not up to writing out the step by step for you. Someone else will need to do that.

Ah ok no problem. Thanks for your help so far.

If anyone would do me a step by step that would be much appreciated. I’ve used ST’s a while back but for the life of me can’t get my head around this

Many thanks

Just coming back to this. Ive now created a virtual simulated contact sensor using that device handler called water detected. I can see this on my smarthings dashboard as a contact sensor. {closed}

My amazon echo sees this and allows me to setup a routine when this is open itll tell me theirs a water leak. im still struggling to find a way to trigger this using the physical leak sensor i have. Ive tried the smart lighting app but this will only allow me to control a outlet or light bulb?

Can anyone tell me where im going wrong? I feel like im nearly there :slight_smile:

Thanks

The device hanlder JD linked you to should be exposed as a switch in smart lighting. So create a device using that handler and then create a smart lighting rule to turn on that device when moisture is detected by your leak sensor.

2 Likes

Ok ive done that and its setup using the smartlighting app and it switches on when the leak sensor detects water.

Now its a switch though rather than contact sensor alexa wont allow me to use this within a routine. ill go the my alexa app it discovers it as a switch but if i go to routines and try and create one it will only allow me to select a sensor device (motion/contact) not a switch

It should show as both. you’re using the device handler with namespace: “bjpierron” right?

2 Likes

Doh! No wonder i couldn’t get it working. I was using the wrong device handler all along.

It now works a treat. Thanks alot guys.

1 Like

interesting topic. I’m having trouble with trying to add the dth. should I copy the whole code and then click the from code tab in the IDE. because when I do that and click create, I get an error message saying something about error on line 36

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.