Official Google Assistant Integration for openHAB

My Homematic setup is ready and waiting.

1 Like

Bring it on! :slight_smile:

1 Like

Hi @all,
I ve deployed some PRs and changes.
Can you test if e.g. Thermostat functionallity is working for you?
And maybe also test if you still hit the “tagging” issue?

Thermostats should be supported now.
Hope you dont over-sync the OH Google Integration ( @greg behave :slight_smile: )

BR Mehmet

1 Like

Try it. Should be working.

@MARZIMA - great update!! I’ve tested my setup, with the following to report:

-Dimming/Brightening now works correctly! (no longer goes 0%<->100%)
-CurrentTemperature tag works correctly!
-Tag misspellings no longer break the linking process!

That said, I’ve had no luck with the Thermostat tag. I’m tagging my “Heat Set” and “Cool Set” Number items with it, but they do not show up in my Google Home app after syncing devices. Also, is there a different tag for thermostat mode? How does the action differentiate between Heat/Cool setpoints and Mode Number items? (I’m using a CT100 thermostat, btw).

EDIT:
-After looking over the Alexa documentation again, I realized I needed to add the “Thermostat” tag to the Group item, and “TargetTemperature” tags to the two setpoint Number items. After doing that, the Thermostat functionality mostly works! Two issues remain:

  1. I can’t change the thermostat mode (even after adding “homekit:HeatingCooling” tag per Alexa doc to my mode Number item). When telling Google to “Set Thermostat to Auto/Heat/Cool”, Google Home attempts something, but times out saying “Sorry, I can’t reach openHAB right now” <- No errors or commands appear in the OH logs.
  2. Because the CT100 (and I’m sure several other thermostats) have discrete setpoints for Heating/Cooling, using the generic “TargetTemperature” tag on both means they will both be set to the ordered temperature. This is fine, but doesn’t really allow the use of the AUTO mode, in which the Heat/Cool setpoints define a target range rather than a discrete temperature setpoint. Instead, it would be better if there were discrete tags for Heating/Cooling setpoints.

Unrelated, but remaining issue:

  1. There’s no “AUDIO” specific tags, i.e. volume, so I’m using the workaround of setting volume using “Lighting” tags. This means that when I tell Google to “Set Office Volume to 20%”, it responds “Ok, setting the Office Volume Brightness to 20%”. Just a misnomer, but it would be nice to have a discrete tag for volume items.

Thanks for all your work, as always @MARZIMA, and yours too @skimdankish! This is an excellent improvement to an already excellent feature. I’ll try to make an update video soon on my YT channel, to help others get these set up easily…

1 Like

I don’t have a driven thermostat but I would like to ask Google for the temperature in each my rooms with the sentence “Ok Google, what is the temperature in the living room ?”. Is it possible ? What is the tag to use ?

Hi, thanks for your work. The new tags are not working for me. Added [ “CurrentTemperature” ] to one of my temperature items and since then google isn’t able to sync my devices at all.

Furthermore i get a lot of strange error logs regarding items that are not related to the new tag at all. One example:

2018-05-05 11:48:34.117 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:Ct_Dc_State_Ki in ManagedMetadataProviderImpl, because it does not exists.
1 Like

@Lolodomo I have this by assigning the Thermostat to a room.

Then you can say: “What’s temperature in the living room?” or to get all of them (in a very unstructured fashion) “What’s the temperature inside?”

The later is ridiculous since I have 3 thermostats and 1 sensor and Google doesn’t breakdown what’s what.

Will roller shutter be included too?

1 Like

@bartus

Re: mode, I thought I had worked this issue out, but it was hard because it needed to account for modes with numbers (e.g. ZWave) so some wire must have gotten crosses in the code. I should be able to review in the coming days and submit to @MARZIMA

re: brightness vs volume…unfortunately this is by Googles design. The trait being used is brightness, perhaps in the future there may be another trait that can be used specific for volume. I see some issues on how to discern a volume from brightness or blinds, etc.

Thanks for the advice.

Are there any other JSON (or other files) where the new thing / item could be listed?

The dimmer is working everywhere (within OpenHab2) but it’s really not listed in the *.Items.json file, so not linking with Google Assistant.

I simply added tag [ “CurrentTemperature” ] to items assigned to temperature (in .items file), saved changes and then asked Google to sync my devices. And new temp devices showed up immediately in Google Home app. Now I can ask: “Hey Google, what is a temperature in living room?” Works perfectly!

As others say Tag misspellings no longer break the linking process, but if you have more than 1 tag Google not recognize the item.
For example:
kitchenLight “Kitchen light” (gLights) [“Lighting”, “iss:room:Kitchen”, “iss:type:DevSwitch”, “iss:link:energy:kitchenLightWatts”]

This I’m cannot be identified…

Just to clarify a bit and ensure my understanding.

I put 2 items Bedroom_TargetTemp and Bedroom_CurrentTemp in a group called gBedroom_Thermostat

And the items are:

Group gBedroom_Thermostat "Bedroom Thermostat" [ "Thermostat" ]
Number Bedroom_TargetTemp (gBedroom_Thermostat) [ "TargetTemperature" ]
Number Bedroom_CurrentTemp (gBedroom_Thermostat) [ "CurrentTemperature" ]

And this should show only one new device in Google Assistant called “Bedroom Thermostat”

1 Like

That is how i try it as well.
But now if i want to sync my google devices it tells me that my OH devices cant be synced and i should try to relink my account. I’ll definitly wont do that :wink:

@andirs

Try copying the style from here (HomeKit Addon):

You need Group which has the Thermostat Tag, then:

  • Current Temp (as a Number)
  • Mode (either number, if Zwave, or string but must have auto, on, off, etc.)
  • Setpoint (as a Number)

All assigned to the group. I think the mode is important, I tried to default in the event of failure to obtain, but does not appear to work.

Thanks for your answer. Problem is that my thermostats do not really feature a “Mode”. I have Homematic thermostats. The only items i have is a switch item to go to “Auto” and a Number item to set a “Manual” temperature disabling the automatic schedule.

I’ll think about a fake string item which then controls these other item within a rule… or does someone have a better idea?

Edit: I found a string “Control_Mode” but it is read-only and does not follow the naming on, off, auto …

I had the same problem, added the “CurrentTemperature” tag to 3 items and sync worked. Then I added another 3 tags and since then, I could not sync again.
Then I tried “Hey google: sync openHAB” and this worked.
Therefore, I think linking works to openHAB but fails to Philips HUE.

2 small comments:

  • Google Home seems to round temperature values to 0.5 degrees
  • When a current temperature item is NULL, I get the message: “Thermostat set to heating” or similar.

Many thanks to MARZIMA

@andirs

I had a similar problem, my house is old and could not get a tstat wire up to my 2nd floor. So I jury-rigged a wireless connection using pi-zeros with temp sensors (mqtt->OH2) and a zwave contact sensor for the furnace/valve (it’s hydronic).

I was trying to keep the spirit of how Google expects thermostat data from third-party systems (so the action complies). This is often hard though when there are situations like mine and yours where the manufacturer (or lack thereof for me) declines to have those variables.

What I have found though and what @BlueOH stumbled on as well is that the important thing is that there just needs to be something assigned to these values (or you get funny responses). For instance, for my makeshift thermostat I have Openhab restore the value to “heat” (since it’s a heat-only system) upon boot up.

I wonder if it makes sense, during SYNC to assign “auto” to the mode??

@MARZIMA
1st of all: Thanks much for your hard work!
The progress is really great and everything works like a charm so far.

But as you integrated “CurrentTemperature” and “Thermostat” now, i would ask you to add the corresponding examples to your first thread, as I’m for sure not the only one looking for “what google allows me to do with the devices”.

PS: a bit advertisement for my little project corresponding to the google integration: TagControl