Hello. I have currently installed the myopenHAB.org cloud service to use Amazon Alexa to give commands. This works great for switching lights, but for some blinds I would like to expose a different functionality, like the one I have exposed through a sitemap.
Let me show you a simplified version of what I got so far:
// default.items
Switch Light1 "the Light" <switch> {channel="zwave:...", alexa="PowerController.powerState"}
Rollershutter Blinds "the Blinds" <rollershutter> { channel="zwave:...", alexa="PercentageController.percentage"}
Dimmer Slats_Tilt "the Tilt" <slats> {channel="zwave: ...", alexa="PercentageController.percentage"}
The last sitemap entry exposes the slats as a three-way switch for three predefined tilts. I would like to expose these friendly names via Alexa.
What currently works are commands like these:
âAlexa, turn th light on/off!â
âAlexa, set the Blinds to 50 percent!â
âAlexa, set the Tilt to to 35 percent!â
However, I want to work with the mapped names and be able to request things like:
âAlexa, set the tilt to light!â
Has anyone achieved this, or some advice how to make this possible?
You should use the range controller interface associated to a group endpoint to achieve this. Keep in mind that the current version of the live skill only supports that interface in the US but this will be expanded to the other regions very soon.
As a side note, no need to specify âtheâ in your item label. Alexa language processing handles these words. The configuration below will basically roll the two capabilities into one group device. So you will need to remove the previous two devices that were discovered related to these functionalities from your Alexa account.
Also, since it seems the tilt on your blinds are limited to a range from 0 to 50%, I specified that range limit in the item alexa metadata parameters. That way, if you request for a number above that limit, you should get a number out of range error response.
Alexa, set the blinds opening to 50 percent Alexa, set the blinds tilt to 35 percent Alexa, set the blinds tilt to light
(If you only setup this device once on your account, you should be able to get away by not calling the device name: Alexa, set the opening to 50 percent)
Thank you very much, I implemented this but as you stated, It does not work for me currently, as Iâm located in Germany, but still your detailed comment has been most helpful. I guess I will have to wait.
The documentation for the alexa skill is quite confusing to me. Hence, I have some questions regarding that:
In the presets string, what do I do with the â@â prefix? Does this correspond to the mapping names in the sitemap? E.g., if I had
Do you have any estimate, when the rangeController will be available id Germany? When I drop the group, I can have these [aspects of the same device] as different items, and there I can actually use the rangeController.
You have to define one or more friendly names (aka labels), delimited by â:â, for each presets that you can use to request a preset to be set to. Same goes with the capability friendly names. There are two types of labels you can specify. The first one is a simple text label localized in your own language and the second one is to use one of the asset ids provided by Amazon.
The asset ids are prefixed with â@â and I would recommend using these over text labels if the term you would like to use is included in the asset catalog. The idea behind this is that Amazon expands, on their end, each asset ids into a list of pre-defined friendly names and their localized translations, based on the language your echo device is configured. This means that if you use @Value.Close, Alexa language interpretation would be able to understand âCloseâ in English, âSchlieĂenâ in German, âFermeâ in French, and so onâŠ
So going back to my example presets="0=@Value.Close:Closed,35=Light,50=@Value.Open", I added Closed to the â0â preset label list, in line with your sitemap configuration, because it is not included in the asset id @Value.Close. However, now that I think about it, you could probably remove it and just use the asset id alone for that preset as the Alexa language processing will most likely be able to understand it anyway. Likewise, I just used text label Light for the â35â preset because there isnât an asset id that cover that name as of yet.
Using your example, assuming that the first two mappings donât have relevant asset ids, the presets metadata parameter would be: presets="17=somename,81=othername,0=@Value.Close"
Since you are located in Germany, I would recommend, if not already done, that you name your Alexa-linked item labels and text-based friendly names in your own language, unless you have set your echo devices to English language.
You can watch the issue below. The change has been implemented. So it shouldnât take too long before it is available in the live skill.
I am not sure to follow what you are trying to ask here. A group endpoint allows you to bundle several capabilities into one device on the Alexa side. You can go over the skill concept documentation to get more information.
Thank you for the advice. Of course I have the device names in German, I thought it might be beneficial to use English example names to get more people to better understand my question.
One further question: From what documentation page do I/you pull the alexa="Endpoint.InteriorBlind"? I canât find information on that anywhere.
What I was trying to say is, that the range controller alone works for me, however the group endpoint tigether with the range controller does not.
I figured I was trying to make sure especially with all my explanation related to localization.
You should check the group endpoint documentation. Basically, in that example, the group endpoint will be defined as display category âINTERIOR_BLINDâ. There is a small addition I need to add to the documentation in the fact that you can use camel-cased category names when they include an underscore. You could have defined that group endpoint as alexa="Endpoint.INTERIOR_BLIND" but I personally donât think it is that clean
I see. This is strange. But a lot of the concept I mentioned above is fairly new and some such the latest display categories that were added recently may not be supported in other languages as of yet, it could be just a naming issue, or even how the request is formulated. Anyway, as you might have noticed, some of the advanced configuration is just trial and error.
Oh well, according to the list of supported locales, the range controller should be working right now.
I could not find, however, how to correctly adress the rangeController in German.
I mainly tried (with friendlyNames="Ăffnung" for the Rollershutter and a preset of presets="100=@Value.Open")
âAlexa, setzte Ăffnung von Jalousie auf 100!â,
âAlexa, setzte Ăffnung von Jalousie auf âoffenââ
and
âAlexa, setze Jalousie auf 100â, to which she replied âWhich setting?â, so I told her âĂffnungâ, but then she replies âIch weiĂ nicht, wie ich diese Einstellung fĂŒr Jalousie machen kannâ. My translation: âI donât know how to apply this setting for âJalousieââ.
Correct but itâs not in the skill yet. Currently, all text labels are hard coded to âen-USâ locale in the skill. Basically preventing the support for other languages unless using an asset id. Unfortunately, you will have to wait for the enhancement I mentioned above to be released to the live skill.
Once the change will be in place, the default text label language will go by your OH server regional settings or you will be able to define it in the metadata parameters (e.g. friendlyNames="Ăffnung@de-DE")
Great. Iâm quite new to openhab and smart home tech in general, so Iâm often not used to the vocabulary and didnât make enough of a distinction between the skill and the amazon api. Thank you for clarification.