Auto-alias Light to Lights and Lamp

Alexa, Google Home and Siri

Moderator: leecollings

Post Reply
User avatar
philchillbill
Posts: 400
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Auto-alias Light to Lights and Lamp

Post by philchillbill »

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. :mrgreen:

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.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
Madgeni
Posts: 1571
Joined: Friday 25 March 2016 17:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Auto-alias Light to Lights and Lamp

Post by Madgeni »

Hi - it's a good question. I find Alexa much more fussy than Google on understanding also.

There's no means for creating Alexa groups on the fly as far as i know. Google do allow you to send a 'room hint' with a device, which I could use to help that recomendation, the issue with that is it means discovery is multiple calls to Domoticz as Room ID is in the getalldevices, but I have to make another call to get the Room Name. I think this would make discovery too slow.
Native Alexa skill and Google app - register at https://www.controlicz.com - https://twitter.com/Controlicz
User avatar
philchillbill
Posts: 400
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Auto-alias Light to Lights and Lamp

Post by philchillbill »

In the end, I got a solution working by adding the alias name to the device Description field in Domoticz for devices where I feel it's needed. A regex parses out the desired alias name during discovery, and, if an alias name exists, a second identical endpoint is created in Alexa but using the alias name as friendlyname and with the same Domoticz idx as the main device. Works perfectly.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest