Official Google Assistant Integration for openHAB

Same here…

often happens here as well. “cant reach openhab” or “unable to find X things” I have read a few posts about this but found no answers.

Same behavior for a few days now. At the first try it often doesn’t work: “OpenHab is not reachable.” The second time it works. I couldn’t find a solution yet.

Same for me as well.

same here

Same here.
A workaround is to create an IFTTT applet for the action you want to execute with a Google Assistant simple phrase trigger, and then create a Google Assistant routine that has as action the phrase you used as trigger in the IFTTT applet.
Regards.

Hello, how you can solve the problem of adjusting the position of blinds by marking in the items :
Switch Light_GF_Gabinet_Sufit1 “Gabinet Sufit” (GF_Gabinet, Lights) [ “Lighting” ]
Dimmer Roleta_sGabinet “Roleta Gabinet [%d %%]” (GF_Gabinet, Roleta)
because when I say turn off the lights, the blind is going to 0% should not split after nawazch Roller?
Is it possible to use google mini to send OpenHab text to him and google pronounced it as in broadcast?

You can use IFTT but when it comes to doors and security I prefer not to have that capability in the cloud.

1 Like

Google Assistant API updated!
Shutters are supported now.
https://developers.google.com/actions/smarthome/guides/
Can this be added to openhab? :slight_smile:

3 Likes

Hi I just read this post. I’m having the same problem. At first my google home was telling me that openhab is not available. I checked and noticed that everything, including myopenhab, is online. Then I went on deleting the openhab connection in my google home setup, and re-adding it again. After I succesfully logon to myopenhab and relink it with oauth2 I get a message telling me that there was a problem. What am I doing wrong??

Nevermind, after restarting the openhab server i was able to reconnect it again.

@MARZIMA
Hi Mehmet…
Do you, (or anyone else) have any idea, if Google has made any changes today (or yesterday)…
I have a highly strange issue with Google responding with “Okay turning on 2 lamps” when I ask her to turn on a lamp… The lamp turns on, but it´s only one item. Yet Goggle resond with “2 lamps”.
And I cant seem to figure how the heck Google gets to the count of 2 lamps, when it´s only one.
Looking at Google Home app, there is only one device/lamp as well…
Google also respond with “turning off 2 lamps” when asking to turn the lamp of.

This happens to all my IHC items (IHC 2.5 binding). But not my modbus (openhab connected) or Philips Hue (google Home connected) devices.

I used the weekend to convert from the old IHC binding to this new 2.5 (not yet release).
I made several testing during the convertion of the bindings, after change of each item, making sure it worked. When I got home from work today, I noticed this strange issue in the Google respons.

Using REST Api to show items with the “Lighting” tag, this is what it shows:

[
{"link":"https://home.myopenhab.org:443/rest/items/bryggers_DimmerLys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"bryggers_DimmerLys","label":"Bryggers Halogenlys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/bryggers_Skablys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"bryggers_Skablys","label":"Bryggers Skablys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/lille_bad_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"lille_bad_OEV","label":"Lille Bad Lys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/spise_halo_styrke","state":"0","stateDescription":{"pattern":"%s %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"spise_halo_styrke","label":"Spotlys ved spiseplads","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/kontor","state":"ON","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"kontor","label":"Loftlys i kontoret","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/koekken_underskablys_niv","state":"0","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"koekken_underskablys_niv","label":"Lyset under køkkenskabe","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/amanda_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"amanda_OEV","label":"Lampeudtag i Amandas værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/amanda_OEH","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"amanda_OEH","label":"Spotlys i Amandas værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/sove_lampeudtaglys","state":"OFF","stateDescription":{"readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"sove_lampeudtaglys","label":"Lampeudtag i soveværelset","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/garage_lys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"garage_lys","label":"Garage Loftlys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/garage_ydoer","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"garage_ydoer","label":"Garage lys konstant","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitetUBeboet","state":"ON","stateDescription":{"pattern":"","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"aktivitetUBeboet","label":"Ubeboet tilstand","category":"cu_switch","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/spise_bord_niv","state":"0","stateDescription":{"pattern":"%s %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"spise_bord_niv","label":"Lyset over spisebord","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/stue_sov_OEH","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"stue_sov_OEH","label":"Stue M2","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/lys_haven","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"lys_haven","label":"Lyset i haven","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/marc_OEH","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"marc_OEH","label":"Spotlys i Marcs værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/marc_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"marc_OEV","label":"Lampeudtag i Marcs værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/stue_sov_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"stue_sov_OEV","label":"Stue M1","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/sove_halogenlys_niv","state":"0","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"sove_halogenlys_niv","label":"Spotlys i soveværelset","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/casperDimmerLys","state":"ON","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"casperDimmerLys","label":"Loftlys i Caspers værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/stort_badDimmerLys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"stort_badDimmerLys","label":"Halogenlys i StortBad","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitetLysKonstant","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"aktivitetLysKonstant","label":"Konstantlys i aktivitetrum","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitet_halo_styrke","state":"0","stateDescription":{"pattern":"%s %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"aktivitet_halo_styrke","label":"Spotlys i aktivitetrum","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/koekken_vasklys_niv","state":"30","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"koekken_vasklys_niv","label":"Lyset ved køkkenvask","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitetBeboet","state":"OFF","stateDescription":{"pattern":"","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"aktivitetBeboet","label":"Beboet tilstand","category":"cu_switch","tags":["Lighting"],"groupNames":[]}
]

I have syncronized devices about a zillion times by now…

One thing though…
Last night when I was almost done with the changes… I made a typo mistake in one of the tagged items. I forgot a “[” in an item. This resulted in all devices dissapeared from the Google Home app.
When I corrected the typo error and made a syncronized, they all came back, but they didnt belong to any “home” or “room” anymore. So I had to replace them all back into their belonging “home” and “rooms”.

I wonder if this could have made the issue I´m discovering… It was pretty late when the typo mistake happened, so I cant remember if I did any testing afterwards. I believe I did, but I´m not sure…

If this is the cause if the issue I´m discovering now… How the heck do I fix it then?
I have tried restarting openhab, as well as clearing cache and tmp, and then restarting. It didn´t help…

All help highly appreciated!!

Btw… This is what happens in the tail log, when I ask google to turn on a specific light… Notice the ON twice…

2019-03-18 22:36:29.668 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command ON
2019-03-18 22:36:29.967 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command ON
2019-03-18 22:36:30.472 [vent.ItemStateChangedEvent] - casperDimmerLys changed from OFF to ON

And this happens when I ask google to turn OFF the specific lamp… Notice the OFF twice:

2019-03-18 23:28:57.115 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command OFF
2019-03-18 23:28:57.283 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command OFF

Perhaps it´s related.

I’m getting the same issue with ‘two devices switched on’. I believe Google is making some under-the-hood changes, so it will likely revert back to normal soon.

https://9to5google.com/2019/03/13/google-assistant-smart-blinds-support/

I really appreciate your reply, Roger…
But I cant help wondering how come this only affect my IHC items…

I just tagged one of my netamo devices which havn´t been tagged for Google before… And it worked fine. I tagged one of the outdoor temperature sensors, and when asking for the temperature, Google replied just one time.
Afterwards I asked for the temperature for one of my tagged IHC items. Then google responded twice, (telling me the temperature twice) :face_with_symbols_over_mouth:

I´m positive there is something ackward with my IHC items and/or google/openhab somewhere.
I think I´ll try disable the Google assistant link and the enable it again to see what happens… Unfortunatly I bet I have to start all over placing all devices into their rooms again :frowning:

I got it fixed…

I removed the Google Assistant link and added it again. Google found all my devices, but I had to replace them into their rooms again. After that, google respons are fine again…

EDIT!!
ARRGRH damit… now I´m having the issue again WTF!!

I think I have found the reason…

This surely got to be due to a change in openhab somewhere… Probably the update from last night @digitaldan announced…

Why?

Untill a few minutes ago I had no problems with my proxyitems which is used to control my ventilation system. These proxyitems are in their own item file.

I made a small change to one of the items where I used a “underscore” in the item name, cause all my IHC items have an “underscore” in their item name. (I thought that might be the reason for the issue).
After this change, suddenly all my proxyitems in this specific items file are having the same issue… I only made a change to one of the five items. And now all five is having the issue.
This is the edited items:

// Ventilation
Switch   nilan_Vent0   	"Ventilation trin 0 [%s]" 		<switch> 	 	[ "Switchable" ]	{ expire="1s,command=OFF"}
Switch   nilanVent1   	"Ventilation trin 1 [%s]" 		<switch> 	 	[ "Switchable" ]	{ expire="1s,command=OFF"}
Switch   nilanVent2   	"Ventilation trin 2 [%s]" 		<switch> 		[ "Switchable" ]	{ expire="1s,command=OFF"}
Switch   nilanVent3   	"Ventilation trin 3 [%s]" 		<switch> 	 	[ "Switchable" ]	{ expire="1s,command=OFF"}
Switch   nilanVent4   	"Ventilation trin 4 [%s]" 		<switch> 	 	[ "Switchable" ]	{ expire="1s,command=OFF"}

(Notice the first one with the “_”. Thats the change I made. Now all five items is having the same issue, even though I changed the edited item back to its original).

So…
It seems like, if I edit an item file having items which are already tagged for Google Assistant, then all items inside this specific file will be affected.
This is why all my IHC items suddenly had the issue again, after I´d remove the openhab link to Google Assistant and added it again. Cause all my IHC items are in a single file, and I made an change to one item in the file… And then… Bam!! all IHC items are having the issue again :frowning:
This also explain why my change to the Netamo temperature sensor did not get this issue, cause it had never been tagged before. I´ll bet if I make any change to this item file having my Netamo items, this new tagged item will be affected as well.

I´m almost 100% possitive, this issue started last night, and probably with the update Dan made, which I believe is related to the Google Home voice respons.
So please Dan, @digitaldan, could you check again to see, if this isn´t suppose to be related anyway?

“Fun” update… :face_with_raised_eyebrow:
Right now, when I tell Google to turn on “Ventilation trin 0”, then Google respond with, “Okay, turning on four devices”…
If I tell Google to turn on “Ventilation trin 1”, then Google respond with, “Okay turning on two devices”.

So now I have “four devices” and “two devices”… I guess I´m done editing any items today, otherweise I´ll end up with “several devices” in respons from Google :grin:

Hi Kim , as I already mentioned the changes were focused mainly around android messaging and have nothing to do with google home . My openHAB does not have a concept of google home at all, outside the account linking using OAuth . it simpliy acts as a blind proxy for http request between the outside world ( google) and your home system via the REST apis and does not know anything about what is being proxied, nor does it care. I don’t know why your google home has duplicate items , but it is not very likely any code change in my openHAB have caused this .

I hear you, Dan… It´s just a strange coincidence. Something has certainly changed and just at the same time you made the update… I agree, the update shouldn´t have had anything to do with it. But noone else has announced any changes, as far as I know… So my concern for the update was rather a frustration than a good idea… Sorry!
As for now, I just have to assume, it´s a Google issue… A weird one… (I have not checked if it´s the same issue today).

I sure wish there would be some way to troubble-shoot things like these, as it would prevent people doing changes to their system, without any need. But as long as the Google Assistant uses the cloud, I doubt this is gona change…

Problem seem to be gone now… Guess it was Google acting up somehow.
Still wish there was a way to troubble-shoot issues like this.

Hello @Kim_Andersen

changes in OHC were only around Notifications as @digitaldan mentioned.
Your issue was really complex and I keep in mind that the oh-google-assistant cloud function is the right place around „logic changes“.
BUT: If there is any tagging problem or config error this my lead you into many debugging sessions. So I would always verify that all items are setup, Unlink OH in GA app and last resport might be OHC.

Sometimes there are also timeouts with the Sync between GA and OHC. So relinking helps often.

There is a way to trouble shoot this, as we e.g. can check the logs about your items.