[SOLVED] Integrating openhab and google assistant

Following this tutorial I can’t understand the modify functions\config.js part , where exactly is this file?? I’m new to this and I’m using a ubuntu 16.4 system .

Till now I have finished installing google cloud and g actions.

You shouldn’t use these instructions.

Follow:

That’s what i tried first.
Initially I opened home control on my google assistant app and in add devices searched for openhab and i clicked on it , the app displays your accounts have been linked successfully but then it does not display the openhab as a device it just displays you haven’t added any device.

I have attched the screenshot from the tutorial as well as the scrennshots of when I did the same thing that as in the tutorial.

have you added tags to your items?
did you setup your myopenhab.org account and exposed items to it?

How and where exactly do i tag items?

I have created a basic ui with switchable light but that’s not how I do it?
i have attched a screenshot of my dashboard I haven’t aded any items.

Are you using PaperUI or *.items files to define/create your items?

Basic UI
I have attached the screenshot of how my basic UI looks and also the code in items.

BasicUI is used to parse and display *.sitemap files (not *.items). Of course, within your sitemap, you refer to items.

Try Switchable (instead of switchable)… maybe? this is the problem.

You can copy paste the code here with Code Fences (to avoid using screenshots)

Switch Light "light" <slider> [ "Switchable" ]

Alright.

So should I write this in sitemaps or items??

within your ~/Desktop/OpenHAB/conf/items/a.items file

Thank you. Works fine now
When I say turn on light it is reflected in openhab as well.

Just one last doubt how can I integrate my oppenhab with another device(like arduino) which would be connected to my light. Should I use mqtt broker to interface openhab with a micro-controller device??

1 Like

Yes!

MQTT rulez

1 Like

This is out of scope for the openHAB Community :slight_smile:
I would try the https://forums.mbed.com/ (or google some samples)

1 Like

Is anyone working on Google Assistance with local instances of OpenHab Cloud?

I want to move to a Voice automated setup but use my on premise Openhabcloud. Im not fond on relying on things external to my home.

Or, does Alexa work with OpenHab Cloud local instance? Thank you

I believe that very few people have it implemented like this. Most use myopenhab.org and the existing integration to Google Assistant.

Even if you manage to deploy like this, you will still depend on Google Cloud Functions
I believe that the same is true for Alexa (uses external cloud services)

Hello Dim,

  • I have added items via paper ui (added by auto discovery)

  • My Items are exposed and myopenhab.org is online and fully working

But when i add, it gets paired successfully but device does not show up in my devices (Similar to mmj6 Jun 11 post) section of google assistant.

I am using android 8 on Samsung Galaxy C7 (C7000)

You need 2 stuff on top of exposing your Items to myopenhab.org: Labels & Tags for your Items

To add Labels = it’s easy you can use PaperUI (edit the Items)
To add Tags = unfortunately, PaperUI doesn’t support this yet. You will need to use either REST API and/or the console

By the way, troubleshooting is better under a new thread, not within an older thread :slight_smile:

I am not new to IOT Field, but I am new to openhab. Where to add labels, I can see the following screen on edit.

. More over can you suggest some guide for adding tags via REST API / Console?

To edit your Items within PaperUI you need to:
PaperUI->Configuration->System->Item Linking->Turn off “Simple Mode”
You will be then presented with a new menu on the left side (just below the one that you have selected now (Things).

You can then edit the Items and add Labels

For Tags & REST API, see here a short guide: Official Alexa Smart Home Skill for openHAB 2

Check out also: HowTo: Listen & Talk to your Home

If you are an advanced user, you may want to consider using flat text config files for your *.items

Thank you Dim for your prompt replies. I’ll try your suggestions, I am an advanced user and write blog (definitely, I’ll write a complete post on it after figuring it out). I have a quick question. When items are added via Paper UI, there is no clues under etc\openhab2\items. Where do they get stored? is there any database? if so, where can i find it?