Thermostaat Controls / Control Pages

Posted on
Fri Jul 22, 2022 4:37 pm
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Thermostaat Controls / Control Pages

I am trying to implement a thermostat control on one of my control pages, but I'm tripping over changing the setpoint by a degree (or, better yet, .5 degrees) celsius. It seems like the Indigo Increase/Decrease setpoint actions are built for Fahrenheit only. I can even see my Celsius setpoint change to Fahrenheit before incrementing then switching back to Celsius. And I'm ending up with present values like 22.7 which I am ill prepared to visualize.

Is there some configuration option so I can tell my Indigo app that I'm dealing with Celsius here? How do I get that setpoint to move in increments of a degree (or half a degree) Celsius?

Posted on
Fri Jul 22, 2022 5:03 pm
ryanbuckner offline
Posts: 1075
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Thermostaat Controls / Control Pages

This all depends on the method you're using to have Indigo communicate with your thermostat. It might be helpful if you supply a screen shot and the plugin / device type you're using.

Assuming you have a control page image with an UP arrow and a DOWN arrow to increment and decrement, you can tie those each to an action that is available already for your device or plugin by using the Server Action button. I assume you're doing this now and you don't have the option for increase or decrease by .5 degrees? In that case you'll need to create an Action Group that uses python to increment or decrement by .5 degrees, if that device or plugin allows scripting.

If you give a little more information about the device and the plugin you're using, that would help.

Posted on
Fri Jul 22, 2022 6:00 pm
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Re: Thermostaat Controls / Control Pages

I had the idea that this was a built-in action. I execute this 'incrememnt 1 degree', but the result is NOT 1 degree higher. The setpoint goes up by 1, then immediately drops by .4 . Weird.
Attachments
Screenshot 2022-07-22 at 7.56.57 PM.png
Screenshot 2022-07-22 at 7.56.57 PM.png (84.33 KiB) Viewed 1070 times

Posted on
Fri Jul 22, 2022 10:24 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Thermostaat Controls / Control Pages

SearchCz wrote:
I had the idea that this was a built-in action. I execute this 'incrememnt 1 degree', but the result is NOT 1 degree higher. The setpoint goes up by 1, then immediately drops by .4 . Weird.


That's because the initial 1 degree change is based on your setpoint action. After that, the setpoint is updated by what the Ecobee servers report to the plugin. The plugin has to convert from C to scaled-F because that's what the API uses. And then needs to scale it back to C after getting an update from the servers. If I had the exact values you were using I could verify the numbers you're seeing.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jul 23, 2022 6:15 am
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Re: Thermostaat Controls / Control Pages

FlyingDiver wrote:
SearchCz wrote:
I had the idea that this was a built-in action. I execute this 'incrememnt 1 degree', but the result is NOT 1 degree higher. The setpoint goes up by 1, then immediately drops by .4 . Weird.


That's because the initial 1 degree change is based on your setpoint action. After that, the setpoint is updated by what the Ecobee servers report to the plugin. The plugin has to convert from C to scaled-F because that's what the API uses. And then needs to scale it back to C after getting an update from the servers. If I had the exact values you were using I could verify the numbers you're seeing.


That's trippy. I tried writing my own script so I could set the setpoint to whatever specific value I had in mind, and even that didn't give me the result I expected.

This code yields a setpoint of 18.3:
Code: Select all
indigo.thermostat.setHeatSetpoint(306718526,value=18.5)


If I try to set it to 19, it goes to 18.9.

If I try 16.5, I get 16.1.

22 gives me 21.7.

It looks like setting the temperature to a particular degree setting isn't going to work out.

Posted on
Sat Jul 23, 2022 6:56 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Thermostaat Controls / Control Pages

Not in Celsius, as you won't get the exact numbers you input. If you put the plugin in Debug logging mode, you can see the values going to and from the API. For example, here's what you get when you change a cool setpoint from 25 to 26 (extraneous lines deleted):
Code: Select all
   Ecobee 2                        Ecobee Upstairs: set cool setpoint to: 26.0
   Ecobee 2 Debug                  Ecobee Upstairs: set_hold_cool: 26.0
   Ecobee 2 Debug                  Ecobee Upstairs: set_hold_temp, cool_temp: 26.0, heat_temp: 21.11111111111111
   Ecobee 2 Debug                  Ecobee Upstairs: Converted setpoints cool: 780, heat: 700
   Ecobee 2 Debug                  Ecobee Upstairs: updating state setpointCool to: 26.0
   Ecobee 2 Debug                  Ecobee Upstairs: Reported hsp: 700, converted hsp: 21.11111111111111
   Ecobee 2 Debug                  Ecobee Upstairs: Reported csp: 780, converted csp: 25.555555555555557
   Ecobee 2 Debug                  Ecobee Upstairs: Reported dispTemp: 771, converted dispTemp: 25.055555555555554
   Ecobee 2 Debug                  Ecobee Upstairs: Reported internalTemp: 767, converted internalTemp: 24.833333333333332


Hmm. That converted 26.0 to 780 when it should have been 788. I wonder if I'm doing a rounding operation out of order?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jul 23, 2022 7:06 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Thermostaat Controls / Control Pages

Yup. I was converting to integer before doing the scaling, so I was loosing the fractional part of the temperature. Oops.

Try this version: https://github.com/FlyingDiver/Indigo-E ... g/2022.0.1

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jul 23, 2022 8:07 am
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Re: Thermostaat Controls / Control Pages

FlyingDiver wrote:
Yup. I was converting to integer before doing the scaling, so I was loosing the fractional part of the temperature. Oops.

Try this version: https://github.com/FlyingDiver/Indigo-E ... g/2022.0.1


Very cool! I'm now able to grab the current setpoint, do a little math on that value, and bump it either up or down to the next half degree .... exactly what I wanted to accomplish.

Thanks as always for the continuing support!

Posted on
Sat Jul 23, 2022 3:53 pm
SearchCz offline
Posts: 172
Joined: Sep 18, 2019

Re: Thermostaat Controls / Control Pages

So here's how that thermostat control is panning out. I don't understand why but I'm sometimes having to click twice on my Heat / Cool toggle controls in order to get the change to stick. I'll throw some debugging messages out through the system log to see if I can track it down. But meanwhile, I'm very pleased with the operation of this control.
Attachments
Screenshot 2022-07-23 at 5.51.05 PM.png
Screenshot 2022-07-23 at 5.51.05 PM.png (25.88 KiB) Viewed 958 times
Screenshot 2022-07-23 at 5.51.22 PM.png
Screenshot 2022-07-23 at 5.51.22 PM.png (22.11 KiB) Viewed 958 times

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests