[RESOLVED] Unable to set heating / cooling setpoints via Echo + myopenHAB on OH3.0

I am in the process of doing a clean install of OH3 + JAVA 11. Previously I had been running OH2.5 and I am initially just trying to recreate that working implementation using the new GUI tools. The only thing from the old server that I am using is the Z-Wave USB controller–no items or other files were copied over or imported. I currently have all my power switches, dimmers, and groups set up and working well with Amazon Echo voice control via myopenHAB. But I am having trouble setting temperature setpoints on my thermostat working using voice commands. I have set up a gThermostat group and put the thermostat mode, cooling setpoint, heating setpoint, and current temperature items into that group. The Alexa app finds all these things fine. I can view the current temperature as well as the thermostat mode, (and the mode is translated correctly e.g. AUTO instead of 3). I can also use voice commands to change the thermostat mode and get the current temperature. Using the OpenHAB Android app I can view and adjust the heating and cooling setpoints. But if I use voice commands the Echo responds that e.g. “Cooling setpoint is not responding”. If I try to look at the two setpoint items in the Alexa Android app it just sits there saying “Waiting for openHAB…” But it does not have the red dot and a “device is unresponsive” note. I’ve tried a number of different variations of metadata settings for the setpoints and mode, and manually set things instead of relying on defaults, (e.g. the documentation for ThermostatController.thermostatMode says that supportSetpointMode defaults to true, but that does not seem to be the case). I do not see any errors in my logs that seem related to issues and it does work fine in the Android app. Any ideas on how to track down the issue?

First, can you please provide the relevant item definition? The fact that you are looking at your setpoint items separately in Alexa is confusing. It should be all under your thermostat device only.

Secondly, there is a limitation on the Alexa side where you can only set a target setpoint by voice. You can’t request for a spread or a specific setpoint by name. It is only known as target setpoint when requested. The skill has some logic built-in for dual-setpoint thermostats to control the cool setpoint when in cool mode, the heat setpoint when in heat mode, both setpoints using a comfort range around the requested setpoint, by default +/- 2°F, when in auto mode, and no setpoints when off.

I think that I misunderstood how this integration should work with a dual-setpoint thermostat. I leave mine in Auto mode and thought in that case I would have to set the heating and cooling setpoints individually. Although, when I try to say “turn the thermostat temperature to 70 degrees” Alexa responds that there is more than one thermostat in the house. But if I say “what is the indoor temperature”, or “set the thermostat mode to heating”, Alexa responds correctly. In the Alexa app when I go to devices and select Thermostats it shows me: Cooling Setpoint, Heating Setpoint, Current Temperature and Thermostat Mode.

Here’s my thermostat group definition, (I’m not sure how to get the old item definition view yet in OH3 as I am trying to use the GUI for everything instead of editing items files, so this is the REST API output):

{
  "members": [
    {
      "link": "https://lsvm8:8443/rest/items/HV1D1",
      "state": "72 °F",
      "stateDescription": {
        "pattern": "%.0f",
        "readOnly": false,
        "options": []
      },
      "type": "Number:Temperature",
      "name": "HV1D1_Setpointcooling",
      "label": "Cooling Setpoint",
      "category": "Heating",
      "tags": [
        "Temperature",
        "Setpoint"
      ],
      "groupNames": [
        "HV1D1"
      ]
    },
    {
      "link": "https://lsvm8:8443/rest/items/HV1D1",
      "state": "68 °F",
      "stateDescription": {
        "pattern": "%.1f %unit%",
        "readOnly": true,
        "options": []
      },
      "type": "Number:Temperature",
      "name": "HV1D1_Sensortemperature",
      "label": "Current Temperature",
      "category": "Temperature",
      "tags": [
        "Equipment"
      ],
      "groupNames": [
        "HV1D1"
      ]
    },
    {
      "link": "https://lsvm8:8443/rest/items/HV1D1",
      "state": "3",
      "stateDescription": {
        "pattern": "%s",
        "readOnly": false,
        "options": [
          {
            "value": "0",
            "label": "Off"
          },
          {
            "value": "1",
            "label": "Heat"
          },
          {
            "value": "2",
            "label": "Cool"
          },
          {
            "value": "3",
            "label": "Auto"
          },
          {
            "value": "4",
            "label": "Aux Heat"
          }
        ]
      },
      "commandDescription": {
        "commandOptions": [
          {
            "command": "0",
            "label": "Off"
          },
          {
            "command": "1",
            "label": "Heat"
          },
          {
            "command": "2",
            "label": "Cool"
          },
          {
            "command": "3",
            "label": "Auto"
          },
          {
            "command": "4",
            "label": "Aux Heat"
          }
        ]
      },
      "type": "Number",
      "name": "HV1D1_Thermostatmode",
      "label": "Thermostat Mode",
      "category": "Temperature",
      "tags": [
        "Point"
      ],
      "groupNames": [
        "HV1D1"
      ]
    },
    {
      "link": "https://lsvm8:8443/rest/items/HV1D1",
      "state": "68 °F",
      "stateDescription": {
        "pattern": "%.0f",
        "readOnly": false,
        "options": []
      },
      "type": "Number:Temperature",
      "name": "HV1D1_Setpointheating",
      "label": "Heating Setpoint",
      "category": "Heating",
      "tags": [
        "Temperature",
        "Setpoint"
      ],
      "groupNames": [
        "HV1D1"
      ]
    }
  ],
  "link": "https://lsvm8:8443/rest/items/HV1D1",
  "state": "NULL",
  "editable": true,
  "type": "Group",
  "name": "HV1D1",
  "label": "Thermostat",
  "category": "heating",
  "tags": [
    "HVAC"
  ],
  "groupNames": [
    "gLocation_House"
  ]
}

Check for duplicates in your Alexa devices. If you actually only have one thermostat setup, try removing all devices and trigger a discovery.

As mentioned earlier, this is a limitation with voice requests only. The app gives more controls as you highlighted. Unfortunately, this is how Amazon implemented this integration so far. You can always increase the comfortRange value and request a target setpoint right in the middle. For example, set that parameter to 5°F, request the temperature to be set at 70°F in auto mode and the skill will set your thermostat cooling and heating setpoints between 65°F and 75°F.

Could you include your alexa metadata properties?

Defaults used if not noted. I have tried with and without the Category. The only other Alexa-tagged things are light switches and a garage door, and no naming conflicts.

MV1D1_Setpointcooling "Cooling Setpoint"
Alexa Class: ThermostatController.upperSetpoint
Category: THERMOSTAT
Scale: Fahrenheit

HV1D1_Sensortemperature "Current Temperature"
Class: TemperatureSensor.temperature
Category: THERMOSTAT
Scale: Fahrenheit

HV1D1_Setpointheating "Heating Setpoint"
Class: ThermostatController.lowerSetpoint
Category: THERMOSTAT
Scale: Fahrenheit

HV1D1_Thermostatmode "Thermostat Mode"
Class: ThermostatController.thermostatMode
Category: THERMOSTAT
Binding: zwave
Supports Setpoint Mode: On

All these are in a group called Thermostat which has no Alexa metadata associated with it. I know on OH2.5 I had put the tag "alexa=“Endpoint.Thermostat” on the group, so I added that, but as a “Non-Semantic Tags” as there is no option for Endpoint.Thermostat in the Alexa metadata selection. I also tried creating a group in the Alexa app and put all the thermostat items in there.

In the Alexa app when I select Thermostats it has three entries (the two setpoints and the mode). Is that normal? Is there any way to turn on debug logging for the Alexa / myopenHAB bit to maybe see what it is trying to do or what data is being provided? Any other debugging-type things I can check? Thanks!

OK, I figured it out. In the Non-Semantic Tags for the group just put Thermostat. Now doing a scan in the Alexa app says it found 1 new device instead of 4 and only has one entry in the Thermostats section, but displays the upper and lower setpoints, mode and current temperature on one page.

Can you describe what you did exactly? Because I’m only seeing “waiting for OpenHab” in the Alexa skill…

Edit: I think I got the problem…I only setted a lower setpoint -> Even if you have only one Item, you have to set both…

In case others have the same question, when you edit the group created to contain the thermostat channels under Non-Semantic Tags enter Thermostat.

Instead of using ThermostatController.lowerSetpoint (and upperSetpoint), just use ThermostatController.targetSetpoint. That should work for thermostats with just one temperature channel.