I had noticed that you can use String to select from a predefined list of options, but that means it’s hard coded list in the Item itself. However, the favourite list is dynamic and changing as the user adds and removed things in the Kodi gui. As this changed in Kodi, the combo box in the Paper UI item changes to reflect the contents… So the alexa prompt would need to match things in the Item, not the hard code list of string literal. In PaperUI, you open the combo box and pick one of the list of strings… Obv I am aming to say soemthing like “play favorite “apollo 13” on kodi”, or something like that. But “apollo 13” won’t be hard coded in the item.
It looks like this;
and you can click the combo to get the full list as below;
Under the Cabin, I can ask for the actual temp, I can set the target, and I can turn the heater on/off. All those work just fine… but!!! I can’t get it to tell me humidity… I item is there, because I can see it here;
Just can’t get alexi to tell me, Tried all ways of asking, most just say, “that is not support yet”
The list of your favorite item options will need to be known on the Alexa side no matter what. However, if it’s a matter of not specifying manually all the supported modes, as mentioned in the ModeController interface documentation, the skill can automatically use the state description options for that given item, assuming the Kodi binding populates that information, which seems to be the case based on your observation. So, you can omit that configuration parameter and Alexa should know all the favorite modes for that item.
Keep in mind that if these options keep changing on the OH side, you will need to trigger a discovery on the Alexa to update that list. Moreover, you need to know that the Alexa language processing may not always understand made-up terms. So you may have to update accordingly, through trial and error, on the Kodi end if necessary.
As mentioned previously, there is no direct way to use the action “play” with the ModeController interface. It is reserved on the Alexa side currently for PlaybackController interface. The only way, which is definitely not optimal, is to use Alexa routines to set the device desired mode but it would mean hard coding each modes. So if you want to stick to dynamic modes, you will only be able to use the utterance example I mentioned above (e.g. Alexa, set favorite to apollo 13 on kodi)
Try using the CurrentHumidity metadata label instead, which translates to a non-controllable RangeController interface.
This still replies “That’s not support yet”, when asked, “what the humidity in the cabin”
But has not problem with “what’s the temp in the cabin”
With regards to the favourites thing, much better. If i removed the hard coded list, it does indeed pull them. But I think I’m having to delete the device in Alexa and add it back to pick it up. Can I make the refresh happen from OH end. I could do something in a rule on change of item, if i knew what to do.
No, all the things that seem right reply “Sorry, that’s not supported yet”, I change the word humidity to anything else, it goes of and searches the web or something. So I’m sure it’s recognising it as what it is, just not able link it to the item…?
Not possible for the time being. There is an automated discovery on the Alexa side that is triggered every 24 hours or so. Other than that you will need to manually trigger the discovery.
Looks like i’ve take this as far as I can then. I’ll add some new favourites and see how long (if at all) it takes Alexa to be able to use then. or if I need to remove it each time. which will make it a bit pointless, after all this.
Remove your cabin device from the Alexa discovered list and trigger a manual discovery.
I have been doing this as a matter of course, when I make any change to the item that is linked to Alexa. Just to ensure it’s in full sync with the right information. I remove the device using the app, the say “find devices” it replies found x new devices. I then go into devices, it can’t be seem. I swipe down and it appears. That’s the process I have been following when I made an Item change. It might not be required on each change, but it seems the best way to make sure it’s right.
Even after this, it always says;
"Sorry, that’s not supported yet”
Not sure what to tell you at this point. I just ran a test and it worked on my end. Check your Alexa voice history to see if your requests were understood correctly.
As a side note, looking at your item definition, you should also add the thermostat mode capability as well associated with the PowerController interface (aka Switchable) so you can have the mode setting and turn on/off utterances available.
@jeshab, I will try a little more tomorrow to nail the thermostat down.
To give you an upload on the dynamic list selection, it’s working pretty well.
I can use “watch” as the trigger word and simply say;
“Alexa, watch edge of tomorrow in movie room” and it works
Only little niggle is that after Alexa switches kodi to play the source, it ALWAYS says “Movie room isn’t responding, please check you …” It always does this. So I’m guessing whatever reply it’s getting back from the plug makes it think it hasn’t worked, even though it as worked perfectly. It would be good if it didn’t, I can tell that will become very annoying!!! lol
And if I add any new favourites, I can just say “alexa, find devices” and after that it knows them. I do need to rename the favourite “b. b. c. one” after looking in activity to see what it heard, but that’s no big issue and can easy be lived with. Just the annoying message that’s ruining it now
Make sure to go over the troubleshooting documentation related to device not responding. If you modeled a group endpoint for your Kodi device, you need to make sure that all the Alexa-enabled items part of that group are returning valid states.