Alexa reversed functionality?

I know this sounds a bit silly but I got some lights wihch are Alexa compatible, I just don´t want to use Alexa. Is there a way for openHAB to trigger this functionality sort of “simulating” Alexa?

At the end the lights are not going to listen to a spoken word but a command sent from the alexa receiver which most likely is nothing else but a number sent by a specific protocol?

No you cannot simulate Alexa and that doesn’t make sense.
But most smart devices you can directly control from openHAB using the native protocol so that depends on your devices. If it’s a rebranded Wi-Fi, search the forum for Tuya.

You can run alexa off an rpi, don’t see the usecase myself, but it is possible.

Regards S

Why shouldn´t make that sense? A lot of devices offer Alexa and sort of compatibilty but don´t follow any other standard protocol. I have some pool lights and a pool pump controller with own apps and Alexa compatibility but I don´t want to use Alexa and I don´t always want to switch over to their apps all the time.

Not sure what this would change, maybe it would be possible to sniff the commands with that… hmm

What’s the reason you don’t want a physical alexa device?
Most of the Alexa magic is not happening on the actual alexa device, it’s in the cloud.

Regards, S

Alexa talks to them through cloud not locally (or if they do, they also have a standards interface such as ZigBee). That is an unpublished interface and subject to change at any time hence even any attempt at reverse engineering doesn’t make sense.
Most of these “a lot of” devices you refer to are re-branded Tuya. Those you can flash with Tasmota and hook them up to OH, you’ll be loosing Alexa control but that you can re-add via OH.
Drop your Alexa idea, it’s a dead end.

I don´t think it is of any importance for the device where it gets the control command from. And also alexa commands need to approach my local network somehow :wink: Well, at least I´d be pretty irritated if that works without my network. Anyway, since they use their own apps as well there got to be some direct communication. Maybe I should try to sniff what is happening there.

@Seaside Why would I if it still doesn´t do what I want? Just in case I´d have an Alexa device, would that enable me to control the pool light by a button on my openHAB terminal? Even IF I´d use a spying microphone in my home it for sure wouldn´t be Alexa.

Do you want to

(1) control the devices with openHAB directly and without using Alexa at all?
(2) control the device connected to Alexa from openHAB without SPEAKING with Alexa?

You do sound like a smarthome-user that wants to keep the control over the smart devices in the local network (like many others).
By doing such the question:

is of importance, otherwise you can’t control it locally.
Follow the advice from @mstormi and you will get there.

In almost all cases Alexa/Google Assistant support works in one of two ways:

  1. Alexa device → Alexa cloud service → Device’s cloud service → Device: Alexa is not communicating directly with your device. It’s going through the Device’s cloud service. And there is pretty strong authorization and authentication between the two cloud services.

  2. Alexa device → Alexa cloud service (to understand the command) → Radio/plug-in on Alexa Device → Device: Alexa is directly communicating with the device, but that is usually only for devices that use technologies like Zigbee or Bluetooth or other non-WiFi wireless technologies.

Given the above:

This is not how it works. And because of the strong cloud-2-cloud authentication you can’t pretend to be Alexa when sending these commands. You need to be independently authenticated and authorized to make the commands to the device maker’s cloud service.

So your real options are to continue to use Alexa or to cut Alexa out of the picture entirely and integrate the device directly into openHAB.

Yes if one of the following is true:

  • the device maker provides a published cloud API which openHAB can communicate with directly

  • someone has reverse engineered the device maker’s cloud API

  • the device is wifi and the device maker has published a local control API which openHAB can communicate with directly (this is very rare)

  • the device is wifi and someone has reverse engineered the local control API

  • the device can be reflashed with open source firmware that enables local control

  • the device uses a standard non-wifi wireless protocol for communication (Zigbee, Zwave, etc.) and you add a USB dongle to your openHAB server that allows for that type of communication

If any one of the above is true, you can integrate the device with OH directly without Alexa.

Here is how that works. The device connects to the device’s cloud service. It’s an outgoing request initiated by the device to the cloud server so your firewall will allow it. With the connection established, the cloud service will forward any commands to the device and receive any sensor readings from the device through that connection.

Anything that wants to interact with the device wirelessly, be it the device service’s web page, the phone app, Alexa, Google Assitant, etc. all must communicate with the device through the device’s cloud server. The cloud server forwards the commands to the device.

Unless the company providing the devices is really bad at security (in which case unplug these devices now, they are not safe to use) all the above communication will be point-to-point encrypted using TLS just like your browser does when using HTTPS. So sniffing the network traffic probably won’t tell you much.

tl;dr: What you are asking for is out of a misunderstanding on how this stuff all works. If you don’t want to use Alexa, you can’t pretend to be Alexa to control devices that are not already supported by OH. You will have to integrate those devices with OH directly, or use the real Alexa service. There are not short cuts and if there were, the security provided is so weak you should not use these devices in the first place.

Thanks for the introduction to the alexa architecture, this makes it really pointless trying something that way. @J-N-K (1), the Alexa idea was just because I know the devices support that way.

As detailed, OH can’t similuate Alexa. However, you can use an Echo device as a proxy to pass commands from OH to those devices. It’s easy enough to ignore the voice assistant by muting the mics, wrapping it in duct tape, and then stashing it in a closet.

Note that there are limitations due to the long polling interval.

The polling interval configured in the Account Thing to get the state is specified in minutes and has a minimum of 10. This means it takes up to 10 minutes to see the state of a channel. The reason for this low interval is, that the polling causes a big server load for the Smart Home Skills.

This means that you can’t rely on the Echo to immediately report to OH and trigger rules.

The others probably forgot about this binding, as it doesn’t come up very often. If you search the forum, you’ll find a handful of people talking about it, and they can probably tell you how well it works.

As @mstormi noted, it’s possible that your devices are Tuya rebrands, in which case you might be able to get Tasmota firmware onto them and have direct control with MQTT. However, it depends on your Tuya firmware, as they made changes about a year ago that prevent over-the-air flashing of devices. There’s also at least one way to control Tuya devices without flashing them.

2 Likes