openHAB Google Assistant Integration v2.0

I wanted to start to use the new tagging.
I removed the link to OpenHAB.
I tried to Link OpenHAB but received [“Couldn’t update the setting. Check your connection.”].
I removed all old tagging in my items.
Tried to link OpenHAB again but still receive [“Couldn’t update the setting. Check your connection.”]

What can i try next?

/Mike

I would comment out all of your tags and metadata, then add back one device and try adding openHAB back to Google Home. If that works, there might a typo in one of your metadata definitions.

You don’t need to unlink openHAB to update your devices. You can do that by either saying, “hey Google, sync my openHAB devices” or going into the Google Home app and pulling down to refresh.

Does this help? [SOLVED] Google Assistant "Couldn't update the settings. Check your connection"

Now it is working.
I Thing is was that i used the tag [ “CurrentTemperature” ] standalone to ask “What is the temperature in Bedroom”.

/Mike

Hi, is there a way to allow a thermostat setpoint below 50 deg F? I have a thermostat in the garage and I set it at 42 degrees when I’m not out there. In the Google Assistant app, it seems the lowest I can go is 50.

At least there might be a way to set this:

thermostatTemperatureRange
Object. Optional. Contains two float values that indicate the supported minimum and maximum temperature range for this device (in degrees Celsius):
minThresholdCelsius
maxThresholdCelsius

I will try to add this as a metadata config option.
But for now, you can not do anything about it. The “off” mode setting might do the trick.

I also have the problem that my thermostat worked OK for months and now I can not set the target temperature anymore, because of “unknown mode”. Tried with voice command to Nest Hub and also with the Android Home app.
I do not know if that problem started with openHAB 2.5.0 or with a server side update to myopenhab.
There is nothing in openhab.log and nothing in events.log.
BTW, it does display the current and target temperature and mode correctly in the Home app.

Group WohnzimmerHeizung "Wohnzimmer Heizung" [ "Thermostat", "Celsius" ]
{
  "members": [
    {
      "link": "http://192.168.0.7:8090/rest/items/WohnzimmerHeizungModus",
      "state": "heat",
      "type": "String",
      "name": "WohnzimmerHeizungModus",
      "label": "Wohnzimmer Heizung Modus",
      "tags": [
        "HeatingCoolingMode"
      ],
      "groupNames": [
        "WohnzimmerHeizung",
        "Persist"
      ]
    },
    {
      "link": "http://192.168.0.7:8090/rest/items/HM_HeizungWohnzimmer_1_ActualTemperature",
      "state": "23.50",
      "stateDescription": {
        "minimum": -3276.8,
        "maximum": 3276.7,
        "step": 0.1,
        "pattern": "%.0f",
        "readOnly": true,
        "options": []
      },
      "type": "Number:Dimensionless",
      "name": "HM_HeizungWohnzimmer_1_ActualTemperature",
      "label": "HM_HeizungWohnzimmer_ActualTemperature",
      "category": "Temperature",
      "tags": [
        "CurrentTemperature"
      ],
      "groupNames": [
        "WohnzimmerHeizung"
      ]
    },
    {
      "link": "http://192.168.0.7:8090/rest/items/HM_HeizungWohnzimmer_1_SetPointTemperature",
      "state": "24.00 °C",
      "stateDescription": {
        "minimum": 4.5,
        "maximum": 30.5,
        "step": 0.1,
        "pattern": "%.2f %unit%",
        "readOnly": false,
        "options": []
      },
      "type": "Number:Temperature",
      "name": "HM_HeizungWohnzimmer_1_SetPointTemperature",
      "label": "HM_HeizungWohnzimmer_SetPointTemperature",
      "category": "Temperature",
      "tags": [
        "TargetTemperature"
      ],
      "groupNames": [
        "WohnzimmerHeizung"
      ]
    },
    {
      "link": "http://192.168.0.7:8090/rest/items/HM_HeizungWohnzimmer_1_Humidity",
      "state": "42",
      "stateDescription": {
        "minimum": 0,
        "maximum": 100,
        "step": 1,
        "pattern": "%.0f",
        "readOnly": true,
        "options": []
      },
      "type": "Number:Dimensionless",
      "name": "HM_HeizungWohnzimmer_1_Humidity",
      "label": "HM_HeizungWohnzimmer_Humidity",
      "category": "Humidity",
      "tags": [
        "CurrentHumidity"
      ],
      "groupNames": [
        "WohnzimmerHeizung"
      ]
    }
  ],
  "link": "http://192.168.0.7:8090/rest/items/WohnzimmerHeizung",
  "state": "NULL",
  "editable": false,
  "type": "Group",
  "name": "WohnzimmerHeizung",
  "label": "Wohnzimmer Heizung",
  "tags": [
    "Thermostat",
    "Celsius"
  ],
  "groupNames": []
}

I dont understand…
You say you cant set target due to an “unknown mode”.
But you also say, that the Home app shows the target temperature, current temperature and mode correctly…

I have to ask then - Where do you see the “unknown mode” ?

When I SAY “set temperature to X degree”, it answers “sorry, this mode does not exist on Wohnzimmer heating”.
When I change the target temperature in the Android Home app, it jumps back to the old value after 2 seconds.

Hmm okay I see…
Its a bit pain to see your items like that… But I´ll try “translate” it to ordinary items :smiley:

Your target tag is wrong… I believe it should be: [ "homekit:TargetTemperature" ]
The same with the heatingmode. It should be: [ "homekit:TargetHeatingCoolingMode" ]

At least thats what I´m using. And its working fine.

This is one of my thermostats:

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" ]
2 Likes

The reason I pasted the REST response is that the items are defined in PaperUI.
I can try your hint tomorrow.
I also cannot change the heating mode in the app. When I change it from “heat” to “cool” in the app, it takes a few seconds doing something and then it is still “heat”. The mode is a simple string item in my case.
I think, I had the homekit prefix at first a year ago but then it did not work, so I removed it and it then worked fine until recently.

Edit: You were right. Adding the homekit: prefix and refreshing fixed it. Strange that I had to remove that to make it work a year ago.
Thanks!

I had the same experience a you…
But Michael/Marzima changed the integration a month ago (or later). After that we had to use it and it was working.
I´m using String for setting the Mode as well.

Great you got it to work again.

I ran a test and I am pretty sure a fresh sync would have fixed your setup without any change of the config, because the tags you defined are still supported.

Really?? I had troubble as well, when I hadn´t change the tags.But I dont recall if I made a resync back then… I probably just changed the tag, and then did the resync afterwards.

Yes… the code says:
HeatingCoolingMode, homekit:HeatingCoolingMode, homekit:TargetHeatingCoolingMode, homekit:CurrentHeatingCoolingMode for mode
TargetTemperature, homekit:TargetTemperature for setpoint
CurrentTemperature & CurrentHumidity for :wink:

I managed to set my thermostat to auto changeover mode. I added all the metadata to the items, but now when I look in google app it show mode as other and only shows the ambient temperature. openHAB shows everything correctly with auto as the mode. I wonder if it has to do with the naming discrepancies between the thermostat and the google assistant. Your code has [‘off’, ‘heat’, ‘cool’, ‘on’, ‘heatcool’, ‘auto’]. Below is the device info for the modes from https://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/182?layout=openhab2.

<channel-type id="honeywell_th8320zw_00_000_thermostat_mode">
<item-type>Number</item-type>
<label>Thermostat Mode</label>
<description>Sets the thermostat mode</description>
<category>Temperature</category>
<state pattern="%s">
  <options>
    <option value="3">Auto</option>
    <option value="0">Off</option>
    <option value="11">Economy Heat</option>
    <option value="2">Cool</option>
    <option value="12">Economy Cool</option>
    <option value="1">Heat</option>
    <option value="5">Resume</option>
  </options>
</state>

I have tried string and number for the mode, but it doesn’t seem to make a difference. Below is the group containing everything.

{
"members": [{
        "link": "http://openhab:8080/rest/items/Thermostat_TemperatureSensor",
        "state": "73",
        "type": "Number",
        "name": "Thermostat_TemperatureSensor",
        "label": "Family Room Temperature",
        "category": "Temperature",
        "tags": ["CurrentTemperature"],
        "groupNames": ["gTemperature", "gFamilyRoom", "gFamRmThermostat"]
    }, {
        "link": "http://openhab:8080/rest/items/Thermostat_Mode",
        "state": "3.0",
        "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": [{
                    "value": "3",
                    "label": "Auto"
                }, {
                    "value": "0",
                    "label": "Off"
                }, {
                    "value": "11",
                    "label": "Economy Heat"
                }, {
                    "value": "2",
                    "label": "Cool"
                }, {
                    "value": "12",
                    "label": "Economy Cool"
                }, {
                    "value": "1",
                    "label": "Heat"
                }, {
                    "value": "5",
                    "label": "Resume"
                }
            ]
        },
        "commandDescription": {
            "commandOptions": [{
                    "command": "3",
                    "label": "Auto"
                }, {
                    "command": "0",
                    "label": "Off"
                }, {
                    "command": "11",
                    "label": "Economy Heat"
                }, {
                    "command": "2",
                    "label": "Cool"
                }, {
                    "command": "12",
                    "label": "Economy Cool"
                }, {
                    "command": "1",
                    "label": "Heat"
                }, {
                    "command": "5",
                    "label": "Resume"
                }
            ]
        },
        "type": "Number",
        "name": "Thermostat_Mode",
        "label": "Family Room Mode",
        "category": "Temperature",
        "tags": ["homekit:TargetHeatingCoolingMode"],
        "groupNames": ["gFamilyRoom", "gFamRmThermostat"]
    }, {
        "link": "http://openhab:8080/rest/items/Thermostat_SetpointCooling",
        "state": "76",
        "stateDescription": {
            "pattern": "%.0f",
            "readOnly": false,
            "options": []
        },
        "type": "Number",
        "name": "Thermostat_SetpointCooling",
        "label": "Family Room Setpoint (cooling)",
        "category": "Temperature",
        "tags": ["homekit:TargetTemperature"],
        "groupNames": ["gFamRmThermostat"]
    }, {
        "link": "http://openhab:8080/rest/items/Thermostat_Fan_Mode",
        "state": "6",
        "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": [{
                    "value": "0",
                    "label": "Auto (Low)"
                }, {
                    "value": "1",
                    "label": "On (Low)"
                }, {
                    "value": "6",
                    "label": "Circulate"
                }
            ]
        },
        "commandDescription": {
            "commandOptions": [{
                    "command": "0",
                    "label": "Auto (Low)"
                }, {
                    "command": "1",
                    "label": "On (Low)"
                }, {
                    "command": "6",
                    "label": "Circulate"
                }
            ]
        },
        "type": "Number",
        "name": "Thermostat_Fan_Mode",
        "label": "Family Room Fan Mode",
        "category": "Temperature",
        "tags": [],
        "groupNames": ["gFamRmThermostat"]
    }, {
        "link": "http://openhab:8080/rest/items/Thermostat_Fan_OperatingState",
        "state": "1",
        "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": [{
                    "value": "0",
                    "label": "Idle"
                }
            ]
        },
        "commandDescription": {
            "commandOptions": [{
                    "command": "0",
                    "label": "Idle"
                }
            ]
        },
        "type": "Number",
        "name": "Thermostat_Fan_OperatingState",
        "label": "Family Room Thermostat Fan State",
        "category": "Temperature",
        "tags": [],
        "groupNames": ["gFamRmThermostat"]
    }
],
"link": "http://openhab:8080/rest/items/gFamRmThermostat",
"state": "NULL",
"editable": false,
"type": "Group",
"name": "gFamRmThermostat",
"label": "Family Room Thermostat",
"tags": ["Thermostat", "Fahrenheit"],
"groupNames": ["gHome"]

}

Any ideas how/if I should set these up differently?

When you use a string item, Google sends one of four commands: heat, cool, on, or off, with on corresponding to auto and displaying in Google Home as Other. @michikrug has submitted a PR that will enable you to map the states in an item and ensure they’re synchronized between your device and GA, but I don’t think there’s anything you can do to change the values on the Google side.

A bit misleading :slight_smile:
Google doesnt sends these commands… Google will accept (receive) these.
So in openhab you can send these commands to Google, and this way tell Google the heatingmode.

I have thought about this as well…
If this should make sense, it should be possible to change the heatmode from GA to openhab as well. But I dont really see this very usefull, unless you have a specific HVAC or something simular.
You can however do some changes to the heatmode. If you change the setpoint of the thermostat, and have GO monitoring your heater/boiler/actuator, it will change to heating or cooling, all depending of the setpoint. I do this using a rule in openhab. But it´s actually only the setpoint which makes it change.

This is a screenshot of one of my thermostats when setpoint is below the actual temperature. Notice the color of the thermostat (blue). It´s in cooling mode.

And this is the same thermostat, where I changed the setpoint above the actual temerature. Now the color is red, at the thermostat is in heating mode.

This is controled by a simple rule, where I monitor the actuator, and send heat if the actuator is ON, or cool if the actuator is OFF.

Very simple, but it makes good sense to me.
Since this is a very simple thermostat, it makes no sense using auto mode. A simple thermostat is already in auto mode. I could have used on/off insted, but it makes better sense using heat/cool :smiley:

That would be awesome if you could. I’d imagine there are others that would find this useful.

Well, it’s actually both. When you select a mode in the Google Home app, you can see in the log that it very clearly sends one of these commands if your item is a string. And as a result, these are the strings it can accept. So you could say it either way, but there’s nothing misleading about what I wrote.