Official Alexa Smart Home Skill for openHAB 2

I enabled Hueemulation. And there enabled pairing, filled in IP-Address of my host. Now it is running! Thanx a lot!

Okay now there is one last Problem. Alexa is asking every time “There are more than one devices with that name”. I got Soundbar einschalten, Soundbar ausschalten and Soundbar stummschalten. This one are all different but for Alexa this are the same? Is this fixable too? :weary:

This is due to Alexa, so OH can’t fix this issue.

First, Why do you have an item each for on and off? Just make “Soundbar” a switchable Item. Then you can say “make soundbar on/off”.

Secondly, Just name “Soundbar stummschalten” to “Stummmodus” or similar. It even makes more sense to say “alexa turn on Mutemode” instead of “Alexa turn on Soundbar muting”

Back to my original problem: using “Alexa Smart Home Skill”…

Alexa currently is running with “hueemulation”, but there are disadvantages:

Only tags “Lighting, Switchable, TargetTemperature” are supported, but I want to use “Thermostat”, CurrentTemperature", and tag “Lighting” to a color item, too. Is this possible?

When I tag groups/items to “Thermostat”, “CurrentTemperature” nothing is detected by Alexa.

If this is not possible, then I rather would like to use “Alexa Smart Home Skill” than “Hueemulation”.

But still having problems, that Alexa not discovers my devices. I read that UPnP / SSDP could be the problem.

and I read the following:

Here is the list of ports you need to open (through your firewall):

  • Output TCP: *, 80, 8080, 443, 40317, 67, 68
  • Output UDP: *, 53, 123, 40317, 49317, 33434, 1900, 5000, 5353
  • Input TCP: 8080, 443, 40317
  • Input UDP: 53, 67, 68, 1900, 50000, 5353, 33434, 49317, 40317

@Celaeno1 can I ask where you got that list of ports from?

No: Official Alexa Smart Home Skill for openHAB 2 - #4 by digitaldan

https://forums.developer.amazon.com/articles/46667/what-tcpudp-ports-does-echo-use.html

I tried to install openhab skill, but it is not visible any more. I am sure a have seen it some days ago.

Any idea what is wrong here?

strange, it is visible when searching for “hue”

Hi guys - ive managed to get Alexa to switch on and off my Onkyo amp (very pleased about that) but changing the volume is a bit of a headache at the moment. Im not sure if its my Alexa commands that are wrong or something with the item file?

Dimmer onkyoVolume "Onkyo Volume" [ "Lighting" ] {onkyo="INCREASE:hometheater:VOLUME_UP, DECREASE:hometheater:VOLUME_DOWN"}

Thats what i have in my items file. Did the same thing more or less for the on off but using the Switchable tag instead of Lighting. Ive tried “Alexa, increase Onkyo Volume by 10%” or “Alexa, set Onkyo volume to 5” or “Alexa, set Onkyo volume to 50”. Any ideas what im doing wrong here?

With lighting the voice command I use is “set lightname to fifty percent” - have you tried that?

Using just a number with the set command it doesn’t seem to like it

The increase command you have above Alexa seems “ok” with but nothing happens

@ptmuldoon @Rob_Pope @Michael_Grossman @dgrubbs_99 @stulandr @Andrew_Pawelski @3DJupp @yves @Newan @Likonaus

For all who did not find any device with Alexa( via Official Alexa Smart Home Skill), I have maybe a solution! See here: Link

Hope this helps!

Edit: updated new information! (21 July)

@Aviram @job @Nerdletics @sihui @digitaldan

For all who did not find any device with Alexa( via Official Alexa Smart Home Skill), I have maybe a solution! See here: Link

Hope this helps!

Edit: updated new information! (21 July)

1 Like

@Celaeno1 brought my on the right track. I had missed a bracket “)” in my items file. After fixing that I have discovered that the following line in my .items file is causing major problems:

//Sonoff touch entrance=en
Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:0], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1], <[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

In particular it is the “<” in

<[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)

Even commenting out by either “//” or “*/… */” does not help.

Is there any MQTT specialist out there who could give me a hand on getting this right. It works perfectly, however Alexa does not discover any devices (except for hue bulbs) when this line is in my .items file. As soon as I remove this line (or at least the “<”), Alexa is able to discover devices but then the switch works only in one direction.

the only explanation that I can think of is that the incoming (transformed) state is either empty or null.
how does you onoff.map file look like?
have you checked if the state gets updated correctly? (remove the [ “Switchable” ] tag from the mqtt item for testing)

The onoff.map looks like this:

1=ON
0=OFF
ON=1
OFF=0

It works like a charm, however Alexa does not discover devices. As soon as I remove it, Alexa finds all my devices.
Removing [ “Switchable” ] does not change anything.

clarification: as soon as you remove the entire Switch item line or only the inbound configuration of the mqtt part?

1 Like

As soon as I remove the “<” in

Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:0], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1], <[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

So, when it looks like this

Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:0], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1], [mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

Alexa is able to discover devices but the switch of course does not work properly anymore.

In theory:
this is an invalid configuration (without a direction for the 3rd config part)
this means that OH2 will disregard the entire line and throw an error in your log file (does it do that?)
Note: Maybe OH2 is parsing the file (top to bottom), getting stuck on this wrong config and doesn’t continue to load further the items file… so… maybe something else below this line is the real problem (maybe… :slight_smile:)

I don´t think it is something below that. As soon as I remove the inbound sign (<) or the entire line, Alexa discovers everything.

I can confirm this link is the answer to alexa discovering items! thanks again @Celaeno1