Alexa Skill - support for window shades/blinds

Hi! I've built a custom smartblinds controller. My device driver implements the WindowShade capability. Works great in Hubitat dashboards and also Homebridge/HomeKit. However, if I expose my device to the Alexa skill, it does not show up in my Alexa app.

I found that it looks like the Alexa team has just added native support for this type of capability last month:

Can you add this to your Alexa skill?

(The capabilities my driver implements are: Actuator, WindowShade, Refresh, and Initialize.)

1 Like

As a temporary measure, you could add the ‘switchlevel’ capability to,your driver
Then alexa would think it is a light which can be set

E.g. ‘alexa, set blind to 50%’

Andy

Yes. My temporary workaround was a virtual switch and some Alexa routines. But I would love to have the native support working. I’m sure the voice recognition would work better than the custom routines. (Alexa gets confused between the “office blinds” in my routine vs the “office lights”) I think it’s because their recognition gives higher priority to known devices vs trigger text in routines.

Update: I'm sure Hubitat will get to adding this support to their own Alexa skill eventually, but in the meantime, I created my own Alexa skill that talks to the Hubitat Maker API to control window shades.

It's not a published skill. It's code you can use to host your own skill. I haven't written much instructions, because if you know how to host and install your own skill, you won't need my instructions.

Definitely proof-of-concept code, and I look forward to retiring it when Hubitat adds this support to their own skill.

2 Likes

This is awesome. I was actually reading up on alexa skill creation 2 nights ago and just got lost. I don't know why it just seams too complicated.

I wanted to write my own alexa skill so I can add whatever devices I want.

This may help me understand where to start.

@jwetzel1492 Going to try this for my NeoSmart blind driver! Does this skill work for asking alexa to open the blinds to 50% or 25%?

I only implemented it for full open and closed. However, if you read Amazon’s docs on supporting smart blinds, they give the config changes you’d need to make to my code to implement percentage control.

What a pain in the ass this skill development is.

Finally got around to writing my own skill. After I finally got my head around how lambda ties into the skill and everything works I finally got it setup so it discovers my devices. I've written my own lambda function in python to interact with my own "maker api" to control and discover devices. It now imports contact, motion, switch, dimmer, temperature and I will add others after once I figure the next part out.

Now I'm trying to figure out how to send updates of device changes from HE into Alexa. This requires oauth and key renewals and yet another app to send the events.

I now understand why the HE team doesnt like to touch the alexa code.

2 Likes

So, spent the last 10 days learning how to write a skill for Alexa using this as a starting point.

One note, if you have an issue where it says "device is not responding" but it still works, there is a timeout setting for the lambda code. Where you posted the lambda code, scroll down and you should see basic settings that you can edit.

By default it is set to 3 seconds. But I found 3s to be too short and would timeout before my hub could respond. By default, alexa waits 8 seconds for a response which could be extended by the app responding will a DeferResponse message if needed. Just change this to 8 and you should be good to go.

1 Like

I would also like to see this implemented. I recently had to add an additional Lutron hub and their skill only supports a single hub. No big deal, I’ll just share the shade from Hubitat! Unfortunately it shares as a switch and does not function like my other shades.

I would like to see this implememted too. I recently got an Axis Gear, and I was disappointed to have to rely on my old Smartthings hub for Alexa to work.

@bcopeland, now that you're onboard at Hubitat, any chance we could get this added in?

I've worked out the hard parts here: GitHub - joelwetzel/Alexa-Skill-For-Hubitat-Shades-And-Blinds: An Alexa skill to interact with a Hubitat smarthome hub, and expose shades and blinds to Alexa. (Because the native Hubitat Alexa skill does not yet support shades and blinds.)

Just needs to be integrated into the existing skill. My code there is under a Creative Commons CC0 license, so it's public domain and Hubitat is free to use/remix/include any part of it with zero obligation or rights reserved to me.

3 Likes

That would be great; I saw @bcopeland’s updates yesterday and saw that it did include some Alexa tweaks and was hoping to see “blinds”!

1 Like

Keep an eye out on release notes.. More coming to voice assistants..

7 Likes

I see this is now in the latest release! I’m super excited!

1 Like

Also you got in better support for fan controllers! Mine have “worked”, but with some exceptions such as “set fan to medium” not working, I think maybe because Alexa saw them as dimmers. Having her understand them as fans will be awesome.

1 Like

I should mention.. There is a small bug in fans at the moment that I'm tracking down.. Specifically with drivers that use both fan control and level capabilities. She gets a little confused with both capabilities reporting at the same time using the same directive response.. I'm hunting that down.. It works.. she just complains that it's not responding.

2 Likes

I'm excited too! I have some shades controlled by the Bond Bridge but after the latest update, I still cannot get Alexa to open/close them. I can still control them with on/off commands.

I tried removing/re-adding them back on the Amazon Echo Skill in the HE App settings but no luck. Anyone else get shades working with Bond and Alexa?

@bcopelandI've got a similar thing - I have a load of blinds using the Qubino Shutter module. On the latest Hubitat release they come up in Alexa as a switch and a thermostat... but not a blind. Even after removing and re-adding.... any help?

Following. Reported similar issue with Bond integration in a separate thread.

Download the Hubitat app