Honeywell Evohome 2020 device handler update

Ok nayelyz thanks a lot, i will try it and let you know. I tried using just one also but i got the same thing. Maybe i am missing something else. Did you take a look at my device presentation file?

I see you added this label property, did you try to change the label of the capability?

Yeah i was getting the same issue where the device in the dashboard showed checking status, so i copied this from the evohome zone presentatation when we had the same issue.

In an unrelated note, the the temperature history in evohome used to work great. Is there something wrong with the dht or is it the smartthings app?

One more thing. Since the rules api replaced the old one, i see the refresh capability in automations. What does it do and is it deprecated as well?

ooh, I see. Well, the error before was because the temperature unit wasn’t included in sendEvent. If you check the VID once it’s generated you see this label because it automatically gets the configuration of temperatureMeasurement in dashboard View, it shouldn’t be included when the device config is created.

Can you describe the problem, please?

The refresh capability has one command with the same name. If you create a function in the DTH for this command, the actions there should be executed, it is used mostly to refresh the capabilities’ value.

What do you mean by this?

Oh ok, so i just need to remove that and it should work.

Yeap. Here is an old screenshot of the evohome thermostat with the history being updated every 5 mins.

And here is one now:

The temperature history is not saved


Well the last smartthings update started using the new rules api for scenes and automations where prior to that it whas using i think the old smartthings api. It messed a lot of people’s scenes and automations in the process. There is a whole threat if you are interested.

Also, did you ever go about that issue with alexa not being able to set a temperature in its application?

Mmm
let me check this part.

Yes, and remove the switch from states too

I believe this error is because of the unit’s compatibility, for example, I created another device that only uses the thermostatHeatingSetpoint capability, and in the ST app, the temperature appears as Celsius, but in Alexa, it appears as Fahrenheit. When I change to Fahrenheit on the ST side, now both show the same value, but I start receiving this error. How is it on your side?

Oh i didn’t do that but it works (kinda). If you think i should remove it, i will.

As you can see in the screenshots bellow the switch icon appeared.

However i get a weird bug. When i press the switch button, lets say from the off position to on, it switches to on for a few seconds, the evohome platform turns the hot water on, but the switch in smartthings goes back to off. Evohome however has hot water on without switching to off. Same goes for the other way around. Here is a video showing it in action bellow in google drive.

https://drive.google.com/file/d/11vAvbjCnStkUa8EkW4EzxKndmlaqN6hw/view?usp=drivesdk

Can you please help me fix this?

Not sure about this but i copied this from the heating dht, do you think it plays a part in this?

def initialize() {
sendEvent(name:“temperature”, value:“5”, unit:“C”)
sendEvent(name:“thermostatMode”, value:“auto”)
sendEvent(name:“supportedThermostatModes”, value:[“auto”,“off”,“eco”,“away”,“dayoff”,“custom”])
}

I was able to change the values when the dht used to have the thermostat capability in the old integration. Also, assuming you may not know, in the alexa app, you can go to devices, echo and alexa, select alexa on this phone, and change the measurement units from there. My impression is that this issue comes from the fact that my device handler can’t accept values of 0.5, and sinse alexa does not allow entering the values directly, we get this error. Could also be something else though as i tried using a routine for setting the value, and it still doesn’t work


And now we are back to checking status

It is because of the unit property is not included when the events are generated in this function:
https://github.com/andremain/EvohomeSmartthings2020/blob/main/Evohome%20Hot%20Water%20Zone%20R1.8%20(not%20working%20yet)#L184
You need to do the same as with Evohome:

You’re right, but to allow the increase of 0.5 it’s simple. You need to include something like this in your device configuration.

"detailView": [
        {
            "component": "main",
            "capability": "thermostatHeatingSetpoint",
            "version": 1,
            "values": [
                {
                    "key": "heatingSetpoint.value",
                    "range": [
                        15,
                        75
                    ],
                    "step": 0.5
                }
            ],
            "patch": []
        }
    ]

Thanks for the configuration hack BTW, now I don’t receive errors and the value is correct.

If you don’t receive a network error it can be due to the several conditions in setSwitchState. I’ll try to find out what’s going on.

@nayelyz as always, thank you SO MUCH for your help!

I did this and got the dashboard icons to work properly. thanks.

I did this as well and got the 0.5 temp change to work. Sorry to be a pain but, is there a faster way to set a specific temperature, like a slider or something? As every time i tap to change a degree up or down, it takes a couple of seconds to apply. A slider which could select the temperature needed would be much faster. If not, i’ m just happy it works anyway :slight_smile:

As for Alexa, i still get the same error when setting the temperature from the app


I am not getting a network error. I do believe this is something in the dht as it behaved like this before updating it to display correctly in the new smartthings app using the device presentation. Btw i added the check health capability in the dht. Dont know if it matters.

I am sorry for not being much help in this regard, as i don’t really have any skills in programming


Oh and never mind for the temperature history
 It decided to work day :slight_smile:

@nayelyz something i also noticed is that it shows that the hot water is on in the dashboard while in the device details it shows as off.

Do you mean to change the Heating Temperature in the SmartThings app? If so, when you click on the numbers (temperature) it shows a pop-up where you can write a value directly.

That’s odd, I’ll install your latest DTH version and check it (and also the switch behavior) because I used a virtual device that only had the Heating Temperature capability.

Awesome news!

Yes, this is because the icon active/inactive changes according to the alternatives of the capability used in dashboard > states. As you’re using temperature in that section and it doesn’t have alternatives, the icon won’t change.

Oh ok thanks! I didn’t know that!

Thank you for doing this. I will be a big help if i can tell the temperature i want to alexa instead of doing custom voice automations to get heating to turn on.

If i can add alternatives to make this work, that would be great. But for now i believe top priority is if you can please help me fix the bug where i turn the device on, hot water turns on, but in smartthings it switches back to off on its own. Please. please help me solve this


@nayelyz some good news regarding the hot water. I have found that while i change the state of the on/off switch for the water and it returns to its previous state, it actually needs some time to get the actual state.

So if from the off position, i switch it to ON, the device will switch back to Off almost immediately and will switch back to the ON position after a few minutes, showing the correct switch state. This is also true on the other way around.

Please find the video bellow on google drive, which shows this behavior in action.

I believe this is something to do with the polling time or refresh time being either too fast or too slow. Any chance you can take a look it ?

When i switched it to off, it took 3 minutes and 25 seconds to set the correct state back.

Here are some logs when switching it on:

Also by setting the polling interval inside the app to 1 minute, it switches to the correct state after about 30 seconds.

@nayelyz any luck with the hot water switch issue?

Ok, for this part, I need to confirm the following:

  • In settings > until, the value selected is Permanent. You need to select it again (changing to another setting and then going back) each time you install or update the device.
  • The generateEvent values in the logs is called in the SmartApp (poll), so this is the information it receives from Evohome.
  • If you want to show the on/off state in the app right after you send it, you need to add the following in the functions on() and off():
void on() {
	if (state.debug) log.debug "${device.label}: on()"
        sendEvent(name:"switch", value:"on") //This line
	setSwitchState('on',until=-1)
}

Originally, the sendEvent() is executed until a response from the Parent (SmartApp - Evohome) is received. While the request is being completed, there can be a poll that generates the event with the opposite value, that’s why we see this behavior.

@nayelyz

Yes this is definitely true.

Yes i believe this is also true.

Sorry where exactly i am supposed to add this?

This is also what i think but i cannot figure this out. I was playing around with the code in the last few days, but honestly this is quite complex for me. Maybe if i keep updating old integrations, i will catchup at some point :stuck_out_tongue:

Hi, @Andremain.
Sorry for the delay, I was checking the issue of the Evohome device using Alexa and finally, I’ve found the root cause.
Using the thermostatMode capability, and initializing the supportedThermostatModes attribute here, another control is added on the Alexa side (Cool temperature) which doesn’t exist. This is causing the error when using the heatingSetPoint capability.
If I omit this capability, the error is not received. As this capability is only used on the ST side, I suggest you create a similar capability and there you can directly configure the available modes.

Sorry, I meant adding the sendEvent(with the corresponding value on/off), in these two functions:
https://github.com/andremain/EvohomeSmartthings2020/blob/main/Evohome%20Hot%20Water%20Zone%20R2.5%20(BETA)#L465
https://github.com/andremain/EvohomeSmartthings2020/blob/main/Evohome%20Hot%20Water%20Zone%20R2.5%20(BETA)#L470

No worries @nayelyz and as always thanks a lot for helping me out.

How exactly do i do that? Do i need to add a new capability called customthermostatmode and remove the thermostat mode one?

Wont that break the smartapp’s functionality?

What if i modify the thermostat mode capability and change every instance of it to customthermostatmode and add the ones you sent to the jason file. Will that work?

Also the hot water mode still doesn’t work. It switches back again until it polls the api. As this works, i don’t think it is that important. This can stay as it is.

The issues i would like to have resolved would be:

  1. The issue with Alexa as i think it is a must.
  2. If possible to have the switch of the hot water on the dashboard to display the correct state.

The rest can wait a bit. I have also heard that groovy is going away. Does this mean that all the work we have done here will be useless in a few months? It will need to be recreated from scratch?

This post has the steps to create a Custom Capability:

You can take my configuration and use it as input for the commands, for example, to create the capability:

smartthings capabilities:create -j -i customCapability.json

And, yeah, you would need to remove the capability “thermostatMode” and replace it with the new one. (this will require a new VID as the capabilities list has changed)
It wouldn’t cause a conflict because the SmartApp makes reference to the attribute name and the new one can use the same value.

The custom capability and removal of the supportedThermostatModesevent should solve this issue.

Adding the new lines in the on/off functions, the switch value keeps changing as before?

The migration was the fastest way to make this integration work.
It’s not official the remaining time for the Groovy IDE tool. However, you start learning about the recent tools and the Developer Workspace.
This would be a cloud-connected device and I think it would be better to use a SmartApp Connector to create it.