Alexa / Sensor Checks


#1

Hi all,

I’m looking to see if anyone can help give me the necessary workings for the below routine. I have a routine I run at night called Bedtime, which ultimately turns required lights off, required lights on and turns heating back to Schedule, whilst locking necessary doors. What I want to do is within this routine, run a check on all Samsung MP Sensors, to check if Open. If so, Alexa then tells me.

Has anyone else done anything similar?


#2

Alexa is not very smart, but you can re-create your Bedtime routine here in webCoRE to add a lot of functionality. (at which time your old Alexa Routine will become obsolete)

You can still use your voice (Alexa) to trigger your new Bedtime piston using a Simulated Switch. You can let webCoRE handle all of your logic (lights, heating, locks etc) and notify you if a sensor is open.


Side Note:
If you want Alexa to give you a verbal alert, you will need some kind of third party app to speak the text outloud. (I use this method for my text-to-speech announcements)


#3

Sorry I should have also said, I have installed the Alexa Speaks third party app.


#4

You can set your routine to trigger a mode change. They you can set webcore to check for open sensors when the mode is X. If sensors open then announce on alexa code. I used to have something similar to this with out the announcement it just displayed as a push notification but I accidentally lost the code and haven’t recreated it. you should be able to search for open sensor while arming and find some references.


#5

Thanks for this. Would you have any idea of the code I’d need? The above doesn’t seem to do anything with the Alexa


#7

A bit of further debugging with above code works, so it obviously doesn’t like the Speak or SpeakText I tried? Is it something simple?


#8

Have you successfully used this in any piston yet, or is this your first?


#9

When I used the speak command, I wrap the text in quotes when I type it into the value box. This will show two sets of quotes when you look at the piston. For example, ““Garage open”” ;.

I have no idea if it makes a difference, and I don’t have time to test it right now but you might want to give it a try.


#10

First piston I’ve used unfortunately


#11

This is good. When getting familiar with a new Device Handler, it helps to have a simple (one button) way to trigger or test the piston. (without waiting 24 hours & opening the garage door)

IE:

IF Switch changes to on
    Then Test Speech command here
END IF

Once you better understand your speech command (and the acceptable syntax), it will be easy to insert it into a complex piston.


Unfortunately, I am unable to help you with Alexa Speaks.
I use a different method for text-to-speech that I really like.


#12

I just had time to check and my piston runs with or without the extra quotes so that doesn’t seem to matter.


#13

Text to speech with Alexa Speaks is a bit different than with just a smart speaker. The Speak command doesn’t work. Here’s an announcement piston I have that speaks to smart speakers (the first part) and Alexa (the second part).

With the Alexa commands you have to pass in parameters. In this example, parameter 1 is an interger to set the volume, parameter 2 is a string to pass the text.

Speak isn’t actually a command for Alexa Speaks.
https://tonesto7.github.io/echo-speaks-docs/#/docs/devices/deviceCommands/speechCommands

Hope this points you in the right direction!
milhouse


#14

I use speak all the time with no issues. I wonder why it would work for me and not the OP?


#15

I seem to recall a lot of cursing trying to get Alexa Speaks to actually speak through my Echo Dot. The simple Speak command just never worked for me. Smart speakers, yes, Alexa Speaks, no.

Interesting that it works for you. Alexa must just be sweet on you. :sunglasses:


#16

Thanks, I’ll give it a bash in the morning and report back


#17

Works a treat, thanks!


#18

Ha ha! I guess she must milhouse! The funny thing is, I tried setVolumeSpeakAndRestore first, and I didn’t have much luck with that. Then I tried Speak and it worked fine. Kind of strange we would have such opposite experiences with it.