nebulous / infinitude

Open control of Carrier/Bryant thermostats
MIT License
225 stars 50 forks source link

Thermostat "mode" seems to be different in /api/status and /api/config? #91

Closed swerb73 closed 2 years ago

swerb73 commented 4 years ago

Is this right?

I have the mode of the system in "fanonly" but my /api/status call shows "off" while my /api/config shows "fanonly"?

bdf0506 commented 4 years ago

I believe mode means something different in each of these by design. On one screen it is showing if the general mode is set to Auto/Cool/Fan/Off. On the other it is showing the current operation. So it's entirely possible that on one screen it shows Auto, and the other it shows Cooling, or something similar.

swerb73 commented 4 years ago

Hmm, but if I have it fanonly or off, shouldn't they be the same since it isn't cooling or heating at that point?

bdf0506 commented 4 years ago

Not necessarily. Mode in the config screen is what the operation mode is, think of it as the mode that the thermostat is set to. In mine, right now it is set to Auto. Then, in the status screen, think of this as what the current operating mode is at this exact minute. In mine, right now it says off. But, if the temperature in my house raises, and the A/C kicks on, this will change to cooling.

Are you using this with Home Assistant? If so, see this for some more background: https://developers.home-assistant.io/blog/2019/07/03/climate-cleanup/

nebulous commented 4 years ago

@bdf0506 nailed it. status is "what is the thermostat doing right now" - mode in status for me right now is off config is "how is the thermostat configured to operate" - mode for zone 1 for me right now is auto

so they aren't intended to be the same value.

swerb73 commented 4 years ago

OK, thanks guys, appreciate the insight. I'm really trying to get the system "mode" in the status call so I can show it on the thermostat interface I've built in smarttthings. Question - does it make sense to modify the /api/status result to include this (seems like it should to me at least, like it shows many of the other core system configurations? Maybe we add a different type of "mode" to differentiate between the climate mode and the currently running heat/cooling source mode?

I suppose I could rebuilt the integration I have to use /config but it seems using /status is the best way for me to get everything I need to show a thermostat?

nebulous commented 4 years ago

Sorry @swerb73, I'm a little bit confused. status and config are really thin wrappers around what the thermostat provides, so I'd be reluctant to augment them much. Some combination of status and config endpoints encompasses basically everything about the thermostat, but if your goal is to display current thermostat status, I think the status endpoint would have all you need. It includes per-zone heat and cool setpoints and zoneconditioning(yes, of course none of the keys are consistent.. grrrf) shows idle/heating/cooling/etc.

Could you clarify what you wanted to have added to the status api? The configuration key for configuration mode?

swerb73 commented 4 years ago

Hi @nebulous, correct, I'd love to get the configuration mode into the /api/status (status API). I realize there is already a "mode" in there which reports "what is the thermostat doing right now" per your note above, but if we could find a new key, perhaps "climate_mode", or "thermostat_mode" that would report it in that API call?

nebulous commented 2 years ago

Grooming the old threads a bit.. Did you ever come to a reasonable solution, @swerb73? I'm not familiar with smartthings' automations, but perhaps you could hit both endpoints and use whichever keys from each that you need? I'm going to close this for now, but feel free to reopen with more details as desired.