Auto-alias Light to Lights and Lamp
Posted: Saturday 29 December 2018 15:19
I realise all the current Alexa integrations for smart home are gratefully using the standard Amazon API with its pre-defined utterances. So that 'turn on kitchen light' just works. I have some variations on 'light' in my Domoticz setup - e.g. 'lights' (plural) and 'lamp'. I notice Alexa is sometimes picky and when I accidentally say 'turn on kitchen light' instead of 'kitchen lights', she refuses. I also have a device called 'dining light'. Sometimes she just turns it on but sometimes she complains about not finding a device named 'dining ROOM light', which I didn't ask for and which I indeed don't have. Hmm.
A manual work-around I've found (in the Alexa app/console) is to create a group name as an alias to a similar device name. So if I create a group called 'kitchen light' and it contains the device 'kitchen lights', all is ok. Same with e.g. a group called 'dining room light' which contains my device 'dining light'. The similarity in group name and device name solves any mistakes I make in my utterance and any times that Alexa is PMS'ing.
Does anybody know a way to auto-create groups during the discovery process so I don't have to do it manually with each new device? Meaning, if a device called 'XXX light' or 'XXX lights' or 'XXX lamp' is discovered, automatically create groups with entries that match my other variations on the device name. I'm building my own skill in python and haven't found any examples of doing this in the Amazon docs or forums.
A manual work-around I've found (in the Alexa app/console) is to create a group name as an alias to a similar device name. So if I create a group called 'kitchen light' and it contains the device 'kitchen lights', all is ok. Same with e.g. a group called 'dining room light' which contains my device 'dining light'. The similarity in group name and device name solves any mistakes I make in my utterance and any times that Alexa is PMS'ing.
Does anybody know a way to auto-create groups during the discovery process so I don't have to do it manually with each new device? Meaning, if a device called 'XXX light' or 'XXX lights' or 'XXX lamp' is discovered, automatically create groups with entries that match my other variations on the device name. I'm building my own skill in python and haven't found any examples of doing this in the Amazon docs or forums.