Alexa disovery - groups instead of items

I can’t get Alexa to find the items that I want it to. Steps:

  • added OpenHAB cloud connector
  • created myopenhab account with UUID and secret from /var/lib/openhab2/…
  • picked items to expose in the cloud connector config in Paper UI
  • Enabled the OpenHAB Alexa skill and linked Alexa to the myopenhab account
  • Did device discovery

What I got was Alexa discovered my groups - gDimmer, gMotion, etc. and nothing else. What I expected was Alexa would find the list of 25 lights / dimmers that I configured in the cloud connector config and to which alexa metadata was added in items. The items are indeed listed correctly under “Items” in the myopenhab control panel.

Here is an excerpt from the items file for them:

Dimmer    LivingRoom_Cans        "Living Room cans [%d %%]"     (gDimmer)     {omnilink="unit:7", alexa="Lighting"}
Dimmer    LivingRoom_Lamp        "Living Room lamp [%d %%]"     (gDimmer)     {omnilink="unit:8", alexa="Lighting"}
Dimmer    DiningRoom_Overhead    "Dining Room pendant [%d %%]"  (gDimmer)     {omnilink="unit:9", alexa="Lighting"}

Guessing there is something wonky with my items.

For completeness, here is the section of items that Alexa did find:

Group:Switch:OR(ON, OFF)         gLight         "Light"             <light>         (Home)   ["Lighting", "Switchable"]
Group:Dimmer:AVG                 gDimmer        "Dimmer"            <light>         (Home)   ["Lighting", "Switchable"]
Group:Number:AVG                 gTemperature   "Temperature"       <temperature>   (Home)   ["Temperature"]
Group:Number:AVG                 gHumidity      "Humidity"          <humidity>      (Home)   ["Humidity"]
Group:Switch:OR(ON, OFF)         gPower         "Power Outlet"      <poweroutlet>   (Home)   ["Switch", "Switchable"]
Group:Contact:OR(OPEN, CLOSED)   gWindow        "Window"            <window>        (Home)   ["Window"]
Group:Contact:OR(OPEN, CLOSED)   gDoor          "Door"              <door>          (Home)   ["Door"]
Group:Switch:OR(ON, OFF)         gAirCon        "Air Conditioner"   <snow>          (Home)   ["HVAC", "Switchable"]
Group:Number:AVG                 gHeating       "Heating"           <heating>       (Home)   ["HVAC"]
Group:Switch:OR(ON, OFF)         gMotion        "Motion Sensor"     <motion>        (Home)   ["MotionDetector", "Switchable"]
Group:Switch:OR(ON, OFF)         gButtons       "Buttons"           <button>        (Home)   ["Buttons"]

Alexa found the groups that were marked “Switchable”. Is the interface confused because I have Omnilink metadata too?

I tried reversing the order of the metadata, made no difference. I tried multiple lines for the same item, one for Omnilink and one for Alexa, but that results in a duplicate item error on refresh. I tried adding “Switchable” to the metadata and that didn’t help either. What am I missing?

Any feedback appreciated.

This is the syntax you need on your items…[quote=“nwwoods, post:1, topic:77168”]
[“Lighting”, “Switchable”]

I believe you only need lighting or switchable not both.

I have not seen that alexa=xxx before. I am surprised you are not getting an error. Pretty sure if you add [ “Lighting”] to your item it will discover.

Thank you, that was it. I needed to add the [“Lighting”] for each item and poof, all of them were discovered. The documentation indicates this syntax has been moved past, but it seems not. Much appreciated.

Your insight was what put me over. Sincerely appreciated.

1 Like


Following up, I am not able to get the thermostats working with Alexa. They work fine in the HABPanel and in the Basic UI (via mobile app or desktop) but Alexa just doesn’t seem to understand them. I created a group and tried tagging liberally with [“Thermostat”], but Alexa only sees the group. Below is the item for one of the thermostats. Alexa finds it but just goes “hmm. no response” when I try anything with it.

Group   FamRm_Thermostat        "Family Room thermostat"                ["Thermostat"]                      {alexa="Endpoint.Thermostat"}
Number  FamRm_Tstat_Temp        "Current Family Room Temperature [%d °F]" (FamRm_Thermostat)  ["Thermostat"]   {omnilink="thermo_temp:2", alexa="TemperatureSensor.temperature" [scale="Fahrenheit"]}
Number  FamRm_Tstat_CoolPoint   "Family Room Cooling SetPoint [%d°F]"   (FamRm_Thermostat)  ["Thermostat"]    {omnilink="thermo_cool_point:2", alexa="ThermostatController.lowerSetpoint" [scale="Fahrenheit"]}
Number  FamRm_Tstat_HeatPoint   "Family Room Heating SetPoint [%d°F]"   (FamRm_Thermostat) ["Thermostat"]     {omnilink="thermo_heat_point:2", alexa="ThermostatController.upperSetpoint" [scale="Fahrenheit"]}
Number  FamRm_Tstat_System      "Family Room Mode [%d]"                 (FamRm_Thermostat)  ["Thermostat"]    {omnilink="thermo_system_mode:2", alexa="ThermostatController.thermostatMode" [OFF=0,HEAT=1,COOL=2,AUTO=3]}
Number  FamRm_Tstat_Fan         "Family Room Fan [%d]"                  (FamRm_Thermostat)  ["Thermostat"]    {omnilink="thermo_fan_mode:2", alexa="ThermostatController.fanMode" [OFF=0,ON=1]}
Number  FamRm_Tstat_Hold        "Family Room Hold [%d]"                 (FamRm_Thermostat)  ["Thermostat"]    {omnilink="thermo_hold_mode:2"}

It also seems the skill is more narrowly defined than what a heating/cooling t-stat offers for capability. If I understand correctly, the skill can:

  • set/get a target temp
  • get the current temp
  • increment/decrement a target temp

But the t-stat has target temps for both cooling and for heating. I don’t see any examples in the Alexa thread for how to handle that. The t-stat also has a Fan on/off switch that seems to have no meaning for Alexa. It is working fine in the regular UI’s and thus via mobile or desktop app. Should i perhaps tag the fan as “Lighting” So Alexa will see it as something that can be turned off and on?

Also am perplexed why tagging is required. After slogging through the long thread on the Alexa skill, the documentation page, and the github docs, it seems the intention is to use metadata and that tagging is only supported for backwards compatibility, and will be deprecated. But what we see in my earlier example is that tagging is still required for Alexa discovery. Is that a bug?