Google home & reading temperature

I "tagged"my things in Google Home in order to control them by voicecommand. This works fine. I tagged a temperaturesensor and it shows up nicely in Ohab-app en in Habpanel giving me the livingroom temperature but it doesn’t show up in Googlehome. i used [CurrentTemperature] as a tag and just [temperature] but both won’t work. Is it allways neccesarry to make a Thermostat Group? Although i only want to know the temp and not for adjusting? I only want to ask google what the temp in the living room is.

Yes, with the latest changes to the integration (a few weeks old), you have to create a thermostat always.

There’s a section in the docs that specifies the three mandatory items you need in the group for a thermostat to work.

The mode and setpoint items don’t have to be attached to any channels. They just need to exist in OH so that Google sees them.

If you have any OH-controlled heating/cooling devices, you can put together a simple, rule-based thermostat that will turn them on/off based on the mode, setpoint, and room temperature. I just finished doing that and creating a HabPanel UI that I display on an old phone mounted on my wall.

Thanks for the tip, but i can’t quite get it to work somehow…. i’m pretty new with that stuff… :grinning:
Can you give me an example how you set it up? or what you mean with a rule based thermostat, maybe you can share me what you did exactly for your phone?

Let’s start by getting your thermometer working in Google Assistant.

You mentioned using “tags” earlier, but over the past two weeks we’ve switched to using “metadata” to connect items to GA. Tags still work, but since you’re just getting started in openHAB, I’d recommend getting comfortable with the metadata approach defined in the latest documentation. If you’d rather stick with tags for now, you can see the old documentation by going to the top right of the webpage and changing “Version: Latest” to “Version: 2.5”.

That said, here’s the specific section you need to read in the docs:

For setting up a thermometer, here are the three important lines:

Thermostat requires a group of items to be properly configured to be used with Google Assistant. The default temperature unit is Celsius. { ga="Thermostat" }

To change the temperature unit to Fahrenheit, add the config option [ useFahrenheit=true ] to the thermostat group.

You can also set up a Thermostat for using it as a temperature sensor. To do so, create a Thermostat group and only add one item member as “thermostatTemperatureAmbient”.

So to get just a thermometer working in GA, you’ll need one group and one item. Using the example in the documentation:

Group g_HK_Basement_TSTAT "Basement Thermostat" { ga="Thermostat" [ useFahrenheit=true ] }
Number HK_Basement_Temp "Basement Temperature" (g_HK_Basement_TSTAT) { channel="yourthermostatgoeshere", ga="thermostatTemperatureAmbient" }

Try this and see if it works for you. Then we can talk about how to build on it.

Yess, This works ! and Thermostat is showing up in GA, i can ask the temperature now and google answers;
“temp in Huiskamer is… and temperature is off”
But now it doesn’t show temperature in Basic/ClassicUi anymore?

Show us your item and sitemap file. Adding thermostat and GA metadata dont breake your BasicUI. But you probably made an mistake somewhere.

Yess…works now :+1:,i changed the Itemname, but didn’t in the sitemap…I also added an icon for the BasicUi in the OH-app; This is how the item looks like now and it works.

 Group           g_GF_LivingRoom_Temp_Huisk  "Temperatuur Huiskamer"  { ga="Thermostat"  } 

 Number          GF_LivingRoom_Temp "Temperatuur huiskamer"       <temperature>          (g_GF_LivingRo    om_Temp_Huisk)   { channel="velbus:vmbgpo:76c72eb1:20:CH33", ga="thermostatTemperatureAmbient"     }

I figured that that was what happened. Glad you got it worked out.

A good advice.
Try avoid changing item names. If you use rules, sitemaps etc, you´ll always end up forgetting something, and then stuff wont work…
I have quite a few items, rules and several sitemaps… I would rather start from scratch than even thinking of what will happen, if I start to rename items…

Thanks,that’s probably the best advice :wink:

two more little things; Temp is showing up in GA and in Basicui in GF / thermostat group ,but i can’t get it to appear in the separate group “livingroom” do i have te alter something in the item or sitemap?

When i ask for the temperature,Google is always saying: “it’s …degrees in the living room and temperature is switched off”

Can i alter something in the configuration so that google tells me just the temperature? or is that a googlething?because saying that the temperature is switched of makes no sense😳

I´m not really sure if it will change anything, but you´ll have to play around with the heatingmode, cause as far as I understand, thats the one Google use to detamin if the heating is on/off, auto, heating or cooling.

Thanks y’all, my intention was the possibility to read/ask google for my temperatures and that works perfect now!

I’ve seen you also use a Velbus Glasspanel for temperature reading… Did you manage to set the required temperature higher/lower or put the heating to eco, night, day or comfort?
I’m trying this without any succes…
Somebody any suggestions?

I havnt´tried cause my velbus setup runs on a Odroid with openhab, but without google assistant.

Hi

Getting Google to adjust the target temperature is fairly straightforward and it is possible to get Google Assistant to change the mode of a Velbus thermostat, if you’re happy to use Google phrases and map them to Velbus modes.

It’s not pretty, but it ‘kind of works’

We’ve managed to do something similar with Alexa.

But we have had to map the Alexa modes like this using the Metadata map

  • Alexa OFF to Velbus SAFE
  • Alexa ECO to Velbus NIGHT
  • Alexa HEAT to Velbus DAY

Tomorrow, I’ll try to see if something similar is possible with the new Google Assistant metadata (but I’m not confident that I’ll be able to do it, at least not bi-directional

I dont see why it shouldnt work. GA can work with strings for settings the Mode.

Specially this section:
To map the [default thermostat modes of Google](https://developers.google.com/assistant/smarthome/traits/temperaturesetting.html) (on, off, heat, cool, etc.) to custom ones for your specific setup, you can use the *modes* config option on the thermostat group. E.g. [ modes=“off=OFF:WINDOW_OPEN,heat=COMFORT:BOOST,eco=ECO,on=ON,auto” ] will enable the following five modes in Google Home “off, heat, eco, on, auto” that will be translated to “OFF, COMFORT, ECO, ON, auto”. You can specify alternative conversions using the colon sign, so that in the former example "BOOST" in openHAB would also be translated to "heat" in Google. For the translation of Google modes to openHAB always the first option after the equal sign is used. By default the integration will provide “off,heat,cool,on,heatcool,auto,eco” .

1 Like

That’s the same as I’ve had to do today for Alexa.

So all I’ve got to do now is get it working…

I’ll update the post on the Velbus thread on both sites when I’ve nailed both translations.

So do you think something like this in the metadata for the Velbus ThermostatMode Item would work?

{ channel="velbus:Module:BridgeID:XX:thermostat#MODE" , ga="thermostatMode" [ modes="off=SAFE,eco=NIGHT,on=DAY,heat=COMFORT" ]}

There’s also a RoomHint tag that I’d like to try

1 Like

I tried this suggestion but the result was the same. No succes…

It’s really frustrating.

I’ve got it working with Alexa, but now my Google Assistant is refusing update so I can’t do any more with it.

It’s forcing my hand to completely rebuild my openHAB2 environment on a new machine, built entirely with Metadata (something I’ve been wanting to do anyway)