How can we help?
Print

Categories:

OpenAPI

Thermostat API

Thermostat Attributes

UPDATED

Thermostat attributes enable setting and retrieving configuration settings and real-time status information.

Predefined system-managed attributes for Thermostat objects, used for essential functions like temperature control, system status, and scheduling. They follow a fixed structure and cannot be renamed or redefined by users.

Reserved Attributes

User Defined Attributes

Custom attributes that users can create, set, and retrieve for Thermostat objects. Any attribute name that is not reserved is treated as user-defined. These attributes are created by assigning a value via a SET request and can be accessed using GET requests. There is no restriction on the number of user-defined attributes, allowing flexibility for custom data storage and retrieval.

User-defined attributes can also be used as selection criteria. For example, if a user wants to manage a specific group of thermostats via the API, they could define an attribute named “managed” and SET its value to “yes” for the thermostats in that group. Then, by including “managed:yes;” in their selection criteria, they can filter and control only those thermostats within the designated group.

Available Thermostat Attributes

Attribute names are not case-sensitive; attribute values are case-sensitive.​

Name Values Settable Description
name String Yes The configured name of the thermostat.
groupName String Yes The configured group name for that thermostat.
serialNo String No The thermostat's serial number. Unique factory set identifier.
system Off, Auto, Heat, Cool Yes The thermostat's active system mode
heatSetting Integer Yes The thermostat's active Heat Setting.
coolSetting Integer Yes The thermostat's active Cool Setting.
fan Auto, On Yes The thermostat's active Fan Mode.
status Occupied, Vacant Yes Normally Occupied. Vacant when vacation schedule is active.
temperature Decimal No The thermostat's current measured temperature.
humidity Integer No The thermostat's current measured humidity: % RH. Zero (0) if humidity is not supported.
humidifySetting Integer Yes The thermostat's minimum humidity setting.
dehumidifySetting Integer Yes The thermostat's maximum humidity setting.
co2Setting Integer Yes The thermostat's demand ventilation CO2 setting.
co2Level Integer No The thermostat's current measured CO2 level.
setBy Station, Remote, Schedule No Indicates how the active thermostat settings were set.
frontKeypad On, Off Yes Thermostat keypad active or locked status. On = Unlocked, Off = Locked.
outsideVentilation On, Off Yes Whether the thermostat is allowed to use Outside Ventilation.
runStatus Off, Cool-Stage1, Cool-Stage2, Heat-Stage1, Heat-Stage2, Fan, Fan2 No The currently active Fan, Heat or Cool status
statusDisplay String No Easily readable indication of what is currently active the or response “Unreachable” will be provided if the thermostat is unable to reach the Internet.
auxStatus On, Off No The thermostat's active Auxiliary Heat status.
slaves Array No List of the remote temperature sensors and devices assigned to this thermostat and their values.
description String Yes Free form thermostat description with configuration.
cycleRate Integer Yes Thermostat's c onfigured target cycle rate.
anticipationDegrees Decimal Yes Thermostat's configured anticipation degrees.
calibrationOffset Decimal Yes Thermostat's configured calibration degrees.
heatStages Integer Yes Number of configured heat stages.
coolStages Integer Yes Number of configured cool stages.
fanStages Integer Yes Number of configured fan stages.
HeatNeedsFan Yes, No Yes Enable Fan (G output) during heating.
temperatureFormat Fahrenheit, Celsius Yes Thermostat's active temperature format.
systemType Conventional, Heat Pump Yes Thermostat's configured system type.
reversingValve String Yes One of: Heat or Cool. Energizes reversing valve in this mode. Only valid for systemType of Heat Pump.
minHeatSetting Integer Yes Configured lowest allowable user settable heat set point.
maxHeatSetting Integer Yes Configured highest allowable user settable heat set point.
minCoolSetting Integer Yes Configured lowest allowable user settable cool set point.
maxCoolSetting Integer Yes Configured highest allowable user settable cool set point.
fanCirculationTime Integer Yes Configured enforced minimum minutes to run the fan across each hour.
heatingType String Yes Configured size of first stage heating system.
heating2Type String Yes Configured size of second stage heating system.
coolingType String Yes Configured size of first stage cooling system.
cooling2Type String Yes Configured size of second stage cooling system.
humidityControl String Yes One of: None, Humidify, Dehumidify, Full Control, Cool Only.
minSafeHumidity Integer Yes Lowest allowed thermostat relative humidity reading before notification is sent.
maxSafeHumidity Integer Yes Highest allowed thermostat relative humidity reading before notification is sent.
allowKeypadDisable Yes, No Yes Display the configuration Lock Keypad On/Off button in the thermostat's configuration.
weight Integer Yes Weighted value of the thermostat's temperature reading when used with Remote Sensors
notificationSensitivity String Yes One of: Off, Low, Medium, High, Custom. Note: When setting Custom notificationSetpoint and notificationUnreachable should also be set.
notificationSetpoint Integer Yes The temperature degrees from the thermostat's setpoint before sending a notification. Forces notificationSensitivity to Custom.
notificationUnreachable Yes, No Yes Send a notification if thermostat becomes unreachable for 4 hours. Forces notificationSensitivity to Custom.
minSafeTemp Integer Yes Lowest allowed thermostat temperature reading before a notification is sent.
maxSafeTemp Integer Yes Highest allowed thermostat temperature reading before a notification is sent.
gateway String No The serial number of the gateway providing Internet access to this thermostat.
version String No The thermostat's firmware version.
installDate Date/Time No ISO 8601 Formatted Date Time indicating when the thermostat was first installed at the site.
schedule On, Off, Name Yes Whether the thermostat's schedule is active or the Name of the shared schedule.
scheduleName String Yes If the thermostat is using a Shared Schedules, the name of the active schedule.
scheduleRepeat Daily, Weekday, Weekly Yes How the thermostat's schedule is set to repeat.
setback On, Off Yes Whether a temporary Demand Response setback is active.

Code Examples

GET

Get the current Temperature, Humidity, and CO2 Level for a thermostat named "Lobby"

				
					curl -Ls "https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=get&object=Thermostat&selection=name:Lobby;&value=temperature;humidity;co2Level"
				
			
				
					#!/usr/bin/perl -w

use strict;
use ClimateControl;
# You can request a copy of the ClimateControl Perl
# Module from Pelican Tech Support.
# Send an email to support@pelicanwireless.com

# Create a new ClimateControl object
my $cc = ClimateControl->new(
    'pelicandemosite@gmail.com',      # username
    'pelican',                        # password
    'demo.officeclimatecontrol.net'  # website
);

# Define the selection and attributes to retrieve
my $selection = { 'name' => 'Lobby' };
my $attrlist = ['temperature', 'humidity', 'co2Level'];

# Call getAttributes to retrieve the Thermostat data
my $result = $cc->getAttributes('Thermostat', $selection, $attrlist);

# Check and display the result
if ($result->{'success'}) {
    print "Success: $result->{'message'}\n";
} else {
    print "Error: $result->{'message'}\n";
}
				
			
				
					import requests

url = "https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=get&object=Thermostat&selection=name:Lobby;&value=temperature;humidity;co2Level"
response = requests.get(url, verify=False)

if response.status_code == 200:
    print("Success:", response.text)
else:
    print("Error:", response.status_code)
				
			
				
					const https = require('https');

const url = 'https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=get&object=Thermostat&selection=name:Lobby;&value=temperature;humidity;co2Level';

https.get(url, { rejectUnauthorized: false }, (resp) => {
  let data = '';

  // Collect data chunks
  resp.on('data', (chunk) => {
    data += chunk;
  });

  // Handle the complete response
  resp.on('end', () => {
    if (resp.statusCode === 200) {
      console.log('Success:', data);
    } else {
      console.log('Error: HTTP', resp.statusCode);
    }
  });
}).on('error', (err) => {
  console.error('Error:', err.message);
});
				
			

Response

				
					<result>
<Thermostat>
<temperature>71.5</temperature>
<humidity>40</humidity>
<co2Level>1049</co2Level>
...
</Thermostat>
<success>1</success>
<message>Retrieved attributes for 1 thermostats.</message>
...
</result>
				
			

SET

Set the Heating and Cooling Ranges for the thermostat named "Lobby"

				
					curl -Ls "https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=set&object=Thermostat&selection=name:Lobby;&value=heatMin:50;heatMax:68;coolMin:72;coolMax:85"
				
			
				
					#!/usr/bin/perl -w

use strict;
use ClimateControl;
# You can request a copy of the ClimateControl Perl
# Module from Pelican Tech Support.
# Send an email to support@pelicanwireless.com

# Create a new ClimateControl object
my $cc = ClimateControl->new(
    'pelicandemosite@gmail.com',      # username
    'pelican',                        # password
    'demo.officeclimatecontrol.net'  # website
);

# Define the selection and values as hashes
my $selection = { 'name' => 'Lobby' };
my $values = {
    'heatMin' => '50',
    'heatMax' => '68',
    'coolMin' => '72',
    'coolMax' => '85'
};

# Call setAttributes to update the Thermostat
my $result = $cc->setAttributes('Thermostat', $selection, $values);

# Check and display the result
if ($result->{'success'}) {
    print "Success: $result->{'message'}\n";
} else {
    print "Error: $result->{'message'}\n";
}
				
			
				
					import requests

url = "https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=set&object=Thermostat&selection=name:Lobby;&value=heatMin:50;heatMax:68;coolMin:72;coolMax:85"
response = requests.get(url, verify=False)

if response.status_code == 200:
    print("Success:", response.text)
else:
    print("Error:", response.status_code)
				
			
				
					const https = require('https');

const url = 'https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=set&object=Thermostat&selection=name:Lobby;&value=heatMin:50;heatMax:68;coolMin:72;coolMax:85';

https.get(url, { rejectUnauthorized: false }, (resp) => {
  let data = '';

  // Collect data chunks
  resp.on('data', (chunk) => {
    data += chunk;
  });

  // Handle the complete response
  resp.on('end', () => {
    if (resp.statusCode === 200) {
      console.log('Success:', data);
    } else {
      console.log('Error: HTTP', resp.statusCode);
    }
  });
}).on('error', (err) => {
  console.error('Error:', err.message);
});
				
			

Response

				
					<result>
<success>1</success>
<message>Updated 1 thermostats.</message>
...
</result>
				
			
Table of Contents