Alexa and complex uterance to open shutter or change chanelle

Hi

in my domotic project I want to create a action with parameter for example

Alexa, <open/closed> the shutter ?Nb .

or Alexa, put the channelle ?Nb on the TV.

I have a device communicate by mqtt or http

in mqtt the topic is shutter / : <u/s/d>
or in http : / /hostname.fr ? changetvchanel = numberchanel
how to do that with request with multiple variable in Channel

before that i used IFFTT, and created a complex sentence with multiple argument in sentence and used this to open or closed shutter, or change chanelle on my TV

Thanks for your help
Best Regard

To switch the TV channels I am using a self hosted Alexa skill called J.A.R.V.I.S.
On Alexa end you need to setup define the skill with its intents.
On my my raspi I have a python script running where Alexa sends the communication to.
The python script then switches the TV channel by using http commands on the receiver.

The receiving part for alexa is build using libraries like flask, ask_sdk_core, ask_sdk_model.

Have you looked at the Alexa skill documentation? Most of the actions you are trying to setup are covered by it.

If you need help setting this up in your environment, please provide the item definition for the devices you are looking to control via Alexa.

1 Like

easy, it’s covered with Alexa Skills in both Alexa and openHAB already. Depending on your shutter actuator you just need a “Rollershutter”-item on openHAB side, which you add Alexa-Metadata for: Shutter.RangeValue

This depends on your TV, but I’d bet you’ll have an item for the channel of your TV, which ideally triggers a smartTV with an openHAB-binding. There’s also an Alexa-Metadata for it: Television.RangeValue.

this is also pretty straight-forward: you create an item for each shutter (is this the same as above?), which you fill in the “static” variables and then only add the percentage and/or ON/OFF, depending on the MQTT-syntax.

example:

  1. create an item for your device
  2. connect it to a thing, which controls the whole device
  3. find an Alexa command for the kind of device you’re trying to control

for your rollershutter this means:

  1. create an Rollershutter-item for the percentage of the shutters
  2. connect it to an MQTT-Thing on a Channel, which already has the right topic for that specific shutter
  3. add “Shutter.RangeValue” as Metadata to the device from 1.

=> have fun.

tl;dr:>
Don’t try to overcomplicate things by parsing Alexa-text and trying to find out, what you really said!
Create one item for one aspect of your device (like openHAB is intended to do!).
Attach an Alexa command to each of these items.
No need to remember and say “complex” sentences and then let some script parse out, what you’re about to achieve! Keep it simple and one item at a time.