Google home & reading temperature

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)

FYI

Alexa was very fussy about the mappings, so could it be something as simple as Title case for example?

Hi

I had a thought from somewhere in the depths of my dusty mind.

Does Google Assistant use Numbers instead of Names for its modes?

I’m sure somewhere in the past I’ve had Google change a thermostat mode.

When I’m back in my office tomorrow, I’ll dig around in my archive and see what I can find from olds tests.

I’m sure it’s something like the mapping shown here

It uses both. But I think string is recommended.
This is my thermostat settings:

Group     g_Stortbad_TSTAT           "Stort Bad Termostat"                                                                                                                      [ "Thermostat" ]
Number    stort_bad_Temperature      "Stort Bad Temperatur [%.1f °C]"                                          <cu_heating> 	(g_Stortbad_TSTAT,Temperatur,gTvaer,gSugeTemp) 	[ "CurrentTemperature" ]                { channel="ihc:controller:elko:stortbad_temperatur_fb" }
Number    stort_bad_Tempsetpunkt     "Stort Bad Temperature setpunkt [%.1f °C]"                                <temperature>	(g_Stortbad_TSTAT)                              [ "homekit:TargetTemperature" ]	        { channel="ihc:controller:elko:stortbad_temperaturSet_fb", autoupdate="false" }
Number    stort_bad_fugt             "Stort Bad Fugtighed [%.0f %%]"                                           <Humidity>       (g_Stortbad_TSTAT,Fugtighed,gHumidityBathRoom) 	[ "CurrentHumidity" ]                   { channel="ihc:controller:elko:stortbad_fugtighed" }
String    stort_bad_Mode             "Stort Bad Mode [%s]"                                                                      (g_Stortbad_TSTAT)                              [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat1_stort_bad        "Stort Bad Telestat [%s]"                                                 <cu_switch> 	(g_Stortbad_TSTAT,gTelestat)                                                            { channel="ihc:controller:elko:stortbad_telestat" }

Then I use a rule, based on the telestat state, which send either heat or cool to GA.

rule "heatingmode stortbad"
when
     Item telestat1_stort_bad changed
then
     if (telestat1_stort_bad.state.toString == "ON" ) {
        stort_bad_Mode.postUpdate("heat") } 
     else {
         stort_bad_Mode.postUpdate("cool") }
end

When “heat” is send to GA the thermostat in the Google Home app will turn red. And when sending “cool”, the thermostat turn to blue.

Btw… Stay healthy, Stuart!

Thanks Kim

I had it working with Tagging, what we’re trying to achieve is the and type of mode setting using the new metadata technique.


As for staying healthy, I’ll try :smile:

Good luck to you all, if you’re really lucky, your children will draw on the wallpaper and force you to redecorate :slight_smile:

Should be the same with metadata

Well, I would like to see my children draw on the wall paper. My daughter is 17 and my son 21 years old :smiley:

1 Like

I am having problems getting Google Assistant to report back the current / ambient temperature. Instead, it is always telling me the set target temperature of the thermostat.

Question: “Okay google, what it the temperature in the living room?”
Answer: “The temperature of the living room thermostat is set to …°C.”

What am I doing wrong?

The item configuration is the following:

Group   WZ_Thermostat        "Wohnzimmer Thermostat" <heating>                  (WZ)            { ga="Thermostat" }
String  WZ_Thermostat_Mode   "Wohnzimmer Thermostat Mode"             (WZ_Thermostat) {ga="thermostatMode"}
Number  WZ_Thermostat_Temp   "Wohnzimmer Temperatur [%.1f %unit%]" <temperature> (WZ_Thermostat) { channel="homematic:HM-TC-IT-WM-W-EU:xxx:2#ACTUAL_TEMPERATURE", ga="thermostatTemperatureAmbient" }
Number  WZ_Thermostat_Target "Zieltemperatur [%.1f %unit%]"     <temperature> (WZ_Thermostat) { channel="homematic:HM-TC-IT-WM-W-EU:xxx:2#SET_TEMPERATURE", ga="thermostatTemperatureSetpoint" }
Number  WZ_Thermostat_Humid  "Feuchtigkeit" (WZ_Thermostat) { channel="homematic:HM-TC-IT-WM-W-EU:xxx:2#ACTUAL_HUMIDITY", ga="thermostatHumidityAmbient" }```

Nothing…
I and others have noticed this as well. And there dont seem to be any obvious reason for this.
I have 12 thermostats setup. They are all exact the same, and the setup is exact the same. Yet Google respond by telling the setpoint rather than the temperature on two of them. It simply makes no sense.
I think its an Google issue. But I dont see how and why… Its always the same two thermostats which Google respond with setpoint.

I have just built an Arduino Nano connected to my Hot Tub via Mosquitto to open HAB. Today I attempted to get GA working with it. I configured it as thermostat both temperature and setpoint are being reported to OH correctly and I see exactly this problem, the setting is reported and not the temperature.

Has anyone found a workaround for this ‘feature’ yet?

NEW INFO:
By playing around with the mode and the set point I have managed to get this working correctly. I seems that when the modes are set to the Alias, it does not work, if I set the mode String to the default it will then work. I suspect the mode was incorrectly set initially causing the problem???

I have also noticed another issue, the maximum temperature on the thermostat on the Phone App is 32C the hot tub max is 40C, Is there a way to extend the operating range of the thermostat?

If thats correct, @michikrug may be able to fix it.
However, it doesnt explain why only two out of my 12 exact equal themostats behave like this. They´re set up exactly the same, and yet two of the report the setpoint when ask for temperature.

I was using the alias when first initialised, as soon as changed I went to the google defined ones it worked. I may try and get it to fail again tomorrow. At no point did I shutdown and restart anything, it just started working. Part of the process was to set up a second thermostat on the same device as just a temperature sensor. That reported temperature okay. When I added the mode (but not the setpoint) to the new group, it failed reporting a setpoint of zero (I assume because it was not defined). The mode alias was “Standard” for “heat”, as it now failed I suspected the mode was affecting the return.

Then I went back to the original definition and manually set the mode to “heat” and it worked, no other changes were made to the definitions.

I can now confirm the action, when setting the mode to the alias “Standard” google fails to report temperature. As soon as I manually change the mode to the default “heat”, google reports temperature correctly. No other changes were made during this test, perhaps I am not understanding the alias in the item config correctly, but this is a repeatable state.

So direct control of the mode

[10:35:40] openhabian@openhab:~$ mosquitto_pub -h xxx -u xxx -P xxx -t "balboa_hottub/mode" -m "heat"
[10:36:50] openhabian@openhab:~$ mosquitto_pub -h xxx -u xxx -P xxx -t "balboa_hottub/mode" -m "Standard"
[11:25:42] openhabian@openhab:~$ mosquitto_pub -h xxx -u xxx -P xxx -t "balboa_hottub/mode" -m "heat"

Gives Working - Not Working - Working

Hope this helps someone

But my thermostats is only set up for “heat” and “cool”.

Capitalisation?

I have created a separate mode now and use just “heat” and “cool”. The operation is now robust, in terms of getting the temp back from google and the HA phone app, goes Red and Blue accordingly. Still need to know how to extend the HA thermostat temperature range though!!!

These are my items:

Group     g_Stortbad_TSTAT           "Stort Bad Termostat"                                                                                                                       [ "Thermostat" ]
Number    stort_bad_Temperature      "Stort Bad Temperatur [%.1f °C]"                                          <cu_heating> 	(g_Stortbad_TSTAT,Temperatur,gTvaer,gSugeTemp)   [ "CurrentTemperature" ]                { channel="ihc:controller:elko:stortbad_temperatur_fb" }
Number    stort_bad_Tempsetpunkt     "Stort Bad Temperature setpunkt [%.1f °C]"                                <temperature>	(g_Stortbad_TSTAT)                               [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:stortbad_temperaturSet_fb", autoupdate="false" }
Number    stort_bad_fugt             "Stort Bad Fugtighed [%.0f %%]"                                           <Humidity>       (g_Stortbad_TSTAT,Fugtighed,gHumidityBathRoom)   [ "CurrentHumidity" ]                   { channel="ihc:controller:elko:stortbad_fugtighed" }
String    stort_bad_Mode             "Stort Bad Mode [%s]"                                                                      (g_Stortbad_TSTAT)                               [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat1_stort_bad        "Stort Bad Telestat [%s]"                                                 <cu_switch> 	(g_Stortbad_TSTAT,gTelestat)                                                             { channel="ihc:controller:elko:stortbad_telestat" }

Group     g_sove_TSTAT               "Soveværelse Termostat"                                                                                                                     [ "Thermostat" ]
Number    sove_Temperature           "Soveværelse Temperatur [%.1f °C]"                                        <cu_heating>     (g_sove_TSTAT,Temperatur,gTvaer)                 [ "CurrentTemperature" ]                { channel="ihc:controller:elko:sove_temperatur_fb" }
Number    sove_Tempsetpunkt          "Soveværelse Temperature setpunkt  [%.1f °C]"                             <temperature>    (g_sove_TSTAT)                                   [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:sove_temperaturSet_fb", autoupdate="false" }
String    sove_Mode                  "Soveværelse Mode [%s]"                                                                    (g_sove_TSTAT)                                   [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat2_sove             "Soveværelse Telestat [%s]"                                               <cu_switch>      (g_sove_TSTAT,gTelestat)                                                                 { channel="ihc:controller:elko:sove_telestat" }

Group     g_stue_TSTAT               "Stue Termostat"                                                                                                                            [ "Thermostat" ]
Number    stue_Temperature           "Stue Temperatur [%.1f °C]"                                               <cu_heating>     (g_stue_TSTAT,Temperatur,gTvaer)                 [ "CurrentTemperature" ]                { channel="ihc:controller:elko:stuen_temperatur_fb" }
Number    stue_Tempsetpunkt          "Stue Temperature setpunkt  [%.1f °C]"                                    <temperature>    (g_stue_TSTAT)                                   [ "TargetTemperature" ]                 { channel="ihc:controller:elko:stuen_temperaturSet_fb", autoupdate="false" }
String    stue_Mode                  "Stue Mode [%s]"                                                                           (g_stue_TSTAT)                                   [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat3_stue             "Stue Telestat [%s]"                                                      <cu_switch>      (g_stue_TSTAT,gTelestat)                                                                 { channel="ihc:controller:elko:stuen_telestat" }

Group     g_koekken_TSTAT            "Køkken Termostat"                                                                                                                          [ "Thermostat" ]
Number    koekken_Temperature        "Køkken Temperatur [%.1f °C]"                                             <cu_heating>     (g_koekken_TSTAT,Temperatur,gTvaer,gSugeTemp)    [ "CurrentTemperature" ]                { channel="ihc:controller:elko:koekken_temperatur_fb" }
Number    koekken_Tempsetpunkt       "Køkken Temperature setpunkt [%.1f °C]"                                   <temperature>    (g_koekken_TSTAT)                                [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:koekken_temperaturSet_fb", autoupdate="false" }
String    koekken_Mode               "Køkken Mode [%s]"                                                                         (g_koekken_TSTAT)                                [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat4a_koekken         "Køkken Telestat [%s]"                                                    <cu_switch>      (g_koekken_TSTAT,gTelestat)                                                              { channel="ihc:controller:elko:koekken_telestat" }

Group     g_spisestue_TSTAT          "Spiseplads Termostat"                                                                                                                      [ "Thermostat" ]
Number    spisestue_Temperature      "Spiseplads Temperatur [%.1f °C]"                                         <cu_heating>     (g_spisestue_TSTAT,Temperatur,gTvaer)            [ "CurrentTemperature" ]                { channel="ihc:controller:elko:spise_temperatur_fb" }
Number    spisestue_Tempsetpunkt     "Spiseplads Temperature setpunkt [%.1f °C]"                               <temperature>    (g_spisestue_TSTAT)                              [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:spise_temperaturSet_fb", autoupdate="false" }
String    spisestue_Mode             "Spiseplads Mode [%s]"                                                                     (g_spisestue_TSTAT)                              [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat4b_koekken         "Spiseplads Telestat [%s]"                                                <cu_switch>      (g_spisestue_TSTAT,gTelestat)                                                            { channel="ihc:controller:elko:spise_telestat" }

Group     g_kontor_TSTAT             "Kontor"                                                                                                                                    [ "Thermostat" ]
Number    kontor_Temperature         "Kontor [%.1f °C]"                                                        <cu_heating>    (g_kontor_TSTAT,Temperatur,gTvaer,gSugeTemp)      [ "CurrentTemperature" ]                { channel="ihc:controller:elko:kontor_temperatur_fb" }
Number    kontor_Tempsetpunkt        "Kontor setpunkt  [%.1f °C]"                                              <temperature>   (g_kontor_TSTAT)                                  [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:kontor_temperaturSet_fb", autoupdate="false" }
String    kontor_Mode                "Kontor Mode [%s]"                                                                        (g_kontor_TSTAT)                                  [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat5_kontor           "Kontor Telestat [%s]"                                                    <cu_switch>     (g_kontor_TSTAT,gTelestat)                                                                { channel="ihc:controller:elko:kontor_telestat" }

Group     g_bryggers_TSTAT           "Bryggers Termostat"                                                                                                                        [ "Thermostat" ]
Number    bryggers_Temperature       "Bryggers Temperatur [%.1f °C]"                                           <cu_heating>    (g_bryggers_TSTAT,Temperatur,gTvaer,gSugeTemp)    [ "CurrentTemperature" ]                { channel="ihc:controller:elko:bryggers_temperatur_fb" }
Number    bryggers_Tempsetpunkt      "Bryggers Temperature setpunkt  [%.1f °C]"                                <temperature>   (g_bryggers_TSTAT)                                [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:bryggers_temperaturSet_fb", autoupdate="false" }
String    bryggers_Mode              "Bryggers Mode [%s]"                                                                      (g_bryggers_TSTAT)                                [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat9_bryggers         "Bryggers Telestat [%s]"                                                  <cu_switch>     (g_bryggers_TSTAT,gTelestat)                                                              { channel="ihc:controller:elko:bryggers_telestat9" }
Switch    telestat10_entre           "Bryggers Telestat Entre [%s]"                                            <cu_switch>     (gTelestat)                                                                               { channel="ihc:controller:elko:bryggers_telestat10" }

Group     g_lille_bad_TSTAT          "Lille Bad Termostat"                                                                                                                       [ "Thermostat" ]
Number    lille_bad_Temperature      "Lille Bad Temperatur [%.1f °C]"                                          <cu_heating>    (g_lille_bad_TSTAT,Temperatur,gTvaer,gSugeTemp)   [ "CurrentTemperature" ]                { channel="ihc:controller:elko:lillebad_temperatur_fb" }
Number    lille_bad_Tempsetpunkt     "Lille Bad Temperature setpunkt [%.1f °C]"                                <temperature>   (g_lille_bad_TSTAT)                               [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:lillebad_temperaturSet_fb", autoupdate="false" }
Number    lille_bad_fugt             "Lille Bad Fugtighed [%.0f %%]"                                           <Humidity>      (g_lille_bad_TSTAT,Fugtighed,gHumidityBathRoom)   [ "CurrentHumidity" ]                   { channel="ihc:controller:elko:lillebad_fugtighed" }
String    lille_bad_Mode             "Lille Bad Mode [%s]"                                                                     (g_lille_bad_TSTAT)                               [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat11_lil_bad         "Lille Bad Telestat [%s]"                                                 <cu_switch>     (g_lille_bad_TSTAT,gTelestat)                                                             { channel="ihc:controller:elko:lillebad_telestat" }

Group     g_casper_TSTAT             "Caspers Termostat"                                                                                                                         [ "Thermostat" ]
Number    casper_Temperature         "Caspers vær Temperatur [%.1f °C]"                                        <cu_heating>    (g_casper_TSTAT,Temperatur,gTvaer)                [ "CurrentTemperature" ]                { channel="ihc:controller:elko:casper_temperatur_fb" }
Number    casper_Tempsetpunkt        "Caspers vær Temperature setpunkt [%.1f °C]"                              <temperature>   (g_casper_TSTAT)                                  [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:casper_temperaturSet_fb", autoupdate="false" }
String    casper_Mode                "Caspers vær Mode [%s]"                                                                   (g_casper_TSTAT)                                  [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat12_gaest           "Caspers vær Telestat  [%s]"                                              <cu_switch>     (g_casper_TSTAT,gTelestat)                                                                { channel="ihc:controller:elko:casper_telestat" }

Group     g_amanda_TSTAT             "Amandas Termostat"                                                                                                                         [ "Thermostat" ]
Number    amanda_Temperature         "Amandas vær Temperatur [%.1f °C]"                                        <cu_heating>    (g_amanda_TSTAT,Temperatur,gTvaer)                [ "CurrentTemperature" ]                { channel="ihc:controller:elko:amanda_temperatur_fb" }
Number    amanda_Tempsetpunkt        "Amandas vær Temperature setpunkt [%.1f °C]"                              <temperature>   (g_amanda_TSTAT)                                  [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:amanda_temperaturSet_fb", autoupdate="false" }
String    amanda_Mode                "Amandas vær Mode [%s]"                                                                   (g_amanda_TSTAT)                                  [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat8_amanda           "Amandas vær Telestat [%s]"                                               <cu_switch>     (g_amanda_TSTAT,gTelestat)                                                                { channel="ihc:controller:elko:amanda_telestat" }

Group     g_marc_TSTAT               "Marc Termostat"                                                                                                                            [ "Thermostat" ]
Number    marc_Temperature           "Marcs værelse Temperatur [%.1f °C]"                                      <cu_heating>    (g_marc_TSTAT,Temperatur,gTvaer)                  [ "CurrentTemperature" ]                { channel="ihc:controller:elko:marc_temperatur_fb" }
Number    marc_Tempsetpunkt          "Marcs værelse Temperature setpunkt [%.1f °C]"                            <temperature>   (g_marc_TSTAT)                                    [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:marc_temperaturSet_fb", autoupdate="false" }
String    marc_Mode                  "Marcs værelse Mode [%s]"                                                                 (g_marc_TSTAT)                                    [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat7_marc             "Marcs værelse Telestat [%s]"                                             <cu_switch>     (g_marc_TSTAT,gTelestat)                                                                  { channel="ihc:controller:elko:marc_telestat" }

Group     g_aktivitet_TSTAT          "Aktivitet Termostat"                                                                                                                       [ "Thermostat" ]
Number    aktivitet_Temperature      "Aktivitetsrum Temperatur [%.1f °C]"                                      <cu_heating>    (g_aktivitet_TSTAT,Temperatur,gTvaer,gSugeTemp)   [ "CurrentTemperature" ]                { channel="ihc:controller:elko:aktivitet_temperatur_fb" }
Number    aktivitet_Tempsetpunkt     "Aktivitetsrum Temperature setpunkt [%.1f °C]"                            <temperature>   (g_aktivitet_TSTAT)                               [ "homekit:TargetTemperature" ]         { channel="ihc:controller:elko:aktivitet_temperaturSet_fb", autoupdate="false" }
String    aktivitet_Mode             "Aktivitetsrum vær Mode [%s]"                                                             (g_aktivitet_TSTAT)                               [ "homekit:TargetHeatingCoolingMode" ]
Switch    telestat6_aktivitet        "Aktivitetsrum Telestat [%s]"                                             <cu_switch>     (g_aktivitet_TSTAT,gTelestat)                                                             { channel="ihc:controller:elko:aktivitet_telestat" }

As you can see, they´re exact equal.
The mode is set from a rule, when the telestart switch to ON, mode is set for “heat” and when telestat is OFF, mode is set for “cool”.

This is the rule for the first themostat:

rule "heatingmode stortbad"
when
     Item telestat1_stort_bad changed
then
     if (telestat1_stort_bad.state.toString == "ON" ) {
        stort_bad_Mode.postUpdate("heat") } 
     else {
         stort_bad_Mode.postUpdate("cool") }
end

It´s a simple as it gets :slight_smile:

1 Like

Hey please, this is my items :
Group SST “Termostato Casa” { ga=“Thermostat” [ useFahrenheit=false ] }
Number termostatosoggiorno_temperatura “Temperatura Soggiorno [%.1f °C]” (SST) {channel=“souliss:t52:71:8-5:value”, ga=“thermostatTemperatureAmbient” }
Number termostatosoggiorno_umidita “Umidità Soggiorno [%.1f %%]” (SST) {channel=“souliss:t53:71:8-7:value”, ga=“thermostatHumidityAmbient” }
Number termostatosoggiorno_setpoint “Regola Set Point [%.1f °c]” (SST) {autoupdate=“false”, channel=“souliss:t31:71:8-0:setpoint”, ga=“thermostatTemperatureSetpoint” }
Switch termostatosoggiorno_setasmeasured “Set temp. attuale” (SST) {channel=“souliss:t31:71:8-0:setAsMeasured”}
String termostatosoggiorno_modo “Modo” (SST) {autoupdate=“false”, channel=“souliss:t31:71:8-0:mode”, ga=“thermostatMode”}
Switch termostatosoggiorno_power “Termostato” (SST) {channel=“souliss:t31:71:8-0:system”}

When i ask for temperature GA respond me with setpoint. When i ask for humidity GA respond me correctly… Tried to ask temperatura soggiorno, temperatura di casa, etc.etc.
What can i try to have ambient temperature as answer ?
thanks

Hi @dariocdj, if you find the answer tell me to! If I ask for the temperature, first the assistant replies with the set point and then with the temperature

@dariocdj yeap, I’ve the same problema with modbus tcp thermostat… I think maybe can be missing modes?