Official Google Assistant Integration for openHAB

Agree. I could need a list of available tags, both those which are suppose to work, and those which needs testing. And a small example as well.
This list should be updated when new tags is supported.

Reading the last few entries in this thread surely confuses me. I have seen “Termostat”, TargetTemperature" and “CurrentTemperature”.
As for my own tets, it seems like Google understand “CurrentTemperature”, but not “TargetTemperature”.

Im getting this too!

==> /var/log/openhab2/openhab.log <==
2018-05-08 08:07:17.349 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:Weather_Rain in ManagedMetadataProviderImpl, because it does not exists.

==> /var/log/openhab2/events.log <==
2018-05-08 08:07:17.364 [ome.event.ItemUpdatedEvent] - Item 'Weather_Rain' has been updated.
2018-05-08 08:07:17.368 [vent.ItemStateChangedEvent] - unifi_client_84655265_uptime changed from 42125 to 42136

==> /var/log/openhab2/openhab.log <==
2018-05-08 08:07:17.369 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key _tags:Weather_Wind_Speed in ManagedMetadataProviderImpl, because it does not exists.

I cant see how this is related to the Google Home stuff, as that is all in the cloud and this error is occuring locally.

All i did to cause this was to add CurrentTemperature tag to an item. I think there is now something broken in the items registry…
Do you have the Imperihome binding installed too? I ask because it also breaks my Imperihome.

2018-05-08 08:19:50.799 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /imperihome/iss/rooms
java.lang.NullPointerException: null
        at java.util.HashSet.<init>(HashSet.java:119) [?:?]
        at org.openhab.io.imperihome.internal.processor.DeviceRegistry.getRooms(DeviceRegistry.java:49) [229:org.openhab.io.imperihome:2.3.0.201804092039]
        at org.openhab.io.imperihome.internal.handler.RoomListHandler.handle(RoomListHandler.java:31) [229:org.openhab.io.imperihome:2.3.0.201804092039]
        at org.openhab.io.imperihome.internal.ImperiHomeApiServlet.service(ImperiHomeApiServlet.java:202) [229:org.openhab.io.imperihome:2.3.0.201804092039]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [31:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.3.21.v20170918]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [77:org.eclipse.jetty.io:9.3.21.v20170918]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [77:org.eclipse.jetty.io:9.3.21.v20170918]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [77:org.eclipse.jetty.io:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [88:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [88:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [88:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [88:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [88:org.eclipse.jetty.util:9.3.21.v20170918]
        at java.lang.Thread.run(Thread.java:748) [?:?]


I can confirm that the tag CurrentTemperature is sufficient to get the temperature through Google Home.
Unfortunately I can confirm that the temperatures are rounded by Google to 0,5 °C.
Sometimes I get a response about the thermostat mode in the room rather than the temperature in the room.

no i don’t have the imperihome binding

Hi

There must be another location that the JSON data is stored and being referenced because…

I just deleted the entire contents of the jsondb folder and restarted OpenHab2.
Within seconds all the files were back in the jsondb folder, exactly as they were before I deleted them.
Still without the extra wall light dimmer, which is working perfectly in HabPanel.

Okay, not sure what happened here…

I’ve repeated the process and now I have new JSON files…
Which means I’ve effectively purged my system.

I’m going to try and drop the text for the new dimmer (from the new JSON file) into the backed up JSON file and restart with the edited old file/s in place.

That is because OH has an automated backup and restore feature. If the files don’t exist, it recovers the most most recent backup.

Are you certain there is an Item linked to a Channel on this Thing? If not there won’t be an entry in the Item DB file.

You moved past your collection of backups and now have a fresh DB with nothing in it.

I`m facing the same problem, all my itens that did work before, but that also use ImperiHome, are now gone. Did you found a workaround for it?

Thanks

@MARZIMA

I have this in my items configuration.

When i ask google “what is the temperature in the bedroom?” the response is “heating is set to 20, with a current temperature of 24”

When i say “set temperature to 19 degrees in the bedroom” the answer is “sure, setting the bedroom thermostat to 19 degrees”

When i say “set the heating to 21” the response is “sorry, i couldn’t reach openHAB”
What tag is google trying to change here?

Did you try “Set the heating to 21 in the bedroom”?

1 Like

Yes of course.
I think google is trying to set a mode on a tag that not exist. I dont have a mode on my thermostat.
I wil try to add a item for the mode function.

Google is QUITE specific about temperature, you need at least items for:

  • Mode
  • Setpoint / Target Temperature
  • Current Temperature / Ambient Temperature

(See the HomeKit addon page for further info on item setup, grouping, and tag usage).

I made my own “thermostat” with a temperature sensor and a dry contact so I had to have a Mode item for Google to properly provide temperature details.

There are also variables for high and low range, but there does not exist the HomeKit tag convention yet to support.

for now i use this:

Group gDownstairsThermostat "Downstairs Thermostat" (gFF) [ "Thermostat" ]
Number DownstairsThermostatCurrentTemp "Downstairs Thermostat Current Temperature" (gDownstairsThermostat) [ "CurrentTemperature" ]
Number DownstairsThermostatTargetTemperature "Downstairs Thermostat Target Temperature" (gDownstairsThermostat) [ "TargetTemperature" ]
String DownstairsThermostatHeatingCoolingMode "Downstairs Thermostat Heating/Cooling Mode" (gDownstairsThermostat) [ "homekit:HeatingCoolingMode" ]

but stil the same problem.
i can’t set the mode with google assistant

When i say “set the heating to 21” the response is “sorry, i couldn’t reach openHAB”

From Google I/O 2018 - a new Video " Integrate your smarthome with the Google Assistant"

Openhab gets referenced at about 30:44 :+1: @MARZIMA - Nice one!

This video is worth watching to see whats coming. New traits/device types…and notifications!

7 Likes

Did anyone solve the color bulbs problem? Do we need to add them as two devices to Google Home so we can switch them on/off and change color?

I’m having the same problem with items set up like that. Seems right, from what I’ve read, but I’m not very experienced with this. Just problems with the mode. It doesn’t seem like Google Home is using the item tagged with [“homekit:HeatingCoolingMode”]. Can’t reach openHAB when I try to set the thermostat mode, and Google always tells me it’s off, even when it’s set to HEAT or AUTO.

I can read the current temperature, and set the target temperature. Just not the mode.

Can someone please post a working example of items for a thermostat?

Thanks!!

1 Like

This works for me.
@aart, @skimdankish , @Nick_of_408

There in no mode tags for openHAB yet
If you have 2 tags in the item, it will not work for google home
And google home will not read homekit tags

I put 2 items Bedroom_TargetTemp and Bedroom_CurrentTemp in a group called gBedroom_Thermostat

And the items are:

Group gBedroom_Thermostat “Bedroom Thermostat” [ “Thermostat” ]
Number Bedroom_TargetTemp (gBedroom_Thermostat) [ “TargetTemperature” ]
Number Bedroom_CurrentTemp (gBedroom_Thermostat) [ “CurrentTemperature” ]

And this should show only one new device in Google Assistant called “Bedroom Thermostat”

5 Likes

Thanks! Sounds like it’s working the way it’s supposed to for me then. I removed that mode tag.

Hi is there a fix being worked on for the multiple tag issue i use imperihome addon, the workaround i use now is just sync the devices with google then add the additional tags, but if i resync i lose google assistant control after.

2 Likes

I am waiting for those notifications in anticipation. Will be awesome to have that for various uses.
Very exciting stuff!

1 Like

For anyone that had the “Sorry I am unable to process your request” issue due to previous IFTTT linkages, it looks like it might finally be fixed. Mine started responding to “turn on/off” commands a few days ago, and just had a reply on my support case confirming that they’ve fixed a number of ‘minor glitches’ including the IFTTT one that I had. So if you were affected too - give it a shot now. ;p