What’s in a Name?
Ok, while I may have a Smart Home, my brain is getting fuzzy so I am writing this wall of text more for my own head than anything else. If things here help you in any way, all the better…
In my last post I went into some of the bits I am putting together for Smart Home automation, and for the most part, things are moving along fairly well. We have installed SmartThings, Amazon Echo, and a bunch of Philips Hue bulbs, light strips and lamps. I’ve also picked up some Lutron switches to control other Zigbee and Z-Wave devices.
I come from a technology background, so I started out first by coming up with naming conventions for my Smart Home devices, these were to help me know what and where each device is. For example, in my kitchen I installed three Hue BR30 lights in the recessed lighting cans KitchenLightColorSpot01 and KitchenLightColorSpot02, and KitchenLightColorSink. Next, I created a virtual switch in SmartThings called Kitchen Lights. All seemed to be moving along swimmingly! That is until I created an Amazon Echo group Kitchen Lights… keeping it simple stupid (KISS) … right?
Wrong! The road to Smart Home Hell is paved with good intentions!
Alexa got completely confused and when we would say “Echo, turn on Kitchen Lights” it would regularly flip out and either do nothing, or give the dreaded “there are many devices with that name, which device do you want” followup message. I quickly realized (and later confirmed in the SmartThings forums) that Alexa, Hue Bridge and SmartThings really do need naming conventions that do not collide. This sent me back to the drawing board.
rose IoT device by any other name …
So here is the conundrum. I want simple straightforward names to be used for the household devices, yet we need to ensure distinct namespaces. This is no different from say LDAP or DNS at its core. I am thinking of a “Public” and “Private” set of names. Internal/Private names that are the inherent name of the ‘thing” and then a human usable Alias/Public name for voice controls (and to pass the WAF Test which is of course the most critical of all).
For the Private namespace, there are devices that are controlled, things that control (sometimes one in the same) as well as macros, routines, etc. I am thinking along the lines of z.RoomAbbreviation.Type.Brand/Model.Device## so that we end up with something along the lines of z.LR.Lighting.GE.TableLampSwitch01 or KTCHN.Lighting.HueBR30.SinkOverHead. I could expand this to another level where it makes sense to z.FRTDR.Sensor.Samsung.Motion.Walkway to differentiate it from z.FRTDR.Sensor.Samsung.Motion.Driveway. Now you may be asking WTF is with the “z.” prefix? Simple! I want all the Private device names to be at the bottom of my device listing in SmartThings – and this is the quickest / easiest way to force it.
Conversations with your Smart Home
So now we’ve got our Private Namespace worked out – at least tentatively – but having to say “Alexa turn on z.LR.Lighting.GE.TableLampSwitch01” would not only fail the WAF test, but could lead to extreme amounts of pain being inflicted on me when Alexa stops functioning as anything other than a blunt object hurled at my head by my better half.
For anything that a human would interact by voice command to the Smart Home, and not use buttons, apps or physical switches, we can now create taxonomies that make sense to the person issuing the command, as well as the natural language processing systems of Alexa. This part will take much more time and patience to tease out, and there will be a lot of duplication of commands so that a full range of iterations could be processed.
Teaching Alexa how to think like my familyI would probably start thinking about how to naturally ask another person to do something. No person would (or should have to) say Alexa turn on Kitchen Lights numbers 3,5,7 but not 4 and 6, rather it would make more sense to simply ask Alexa to turn on the lights over the breakfast bar. I may create a virtual switch in Hue or SmartThings for this (naming it z.KTCHN.Lighting.Virtual.BreakfastBar or similar) but in Alexa it would simply be Breakfast Bar Lights. This would be set in Alexa’s app (or possibly in Hue or elsewhere) and there is no collision and natural language commands can be spoken. Alexa, please turn on the Breakfast Bar Lights and set to 50% should be something that can be easily accomplished (in theory).
Depending on how well this works, I may need to create multiple ‘rules’ within Alexa for variants on a theme. I am not sure how well Alexa can interpret “Alexa, turn on Breakfast Bar Lights and set to 50% Red” but I could create a specific rule for ones that are used often, so that its pre-canned and Alexa doesn’t need to do much interpretation of the request.
I’m on the road today and tomorrow, so this weekend will be a bit of rejiggering of the Smart Home solutions, rethinking both code and physical deployments, and installing three Lutron dimmer switches to control those things that Alexa cannot natively touch such as Cree LED bulbs…
I have a sinking feeling that this is going to become a bit of an obsession …