I’m finding setting up the Alexa skill to be very confusing. I’ve read the docs but I think I’m missing something important. I have a light on a dimmer switch that I want to control via Alexa. I can control it via the OpenHab app so I know that it set up correctly. Here is my very simple layout
I tried following the troubleshooting and Alexa said it doesn’t know about the device so I tried “Alexa discover” and it said that it discovered 2 items but didn’t tell me what they were. It still says that it doesn’t know of a group or device called “Office light” or “Office light dimmer”.
What other troubleshooting steps can I take? I don’t see anything interesting in the logs either.
As far as I can see from a quick check you’re missing the Alexa metadata for the dimmer item. You have to add that first. Then add the metadata for the group and openhab shows the recognized sub-items.
and then the light metadata,
Now when I ask Alexa to turn on the Office Light she says “HP OfficeJet printer doesn’t support that.” I don’t seem to be able to get rid of that item even if I delete it or disable it.
In your last example I’m not sure "Office_Light_Dimmer will work for the Name .
The Name will be in the utterance so I’m not sure how you would say that name to Alexa. Why not just call it Office Light?
I would add a switch item and define the Device/Attribute as Light.powerstate.
And keep your Dimmer item with Device/Attribute as light.dimmer
You can confirm the 2 devices that was discovered in your Alexa App. Also, it would help if you could provide the utterance voice command you are requesting as well.
There is no need to expose a group endpoint if you are only exposing one attribute. So for your use case, you should only expose your Office_Light_Dimmer item as a Light single endpoint. No need to configure the group.
Keep in mind, when deleting Alexa metadata on the OH side, you also need to clear your discovered devices on the Alexa side as well.
So I installed the Alexa app on my phone and it shows that Alexa does not see anything other than the device itself, echo and two printers trhat I don’t want it to see. Neither the light, the TV, the sprinkler system nor the printer I do want it to see are listed under Devices.
Is there something special I have to do to have it recognize those items?
I also removed the metadata from the Office Light group and changed the label of Office Light Dimmer to just Office Light.
So for others reading this thread later:
I have the Alexa app and the OpenHab app installed on my phone (Android).
I open the Alexa app and select “More” at the bottom of the screen.
From there I select “Skills & Games”.
Next I enter “OpenHab” in the “Search Alexa Skills” area at the top of the screen.
It finds OpenHab and I select it.
I press the “ENABLE TO USE” button and it starts to link the accounts
Now I have to log in to MyOpenHab
Agree to Alexa accessing OpenHab and press Continue
Linking is complete, press Next
Alexa discovers devices.
Select a device and press “Set Up Device”
Follow the instructions
I can now say “Alexa, turn Office Light to 100%”
but if I try “Alexa, turn on Office Light” she says “Office Light doesn’t support that”
Got to do some more reading but good progress.
Thanks Larsen!
That’s because you setup your Office_Light_Dimmer item with the Brigthness attribute only. As I mentioned above, you should directly setup that item as a Light single endpoint and remove the metadata configuration at the group level.
I want to be able to do both. That is I want to be able to say “Set Office Light to 50%” and be able to say “Turn Office Light on”. The Thing has no switch channel, only a dimmer channel and things like dimmer ramp rate.
So I need Alexa to hear “Turn Office Light on” and translate that to “Set Office Light to 100%”.
Well, I added Light.PowerState to the metadata for the Office_Light_Dimmer and that seems to work.
That works too but again exposing your Office_light group item to Alexa is unnecessary in your use case. I would still recommend getting familiar with the single endpoint concept.