Official Google Assistant Integration for openHAB

Wasn´t this an issue from Google end and nothing to do with openhab?
I had this issue as well, but it went away by itself as far as I remember, (it has been some months ago now).

Perhaps. But I only have devices surfaced by openHAB. All I know is that I had this issue and the procedure resolved it. The problem Michael is having may be a Google issue as well. So a setup nuke might resolve his issue. Not certain. But might worth a shot.

Hello all,

Is it possible to implement Report State API in openhab-google-assistant.
if the answer is yes, then what is the procedure to follow.

please someone help me on this as I came to know that to publish the Google Action, we need to setup Report State.

thanks in advance

2 Likes

First of all, thanks a lot for this outstanding work! The Google Assistant works like a charm for my Lights and Switches. But I have some issues, which I can’t solve by myself:
1.) Blinds are not recognized. Maybe this is not supported with Openhab 2.4.0? Would a upgrade to 2.5.0 help?
2.) I have some temperature and humidity sensors conected. Temperature works well, but Humidity always shows 0% on Google Home Assistant.
3.) Termostat is not working on Google Home Hub as a Graphic. It just says “Actual mode is not supported”. Funny thing is, on my phone (Google Home App) the Termostat works and shows the actual Temperature.

New Devices/Traits have been added.

Awning, Boiler, Curtain, Door, Garage Door, Gate, Hood, Lock, Microwave, Pergola, Security System, Shutter, Shower, Valve, Water heater, and Window.

https://developers.google.com/actions/smarthome/guides/

Id love the Garage Door added… i currently have to use “Switchable” which isnt ideal!

Lock would also be great for everyone who has added a deadbolt to Google Assistant via OH. I’ve chosen not to, due to the security risk.

@BernRos, welcome to the OH community! Have you gotten any of your issues worked out? I would guess:

  1. Blinds are not yet supported since that’s not an available tag at this time.
  2. Can you see the humidity values when you look at items in myopenhab.com? If not, can you provide your item configuration?
  3. If it works on your phone, it’s likely that the new-ish Home Hub doesn’t support it.
1 Like

Is the Google Assistant integration beeing updated to support traits/tags/devices at all?
(maybe @MARZIMA know).

Yes, there is that possibility. But as it turned out afterwards, this can only be done via the Google Home App.

In the Google Home App under Settings → Assistant → Routines, you can also control devices. If you create routines here, there is no voice confirmation or you can create your own confirmation.

Oh well, sigh! :sleepy: - yes, the workaround. I was hoping you’d heard good news on the Google front in addressing this issue.

Routines for my environment, with dozens of devices, would be a maintenance nightmare. I’d have to create a routine for each device and group of devices for each action (on/off/turn up/turn down/etc.). No way to copy/paste/modify routines. And THEN, I have to do it all over in my wife’s account!

Or Google could just add an option. I know, that’s too much to hope for. Of course, now that it’s Google Nest, it’s going to be so much better. Just look at how they are improving the Works with Nest API capability starting September 1. :rage:

Regards.

Mike

Thanks for your answer! Regarding your 3 remarks:
1.) This was a misunderstanding. I thought that someone else had it, but it looks like he created his own OpenHAB cloud. But anyhow, I guess it will be implemented soon.
2.) Yes, I can see the actual value of humility in myopenhab.com
But in Google assistant it always says 0% humidity.
3.) As my Home hub says “Actual mode not supported” the reason for not working is that I didn’t define a mode. I created the item like in the description, but I don’t know how and where to define the mode, as I don’t use any rules. I don’t have a real thermostat, it’s just a Sonoff (Tasmota) switch with two sensors (Temp and Humidity).
Maybe a definition of the mode would also fix the issue with showing 0% humidity

I’m guessing that “mode” is the tag we insert into the item to identify the item to Google. I should have realized that humidity isn’t one of them (same as for your blinds), so it probably won’t work at this time.

No idea why your Home Hub doesn’t show temp when your phone will, but I don’t think it’s an OH issue.

It’s discussed some in the docs. To get the humidity you need to create all the Items necessary for a thermostat, including an Item for the Mode.

See the docs for an example. I use the following Item set for each of my sensors:

Group vBasement_Thermostat "Basement" [ "Thermostat" ]

String vBasement_Mode "Basement Heating Mode [%s]"
    (vBasement_Thermostat)

Number:Temperature vBasement_Temperature  "Basement Temperature [%.0f °F]"
    <temperature> (gChart, gIndoorTemps, gResetExpire, gMaxTemp, vBasement_Thermostat, LowerFloorsTemps)  [ "CurrentTemperature" ]
    { channel="mqtt:topic:basement-sensors:temperature", expire="2m,state=UNDEF" }

Number:Dimensionless vBasement_Humidity     "Basement Humidity [%.0f%%]"
    <humidity> (gChart, gIndoorHumidity, gResetExpire, vBasement_Thermostat) [ "CurrentHumidity" ]
    { channel="mqtt:topic:basement-sensors:humidity", expire="2m,state=UNDEF"}

Switch vBasement_Humidity_Alerted
    (gResetExpire)
    {expire="24h,command=OFF"}

Number:Temperature vBasement_Target_Temp "Basement Target Temp [%.0f °F]"
    <temperature> (vBasement_Temperature) [ "TargetTemperature" ]

I just tested it and it worked.

1 Like

As I also read the docs I created all items. But instead of “Numbers” my values are “Strings”. Maybe that’s the problem (although it works for temperature!?).
Just one additional question: did you declare “vBasement_Mode” somewhere else, maybe in a rule? Or is this string empty?

You only ever define Items in .items files or through PaperUI. Since the above is an extract of text based configs it naturally comes from a .items file.

The example Items in the docs are all Numbers. Usually the types of Items matter, a lot. So I would expect you need to use Number Items as are used in the example. The Mode appears to work OK as a String, but I don’t actually use this Item for anything. It only exists so that Google Assistant doesn’t complain.

Cool, I’ll have to try that. I think I got everything I needed from this thread, so it never occurred to me that there was documentation for GA. :wink:

@All,

the google assistant is now updated and I deployed a new version to support Rollershutter and Open/Close trait. Thanks to https://github.com/pythen for the contribution.

The initial post in this thread is updated with example commands for Rollershutters/Blinds and the needed Tag. Please test it and let me know if there is something unexpected from your side.
It worked in my tests fine (but I dont have a real device).

Regarding new Traits/DeviceTypes: I think it should be no problem to add them.
Currently I want to introduce a CI/CD Pipeline, so the release can be easily done.

Who ever wants to support with development power in the openhab-google-assistant project,
please feel free to join the train. Your help will be appreciated.

Thanks & BR
Mehmet

6 Likes

I’ve tested it, but I have some problems. The command via the Google Assistant returns inverted percentage values.

Here is an example:

If I press the button “Up” in the BasicUI, the value of the shutter changes to 0%.

2019-05-17 12:06:31.051 [ome.event.ItemCommandEvent] - Item 'Somfy_Tuer_Balkon' received command UP
2019-05-17 12:06:31.078 [vent.ItemStateChangedEvent] - Somfy_Tuer_Balkon changed from 100 to 0

However, when I say the command to Google “Roller shutter balcony up” or “Roller shutter balcony open”, the value changes to 100%.

2019-05-17 12:08:11.897 [ome.event.ItemCommandEvent] - Item 'Somfy_Tuer_Balkon' received command 100
2019-05-17 12:08:11.925 [vent.ItemStateChangedEvent] - Somfy_Tuer_Balkon changed from 0 to 100

So it’s the exact reverse.

I think it should be like this:
0% = open/up
100% = closed/down

I’m observing the same behavior - the blinds open on command “close the blinds”.

I have basically the same, and I think it is related to the “Invert control” and/or the “Invert percentage value”.
For the sunscreen in my garden I want the screen to extend when I say open, and then it goes to 100 percent (100 percent open). Therefore I have this one set to invert the control, not the percentage value
There opening and closing via Google home gives the desired value and the desired behaviour.

For the Rollershutters in front of the windows, I want the shutters to open as in that I can see through my window, and then it goes to 0% extended. Therefore I have set this one to invert the percentage, not the control.
Here I however have to say close to open it and open to close it…

So to me it seems that the Google home implementation does not take that into account.