X10 with Google Assistant

Using OH 4.03 on a Pi 3b, I have several X10 devices working (with minor annoyances in the log file). I’d like to implement voice control for the X10 devices.

I’m using the X10 Controller Binding [;, which requires textual definitions for the items. For example:

Dimmer TestDimmer "Test Dimmer" <light> (Office) { channel="x10:dimmer:MyCm15a:TestDimmer:lightlevel" }

The Google Assistant Action docs say I need to add metadata for items… I doubt that adding

, ga="TestDimmer" 
, ga="Test Dimmer"

to the end of the item definition would work since I assume the binding would need to deal with it.


Check following link which describes the syntax of meta data to be added

Thanks, Wolfgang.

I did read the docs (maybe too hastily) and I think maybe it’s a binding issue.

As I mentioned, the binding requires textual item definitions. I tried:

Dimmer X10TestDimmer "X10 Test Dimmer" <light> (Office) { channel="x10:dimmer:MyCm15a:X10TestDimmer:lightlevel", ga="X10TestDimmer1" }
Switch OfficeTableLamp "Office Table Lamp" <light> (Office) { channel="x10:switch:MyCm15a:OfficeTableLamp:switchstatus", ga="OfficeTableLamp1" }

Neither the Dimmer nor the Switch are seen by Google. I have other “works with Google” devices which work fine. My 14 X10 devices work fine from within OpenHAB (other than the annoying log entries, which I suppose could be suppressed).

I don’t own a Google Assistant so my answers here are not based on experience just based on reading and interpreting the docs.
As far as I understand the docs you are only allowed to use specific, defined keywords after the character sequence ga= that e.g. means you can’t use ga="X10TestDimmer1" I think it needs to be ga="Light" instead.

You can only use the metadata values that are listed in the documentation, because these are the equipment types that OH can expose to Google Assistant. If you make up your own metadata, it will be ignored.

As @Wolfgang_S noted, you can use ga="Light" for a switch/dimmer.

FYI, after an item is created in a text file, it’s possible to add metadata to it through MainUI. However, I don’t recommend this unless absolutely necessary, because it can cause confusion later. If you do it, leave a note for your future self in the text file.

Thanks, Wolfgang. Your answer solved my main issue!

Thanks, Russ. it’s starting to sink in.

BTW, it seems it’s not possible for me to add metadata to it through MainUI for my textual items as there is a lock symbol attached to my textually defined items. I guess that’s a good thing.

BTW, I don’t know how the “regulars” here, like you, find the time and patience, but it is really appreciated!

Thanks to your and Wolfg@ang_S’s help, I now have voice control of 14 X10 devices.

I still don’t understand (at least) one thing. If I define a location/room (Group) for items from my phone, then all of the items in that Group respond as a Group from my phone’s screen, which makes sense, I suppose, but I seem to lose individual control for each item in the Group. (See below). The percent shown seems to be an average of the all the items in the group.

I did not try a long-press on Office Lights, which might have given me what I expected to see (each item).

I’m still on OH3, but the lock doesn’t prevent me from adding metadata. I just can’t change things that are defined in the text file.

I’ve actually been here much less over the past few months for a few reasons. First, I’m still on OH3, so my ability to help with OH4 is limited. Second, I have less time at the moment to give to the OH community. Third, I found myself having less patience with people (both here and in real life), and felt like I needed to recalibrate my attitude. I’ve always found that it helps to step away and gain perspective when things don’t feel quite right.

I’m still checking in every day, but I’m more selective about the topics I’ll respond to. I might increase my involvement again after jumping to OH4, but this could also be my new normal. :wink:

I’m not sure if you’re talking about controlling items through the Home app’s UI or by voice. If the former, then I can’t help you much since I only use the app to configure devices and shortcuts. I don’t control anything directly through the Home app, because an OH UI is better for that (in my opinion). There are a few benefits to this:

  1. I only have a handful of items exposed to GA (to control by voice).
  2. I have full control of layout in an OH sitemap
  3. I’m not heavily impacted by Google’s neverending changes to the Home UI

If you’re struggling with voice control, then your problem is likely that too many things are named “Office”. GA is not sophisticated. As far as I can tell, the heirarchy for voice recognition is:

  1. Trigger a user shortcut/routine
  2. Trigger a built-in shortcut/routine
  3. Trigger a room (meaning, turn on/off EVERYTHING in the room)
  4. Trigger all of the devices that have a recognized word in their names

I recently learned that if GA hears “turn on the apartment”, it will proceed to turn on every single thing in my home. This is quite, quite stupid and useless. Lights turned on. Fans turned on. My fireplace turned on. Then OH rules caught up and chaos ensued. To avoid this, I set up a shortcut that does what I actually said: “turn on the air fryer”.

So what you have to do is give everything a distinct name and/or set up shortcuts. Make it so that GA doesn’t have to guess, because odds are that it’ll guess wrong.

I completely agree with your assessment of GA’s Artificial Stupidity. I’ve been needlessly chasing my tail for several days because of the ways GA mishandles things.

Based on your comments, I plan to trim down what I have set up in GA.

Long pressing the group will bring you to the individual devices :wink:

Thanks, Michael. I stumbled across your solution since my earlier post.

My log files still contain annoying Mochad-based WARNings, which I intend to look into, though it’s a not high priority since things are working fairly well otherwise.