Integrating Alexa devices into Home Assistant / Controlling Alexa via HA

Hi everyone!

I wanted to raise the question of controlling Alexa devices via Home Assistant once more. I know it’s been discussed previously, but the topic is often misunderstood a bit, and there’s also been some recent advances that I think make it worth bringing up again.

So this is about the following: Some of us own devices that cannot be programmatically controlled through any proper standard protocol, and there are no direct integration options for Home Assistant. But they have Alexa integrations via Alexa “skill” plugins developed by their vendors, so it’s possible to make these devices show up in the Alexa app and control them via the GUI (and of course, the Alexa voice interface). The goal is to get these devices that show up in the Alex app into Home Assistant.

Home Assistant does have a fantastic Alexa integration, but it is designed to expose stuff in Home Assistant to Alexa - i.e., the other way around from what is the goal here.

There is one convoluted way to use this integration to achieve Alexa control:

  • Create input_booleans on the HA side
  • Expose them to Alexa
  • Use them to trigger routines

This works, but it’s very cumbersome and not practical for many types of devices. For example, in my case, I’m dealing with thermostats. Creating booleans for every temp and room and wrapping this in a friendly HA UI is … not impossible, but I’m sure we’ll all agree not very beautiful.

At this point, the previous discussions have usually petered out and ended. People conclude that Alexa offers no API that would make it possible to write an integration the other way around.

However! It appears this may not be the case, for there is one other convoluted way to pull this off:

I’ve recently done this, and it does work!

Well, sort of. With my thermostats, I can now see them and the current temperature, but I cannot set the temperature. This appears to be down to a bug in the plugin itself - not my ticket, but coincidentally the same product:

So we’re close, but it’s not fully working and still not beautiful.

But it begs the question: What API is the Homebridge plugin using, and why is there no Home Asssitant integration using this API directly? Is it hacky and sucks - perhaps underscored by the bugs?

Does anyone know more?

Can you provide the model number of your thermostats? Thank you!

Don’t think this is going to happen with an “official” integration.

The problem lies with Amazon, who just won’t allow any third party access to Alexa. As you say, the “input boolean” method allows you to trigger routines, but that’s about it. Alexa Media Player (which has been in trouble lately) uses an unofficial API and HomeKit probably does the same.

1 Like

From what I saw online, the thermostats I found connect by Zigbee. Without telling us more info, you’re not likely going to get any real solutions.

They’re Danfoss Link Thermostats, connected to a Danfoss Link CC via a proprietary Z-Wave-based (not Zigbee) radio protocol. Trust me, short of someone reverse engineering the Android app that talks to the cloud backend and extracting the keys, or doing something similar at the level of Z-Wave, there won’t be a direct integration for them, as lovely as that would be.

The real objective is to use Alexa as middleman.