Honeywell Evohome 2020 device handler update

Hello everyone,

My name is Andreas and despite not being a developer, i am desperately trying to get the old Evohome integration to work with Smartthings. I have forked the old integration on github and made an up to date as i can version which (kinda) works.

https://github.com/andremain/EvohomeSmartthingsNew

The integration is broken into 2 parts (for some reason), the app and the dht. I can use the app to generate a device handler, but the only thing i can do using the device hander, is to set the temperature. I know it works as i login to evohome’s app and can see that the thermostat has been set.

While the state is permanently set to heating for some reason and the mode cannot be changed, it is not my priority at this point to fix these.

My primary issue is that the temperature display (current temperature) of the thermostat always displays as 0.0 c. Same goes for the device handler’s card at the Smartthings main dashboard. I know that the integration does successfully retrieve the current temperature as i can see it using the ide logs and filtering to display the evohome connect. I can’t however understand with the new changes how to set the temperature to display inside the device handler. I know that for the old app it was done using the tile option which is no longer valid.

Please help me figure this one out. I have been trying for ever! Please take a look of the code on github and feel free to make as many pull requests as you want.

There are many people still using evohome that would love to have an integration with Smartthings.

Thanks in advance.

Tagging @nayelyz

1 Like

I checked your device’s status in the API and the events to update the capabilities value are not being received. You can verify the device events history in the mobile app.
Can you add some screen captures of the IDE logs and your device, please?

Good morning. Sure. Here they are:

From my understanding the device events are occuring in the evohome connect smartapp which has no logs inside the app.

In your DTH I see several custom attributes, if you want to display their value, you’ll need to add a custom capability for each one of them.
Once you’ve defined all the capabilities for the device, you need to generate its presentation to indicate each view configuration. (I can help you through this process too)

In your SmartApp I found that you use the generateEvent function to send the values to the device, but in your DTH, there’s no such function.
sendEvent is the one that actually sends the new value to the capability attribute, for example:

sendEvent(name: "temperature", value: "50", unit:"F")

Take a look at this SmartApp with a similar functionality.

Thank you so much for your help but honestly i have no idea. I just used the original dht from Codersaur which was also not showing the temperature a couple of weeks ago and it now works fine.

WHAT IS HAPPENING ??? THE DASHBOARD CARD WAS WORKING LAST NIGHT NOW IT IS SHOWING CHECKING STATUS AGAIN. THIS IS DRIVING ME CRAZY!!!

I saw that you updated your DTH, now the generateEvent function is working and the events of Temperature are received.
The “checking status” message could be shown because the device is missing its presentation/VID, to create it, please follow these steps:

  1. You need to set up the SmartThings CLI, to do so, get the latest release and follow the steps mentioned in the documentation.
  2. Your DTH must be saved and published.
  3. Then, generate the device config presentation. You need to use the DTH ID which is at the end of its URL, eg. https://graph.api.smartthings.com/ide/app/editor/xxxx-xxxx-xxxx
smartthings presentation:device-config:generate dthID --dth -j -o=devConfigPres.json
  1. Go to the devConfigPres.json file and modify the views configuration according to your needs. In this example, the temperature will be displayed in the dashboard and all capabilities will appear in the details. Custom attributes such as windowFunction are not added because they don’t belong to a capability.
{
    "type": "dth",
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": []
            }
        ],
        "actions": []
    },
    "detailView": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "refresh",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "thermostat",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "actuator",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "thermostatOperatingState",
            "version": 1,
            "values": [],
            "patch": []
        },
        {
            "component": "main",
            "capability": "healthCheck",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "refresh",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "thermostat",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "sensor",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "actuator",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "thermostatOperatingState",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "healthCheck",
                "version": 1,
                "values": [],
                "patch": []
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "refresh",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "thermostat",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "sensor",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "actuator",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "thermostatOperatingState",
                "version": 1,
                "values": [],
                "patch": []
            },
            {
                "component": "main",
                "capability": "healthCheck",
                "version": 1,
                "values": [],
                "patch": []
            }
        ]
    }
}
  1. Save the file and create the presentation:
smartthings presentation:device-config:create -i devConfigPres.json
  1. Take the values of the vid and mnmn properties and add them to your DTH definition eg.
definition (name: "Evohome 2.0", namespace: "Andremain", author: "Andreas Christodoulou", vid: "7bf24038-29fb-383c-b863-a748e9a43af4", mnmn:"SmartThingsCommunity")
  1. Save and publish your DTH, then, create a new device using this handler.

That looks hard. I will give it a go tomorrow. Maybe i can manage to make it work

I am sorry this is too chaotic. Where can i find a tutorial on how to install the CLI tool properly and how to set up for my account? Some say i need to install the Smartthings SDK as well in order for the CLI to work, also the readme file only shows the commands. Here you say may DHT must be saved and published. Where? Also at the end of the URL you provided, i get access denied…

Can i have some guide on how to proceed?

Actually setting it up was not that hard, however i copied the devConfigPres.json you gave me but it still shows as checking status for some reason. I also have 2 device states for some reason. Please help

I also tried the generic zwave thermostat and it still shows as checking status. This is strange.

Verify through the API if the VID used by the device is updating with your new configuration by getting the device list, the value is in the presentationId property.
I used the same capabilities I see in your device and initialized them manually, the result is shown in the picture below.
Please, consider that the capabilities Actuator, Sensor, and Thermostat are deprecated. This is the current capabilities list. To check a capability’s status, use this command:

smartthings capabilities:presentation thermostat -j

Here’s my DTH definition and events:

definition (name: "Evohome Heating Zone", namespace: "codersaur", author: "David Lomas", vid:"494f06ea-855e-33d7-a820-00f5cb712ac5", mnmn:"SmartThingsCommunity") {
    capability "Actuator"
    capability "Sensor"
    capability "Refresh"
    capability "Temperature Measurement"
    capability "Thermostat"

    //...
}
//initialize capabilities' attributes value
def initialize() {
	sendEvent(name:"temperature", value:"72", unit:"F")
    sendEvent(name:"heatingSetpoint", value:"7", unit:"F")
    sendEvent(name:"thermostatSetpoint", value:"7", unit:"F")
    sendEvent(name:"thermostatMode", value:"cool")
}

Thank you, i will try it first thing in the morning. Can i have a screenshot of your dashboard card?

sure, here it is

OK Multiple questions for now.

  1. In the IDE in the device, should i use Published or Self Published?
  2. You said that the Thermostat capability has been deprecated, what exactly did it do and which capabilities do i need to replace it?
  3. When you say through the API, which API are you referring to? / How do i do that? Ok i think i need to download an SDK, should i get the nodejs or the java one? So none of the sdks work on windows?
  1. Published is ok
  2. The attributes used from the Thermostat capability are:
    heatingSetpoint
    thermostatSetpoint
    thermostatMode
    They are now separated capabilities, but the attribute name is the same, so you would only have to add them in the DTH definition.
  3. For the API, I mean this one https://smartthings.developer.samsung.com/docs/api-ref/st-api.html. You can make those requests using Postman, and your Personal Access Token in Authorization
    For example, this is the device list request:

OK the PresentationID is the same.

CLI

2

Changed the device to Published, Cleared the App’s cache but still shows as checking status. Let me add the new capabilities and see. I will update as soon as i can.

Sorry got confused by the capabilities. Should i add them as capabilities or attributes? If i got this right the thermostat capability has been replaced by these so the new capabilities took there names from the old thermostat capability’s attributes, so just by adding these 3
thermostatHeatingSetpoint
thermostatSetpoint
thermostatMode as capabilities, they should work.

Should i add capabilities with their names or id? No matter what i do it does not seem to update.

Also the thermostatSetpoint capability here says depricated… https://smartthings.developer.samsung.com/docs/api-ref/capabilities.html#Thermostat-Heating-Setpoint

Here is what i have so far. What am i doing wrong?

I am having issues with device card changes not displaying but i have just seen that you have issues with loading the mobile app. And the VID does not change when checking with postman. Update. It does change but it takes some time.

This is what i see now.

It should work with both, but for this, it’s better to create a new DTH.

When you create a new device after changing the DTH, do you change its name? This is also important

I used your DTH (with a different name) and I can see correctly the device after the initialize function. One thing I observed though, was that you used two capabilities in the Dashboard View (temperatureMeasurement and thermostatOperatingState), right now, only one at a time is supported, so only “Temperature” is shown.
newEvoHomeDashboard

newEvoHomeDev

You mean write the whole thing from scratch? What is the reasoning behind this?

I don’t create a new device, i just update the device handler. What is confusing, is that if i create a new device and apply the updated DHT, i don’t have the option to add a username and a password. The way i set this up in the first place was using the evohome connect smartapp. How did you create a new device and added the DHT and it works. This really confuses me as i believe the smartapp is doing all the processing. How should i proceed? Please be a bit specific so that i can trace your steps.

I changed the name of my existing device, but still no dice. I have also changed the Dashboard to only have the temperatureMeasurement view. However please elaborate on how to make a new device and also have it connected to evohome connect smartapp.

Thank you for all of your help. I really appreciate it!

Honestly the more i try the farther back i go. For some reason the set temperature function which had been working great, does not work anymore…

and i get this in the logs:

1:17:37 AM: error House Heating Zone (Evohome): setHeatingSetpoint(): Error: Unable to set heating setpoint.

9382535a-fffb-4415-ade6-64b660732fa6 1:17:37 AM: error Evohome (Connect): setHeatingSetpoint(): Error: groovyx.net.http.HttpResponseException: Bad Request