Google Home - Actions (API) now available!

I appreciate you don’t want any more beta testers but will the code still be available to those of us who didn’t get in on the first call? I’ve just ordered a Home mini and won’t receive it for a couple of weeks yet

Dont worry…we will add ppl later on.
Maybe you will catch the official Action and no need for beta.

BR Mehmet

@MARZIMA

If you don’t mind me asking before things are finalised…

How will the end product be configured and function? I took a quick look at the readme that you are drafting and it seems quite involved; needing to have a developers’ account configured etc. Will the end product be as simple as a new “Home Control” service within Google’s Home app authenticated via oAuth2 to the Openhab cloud adaptor, or is the current readme process the one all users will have to go through? The current implementation also seems to need a new incoming connection into your personal OH2 instance - or am I misunderstanding this? Thanks for all the hard work thus far, it is really appreciated!!

Out of interest, will the binding allow for the google home to be used as an audio sync?

Would be awesome to have a few around the house and use them as Door Bell speakers, or “Garage Door Left Open” announcements instead of tying up the sonos.

You can already do this with the Chromecast binding. I do this very thing for my garage door.

Just wait guys!!!

Can we have at least feedback from the beta testers ? It is a lttle frustating to have no information.

I will receive my Google Home Mini in few days. Will it wok with this new device too ?

Actually there are no beta tests…read a few posts above that @MARZIMA is handling some issues at the moment.

MARZIMA
Update: We are trying to get Google Cloud account of openHAB with payment verification managed.
In the meantime I will write some documentation.
Looking forward to test soon with you!

1 Like

Hi all,

I am happy to tell you we can make the first smaller Beta Test with those who ve been added to the google group.
We had a lot of Google Cloud Account verification trouble. It is still not completely fixed, but my last mail maybe helped a little bit since we were totally blocked. Thanks to @hmerk for helping with the account verification. Google is still on it and I think the just enable a toggle at Firebase to let us continue (that was what I saw in the mails).

Please follow these steps to participate at the Beta Test. Keep in mind there could be problems and issues and that if some damage or loss of value could happen, the openhab foundation will be not liable and responsible for that :slight_smile: I hope that there are no big issues for the first steps.

-> Please take a look at the Limitations & Known Issues!

  1. Tag your Items accordingly Item Tag configuration

  2. Activate the testing toggle at Actions on Google by following this link:
    https://console.actions.google.com/project/openhab-7242a/simulatorcreate
    IMPORTANT:
    You MUST follow the link to the Actions Simulator landing page, toggle the Test Status to ACTIVE and click START.

  3. Please follow my guide at the github repository about how to setup & link your openHAB/myopenhab.org/GoogleHome within the Google companion App:
    Testing & Usage on Google App
    I ve added some screenshots to support your setup process. The red spots show where you ve to focus on. I hope it is helpful.

  4. Test it, Report problems & Have Fun :slight_smile:

Let me know if something goes extremely wrong or doesnt run at all.
Please be aware that I cant do 100% fulltime support, since I ve soooooo many things to do. But I will do always my best to support you guys as much as possible.

Let me know if the access to the actions console works and also if the openHAB action is visible in the Google App, since there Google had many problems.

BR Mehmet

5 Likes

Hey @MARZIMA thank you for detailed documentation and your hard work. Much appreciated!

I have trouble with following this step.
This is the message I see when I visit that URL:
goog

Hi,

have you been invited to the beta test group? It is only accessable if you are part of that google group.

1 Like

Oops! Sorry, didn’t catch that :smile: Nevermind then!
Cheers

Cool, it works!

Only issue I have so far is that all my items tagged with “Lighting” are recognized as a switch, but not as lamps.

2 Likes

Hi @MARZIMA ,

did a very first test and it with the help of your description setup was easy and it simply works :-). Thank you for your efforts to get this going.
I can post tomorrow some screenshots from a german version of the Google Home app, maybe this will help some german users.

Have a nice weekend.
Martin

1 Like

Hi @MARZIMA,

after I have completed the configuration for a first item, I added a new item the items file. This item did not appear automatically in the Google Home App. In order to configure it, I had the remove the openHAB account and add it again. Then everything worked fine.
Maybe you can add a hint to the documentation about this behaviour.

Regards
Martin

2 Likes

That should be an easy one to change. I will check that soon.

1 Like

Hi @MHerbst,

thanks for your feedback. Google just newly added this functionality. It was not there a week ago. I need to check how to squeeze that in. Shouldnt be a big thing. But not this weekend :slight_smile: …I need a small pause.

You can check it in my other post.

OK - i have it working.
I did encounter an issue when after linking my account in the Googl Home app to 'test Open hab" - it returned with
"couldn’t update setting. please check your connection"

I could see in the console log ( below ) that the SYNC had fetched my items ok, but even trying many times, i could not the the google app to show my devices…
I wondered if it was timing out or something? I then tried removing some tags from some items especially the not currently supported ones “Thermostat” and “CurrentTemperature” - This seemed to work.

Is anyone willing to see if adding these tags breaks your instance too? ( after reverting you can get it working again )

gcloud beta functions logs read openhabGoogleAssistant
LEVEL  NAME                    EXECUTION_ID  TIME_UTC                 LOG
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: TempSensor_RoofTemp with tag: CurrentTemperature
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: KitchenLightsStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: CanonTemp with tag: CurrentTemperature
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: DrivewayLightStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: TVLightStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: Weather_Temperature with tag: CurrentTemperature
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: Entertaining with tag: Switchable
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: DownlightsStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: Sonoff2 with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: TallLightStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: AeonPlug_BarFridge with tag: Switchable
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: TempSensor_Heidi with tag: CurrentTemperature
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: ChandelierLoadLevelStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: IslandBenchStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: GarageDoorMQTT with tag: Switchable
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: TempSensor_Hugo with tag: CurrentTemperature
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: BedTimeScene with tag: Switchable
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.445  openhabGoogleAssistant - syncAndDiscoverDevices - SYNC is adding: DeckWallLightsStatus with tag: Lighting
I      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.446  openhabGoogleAssistant - SYNC result: {"requestId":"8399073844798287271","payload":{"devices":[{"id":"Daikin_outtemp","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Daikin Out Temp"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number","itemTag":"CurrentTemperature","openhabVersion":"2.1"}},{"id":"Daikin_roomtemp","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Daikin Room Temp"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number","itemTag":"CurrentTemperature","openhabVersion":"2.1"}},{"id":"DeckPendantsLoadLevelStatus","type":["action.devices.types.SWITCH"],"traits":["action.devices.traits.Brightness","action.devices.traits.OnOff"],"name":{"name":"Deck Pendant"},"willReportState":true,"attributes":{},"deviceInfo":{"manufacturer":"openHAB","model":"Lighting","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Dimmer","itemTag":"Lighting","openhabVersion":"2.1"}},{"id":"FloorLightStatus","type":["action.devices.types.SWITCH"],"traits":["action.devices.traits.OnOff"],"name":{"name":"Dining Room Lamp"},"willReportState":true,"attributes":{},"deviceInfo":{"manufacturer":"openHAB","model":"Lighting","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Switch","itemTag":"Lighting","openhabVersion":"2.1"}},{"id":"TempSensor_PoolWater","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Pool Temp"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number","itemTag":"CurrentTemperature","openhabVersion":"2.1"}},{"id":"TempSensor_LivingRm","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Living Room Temperature"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number","itemTag":"CurrentTemperature","openhabVersion":"2.1"}},{"id":"FamilyRoomLoadLevelStatus","type":["action.devices.types.SWITCH"],"traits":["action.devices.traits.Brightness","action.devices.traits.OnOff"],"name":{"name":"Family Room Downlights"},"willReportState":true,"attributes":{},"deviceInfo":{"manufacturer":"openHAB","model":"Lighting","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Dimmer","itemTag":"Lighting","openhabVersion":"2.1"}},{"id":"AeonModule_OfficeLight","type":["action.devices.types.SWITCH"],"traits":["action.devices.traits.OnOff"],"name":{"name":"Office Downlights"},"willReportState":true,"attributes":{},"deviceInfo":{"manufacturer":"openHAB","model":"Lighting","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Switch","itemTag":"Lighting","openhabVersion":"2.1"}},{"id":"DeckSpotsStatus","type":["action.devices.types.SWITCH"],"traits":["action.devices.traits.OnOff"],"name":{"name":"Deck Spot Lights"},"willReportState":true,"attributes":{},"deviceInfo":{"manufacturer":"openHAB","model":"Lighting","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Switch","itemTag":"Lighting","openhabVersion":"2.1"}},{"id":"TempSensor_Bianca","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Bianca Room Temp"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number","itemTag":"CurrentTemperature","openhabVersion":"2.1"}},{"id":"WallLightsStatus","type":["action.devices.types.SWITCH"],"traits":["action.devices.traits.OnOff"],"name":{"name":"Wall Lights"},"willReportState":true,"attributes":{},"deviceInfo":{"manufacturer":"openHAB","model":"Lighting","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Switch","itemTag":"Lighting","openhabVersion":"2.1"}},{"id":"TempSensor_KidsBath","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Kids Bathroom Temperature"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number","itemTag":"CurrentTemperature","openhabVersion":"2.1"}},{"id":"TempSensor_MasterBed","type":[],"traits":["action.devices.traits.TemperatureSetting"],"name":{"name":"Master Bedroom Temp"},"willReportState":true,"attributes":{"thermostatTemperatureUnit":"C"},"deviceInfo":{"manufacturer":"openHAB","model":"CurrentTemperature","hwVersion":"2.1","swVersion":"2.1"},"customData":{"itemType":"Number
D      openhabGoogleAssistant  tfs39pl1quss  2017-10-14 00:49:54.447  Function execution took 4361 ms, finished with status code: 200

Second issue, which im sure @MARZIMA knows about, is that dimming doesnt seem to be implemented:

Hey Google , set the chandelier to 10%

results in…<10 seconds of thinking about it…> “Im sorry - there was an error and im unable to control your home device”

heres the log:

  openhabGoogleAssistant  tievpj0f9nkv  2017-10-14 01:50:56.588  openhabGoogleAssistant: Cloud function called:{"inputs":[{"intent":"action.devices.QUERY","payload":{"devices":[{"customData":{"itemTag":"Lighting","itemType":"Dimmer","openhabVersion":"2.1"},"id":"ChandelierLoadLevelStatus"}]}}],"requestId":"7912444354068429392"}
E      openhabGoogleAssistant  tievpj0f9nkv  2017-10-14 01:50:56.602  TypeError: Cannot read property 'length' of undefined
                                                                          at Object.exports.handleQueryAndExecute (/user_code/openhab.js:52:37)
                                                                          at exports.openhabGoogleAssistant (/user_code/index.js:40:12)
                                                                          at /var/tmp/worker/worker.js:635:7
                                                                          at /var/tmp/worker/worker.js:619:9
                                                                          at _combinedTickCallback (internal/process/next_tick.js:73:7)
                                                                          at process._tickDomainCallback (internal/process/next_tick.js:128:9)
D      openhabGoogleAssistant  tievpj0f9nkv  2017-10-14 01:50:56.617  Function execution took 472 ms, finished with status: 'crash'