Official Google Assistant Integration for openHAB

Are you sure there is only one item with a tag? Google home did the exact same thing repeatedly for me until I removed all item tags but I had accidentally left one item with a switchable tag and when going through Google Home to add Openhab device yet again it finally went through the process and asked me to put the newly found item in a room.

1 Like

My Google Home is configured to German. Can I just use the Openhab Action with English commands or do I need to change the setting of my Google Home to English?

@rsopp That sounds interesting. What command do you say on a Google Home / Assistant configured in German to turn on/off a light or switch?

Hey ! Someone try GoogleAssistant with Milight ?

This is what I got so far :

I setup the google assistant for the Color item then ask many thing (turn off light, turn on light turn light blue, set the light to 10% turn the light White )

the only thing that worked is turn the light on …

This is quite simple: “Schalte die im Wohzimmer an”, “Licht aus” switches off all configured lights.

Sorry I commented in other thread…

Hi folks,
I will asap tackle the tag issue.
There are some PRs, I have to review first.
But will be fixed really soon. New features on its way too.
Will soon push an update and let you all know.

BR Mehmet

9 Likes

That are good news. Openhab is great.
As a newbie who has successful integrate his KNX-Bus home, I have some questions:

What is meant by tagging? for homekit.
Do I need additionally to my definitions of items in the knx.items file items in a homekit?
What is withe names. Do I need to change my items?
Her is an example what I have now in my items file:

Switch Licht_Arbeitszimmer “Lampe Arbeitszimmer” (gF_Licht,gR_AZ) { knx="<2/0/2" }

Switch Steckdose_Arbeitszimmer “Steckdose Arbeitszimmer” (gF_Steckdose,gR_AZ) { knx=“3/0/2” }

What do I have to do to make it conform with google home?
Than you in advance
bernd

@BLg , you just have to add a Lighting tag to your items file, like so:

Switch Licht_Arbeitszimmer “Lampe Arbeitszimmer” (gF_Licht,gR_AZ) [ "Lighting" ] { knx="<2/0/2" }

Make sure the tag is before the {} brackets - i.e. remember [] before {}…

Then, just link the action from your Google Home application on your phone, and the light will show up. The name “Lampe Arbeitszimmer” is what you’ll see in the Google Home app, so make it unique and easy to say!

1 Like

Thank you your quick reply.
But there is a problem:
After I add the tag before …knx the sitemap does not work any more .
May be the syntax is not OK because of the {} after the [ “Lighting” ] ?
bernd

No, the syntax in the item description is OK, but can you post your sitemap entry?

Also, is this a light you’re controlling, or a switch? If a switch (ON/OFF type), you should use a [ “Switchable” ] tag instead of Lighting.

Perfect job !!!
I have juste one question :
When i want to add one item of my openhab in google assistant, i have to connect my openahbcloud account.
After that, we can check items we want to control through GA.
But, if i want to add a new item in GA, i have to disconnect my openhabcloud account (so all my items will be lost) an reconnect my openhabcloud to see the new items…
…Sorry for my english guys !

Thanks a lot if you have any solution

Hey just say “sync my devices” to GA and it will do the job :wink:

I can’t do this in french, when i try “synchroniser mes lumières/appareils” all my lights turn on ! :roll_eyes:

It works !
The problem was very curious: I have copied the term [ “Lightning” ] from this forum into items: that did not work.
But when I wrote it by hand - it works.
There seemed hidden any character in the forum [ “Lighting” ] .
Thank you for your help

Bernd

In French, you have to say : “synchroniser tous mes appareils” :slight_smile:

2 Likes

Hmm very strange! But I’m glad it works!

I think there are opening and closing quotes in the text you copied.
But you need straight quotes.

https://practicaltypography.com/straight-and-curly-quotes.html

I opened up a Github issue for this, but wanted to post it here for discussion, as well:

When attempting to explain the difference between Switchable and Lighting tags recently, I read in the documentation that “Switchable” tags allow percentage settings, similar to the Lighting tag. To me, this is redundant and counter-intuitive, as “Switchable” (stemming from the word “Switch”) should pertain to items that are discrete, not analog. I.e. there can be multiple switch positions, but as soon as you start discussing percentage/position in terms of home automation, we enter the realm of dimmers and volume knobs.

Perhaps a more intuitive solution would be to add a third tag: [ “Dimmable” ], which would allow analog settings, while the [ “Switchable” ] tag would only pertain to ON/OFF (or Selection type) items?

This would then be aligned to the items definition, where Switch is a discrete ON/OFF while Dimmer is analog.

Well, I’ll be …! I never actually noticed this until you mentioned it, but sure enough, in my post to @BLg, the [ “Lighting” ] outside the code fence has opening/closing quotes, but straight inside…If he (or anyone else) copied/pasted that into their code, they’d have problems…fixing it now so it doesn’t cause problems for anyone else…

That’s really good to know, thanks!

EDIT: Welp, it appears that even if I write it using straight quotes into the post edit window, it gets converted to opening/closing once the post is saved…so, the only proper way to do this is to use code fences every time…

I think openhab needs to have more “itemtype” I think all the google home "Smart home Traits"
should be added. Can you think of any more Items that need their own names so google doesn’t say “turning your bedroom fan brightness to 20%” I am sure google will add more but its a bit of a chicken and egg scenario.

I posted the question on the google forms too – link