Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nest API: when is Thermostat 'heating' or 'cooling'?

Tags:

nest-api

The Nest Thermostat device will display on-screen if it's 'cooling' or 'heating'. How do I get this state through the Nest API?

The hvac_mode property seems to simply show what the user's Thermostat is capable of controlling and doesn't change when either cooling or heating occurs.

For now, I'm using a simple but not flawless logic:

if (can_cool && target_temperature < ambient_temperature) --> isCooling
if (can_heat && target_temperature > ambient_temperature) --> isHeating
else --> isDoingNothing

By not flawless, I mean that I've encountered situations where this logic is incorrect. For example, in a given situation where the ambient_temperature is 20 Celsius and the target_temperature is 21 Celsius with can_heat set to true, my UI will say the Thermostat is heating, while it actually isn't.

This is probably because target and ambient temperatures are too close, but I don't know what the threshold is.

Is there another or better way to figure out heating and cooling states?

like image 677
Rachid Finge Jr Avatar asked Oct 16 '14 22:10

Rachid Finge Jr


People also ask

Does Nest thermostat automatically switch heat and cool?

Your system will either heat or cool to try to keep your home within the temperature range you've manually set. Your thermostat will automatically switch your system between heating and cooling as needed to meet any scheduled temperatures or a temperature that you've manually selected.

How do I know if my Nest is cooling?

For heating, turn up the target temperature until it turns orange. For cooling, turn it down until it turns blue. Wait about 5 minutes and check the air coming from the vents, radiators, or whatever your system uses.

Why does Nest have two temperatures?

Your thermostat's temperature screen will often show you two different temperatures: The large target temperature in the middle of the thermostat screen is the temperature that your thermostat was set to either manually or automatically by your temperature schedule.

How do I set my Nest to cool and heat?

To select this setting, highlight over HEAT-COOL and press. In this setting, you set the temperature range that you want to keep your home between, and the thermostat will automatically switch between heating and cooling as needed.


2 Answers

As of May 2015, the Nest API now officially reports the hvac_state property. The value will be one of either 'heating','cooling' or 'off'.

New fields in the data model: hvac_state. You'll use hvac_state to learn if the home HVAC system is actively heating, cooling or is off.

like image 102
Dal Hundal Avatar answered Oct 29 '22 17:10

Dal Hundal


Looking at the API, they don't provide any way of identifying if the thermostat is actually heating. The closest you can get to identify is what you currently have written.

If the device itself is capable of displaying it's heating or cooling, they must have different code or different methods (such as internal electronics) for identifying that.

like image 36
DoubleYou Avatar answered Oct 29 '22 18:10

DoubleYou