Is it possible to have Alexa respond with a Hubitat Device Value?

I would like Alexa to vocalize a device value when asked.

for example:

ME:
Alexa: What is the Pool Temperature (could be longer shorter)

ALEXA:
The pool temperature is 82 degrees

It sounds simple when I say it but apparently this is quite complex. Does anybody know of something that will accomplish this?

Thanks
John

Yes. You would have to create a virtual switch in HE and sync it to Alexa. You then set up an Alexa routine to turn the virtual switch on when the phrase is spoken. Then you set up a rule in HE to speak the value on your Alexa when the virtual switch is turned on.

1 Like

to be honest i've always wanted to do this.
It's good to have it on the dashboard but having it as a voice response is pretty cool too.

1 Like

The only real limitation is that if you have multiple Echos in your house, there's no way to know which speaker the question came from so the answer would have to go to all of them.

1 Like

yikes..
When I had the Sensibo alexa skill added - I could ask her the temp of the "bedroom air conditioner" and she would respond with the right temp to the same device. Sounds like a complicated exercise for a bit of fun.

You might be able to get it to say the temp on a thermostat but that's the only device within HE that supports any type of temp.

Not sure I understand. Many of my sensors have temperature integrated.

Yes, but Alexa doesn't support receiving those temps. At least it never did. If it does now that's news to me.

I guess I don't know what capability Alexa has to "speak" a Hubitat generated message.

Is it possible to have Alexa speak something created in Hubitat? Even if it is not a Variable?

Perhaps something like " the back door just opened"

Thanks
John

Yes, that is very possible. But you aren't saying you want the message to originate from HE. You're saying that you want to ask Alexa a question and get a response. That's a very different thing than HE doing something on it's own.

You are correct. I figure if I can get some of it working maybe there is some other variation I will find workable.

So far I know I can tell Alexa to turn on my Front entrance lights.

What I don't know is, if and how I can make Alexa say something based on a Hubitat trigger.

Now I'm trying to understand what Hubitat can tell Alexa to say.

John

I use "Echo Speaks" to accomplish this. There has been a little chatter lately about this app possibly causing issues but I haven't really dug into it. I have announcements based on presence and/or sensors setup in RM. Alexa will say whatever you type into the field. You can also setup a routine in the Alexa app that could be triggered by an HE device or virtual switch. The ability to make announcements using contact and motion sensors in HE was added natively not that long ago. It was in one of the "Hubitat Live" episodes.

1 Like

Triggers from HE to Alexa are now very simple for users in countries that support the Alexa Skill.

Use this code from @cwwilson08 together with an Alexa Routine. On HE, you create a rule that turns on this virtual switch as the action. In the Alexa routine, this virtual device is recognized as a motion sensor. So you set the routine to speak a custom phrase when motion is detected.

metadata {
	definition (name: "Virtual motion with Switch", namespace: "cw", author: "cwwilson08") {
		capability "Sensor"
		capability "Motion Sensor"
        capability "Switch"
	}   
}

def on() {
    sendEvent(name: "motion", value: "active")
    sendEvent(name: "switch", value: "on")
    runIn(12, off)
}

def off() {
    sendEvent(name: "motion", value: "inactive")
    sendEvent(name: "switch", value: "off")
}

def installed() {
}

Temperature is more difficult. If the device is not supported by the Alexa Skill, then getting temp at every increment isn't going to be feasible. However, as @Ryan780 suggested, you can certainly get specific levels reported by triggering virtual switches. I do a similar thing for the status of my washer and dryer (i.e. which is running, or both running, or neither running). There's a slight delay in getting the status, so I added the response "Checking, hang on" so the inquirer doesn't ask again before the status can be returned.

@SmartHomePrimer,

Thanks for the response but I guess I'm dense today. I think my issue is I don't know what "Alexa Routing" is. I have the Alexa skill running on my hub and I use it to have Alexa turn some lights on and off via voice commands.

I looked at the Alexa skill and it only offers to add actions to its list.
I looked through a Rule4 action list and if I select speak or send message then skip send message the only device it would allow "speak" with is my Dome Siren.

So I'm missing a step.

Alexa Routines

Here's an example. I have named the HE virtual devices in a way I can easily recognize them when building Alexa.

Thanks again,

I think my issue is that I am not using the phone app. And I don't know how to "build Alexa" on the web interface.

If I knew where to start I can probably get through it.

John

Ah, yes. Routines can only be built/edited from the mobile app for some reason.

Bingo!

Thanks so much.

I'll ask if the capability is coming to the Web app, if not I'll look into the phone app.

John

1 Like

If you have an echo show you can setup a virtual dimmer switch and use rule manager to set the dimmer to pool temperature. Make sure before you add it to the alexa skill that you set the virtual dimmer to on or off in the device handler. Now on the Echo show just ask to turn it on and it will show the "Pool Temperature" on the screen. It will not speak it but you will get a visual.

2 Likes

Nice!