How can we help?
Print

Categories:

OpenAPI

Notification API

Notification Attributes

UPDATED

The Notification attributes provide access to current notification statuses generated within the Pelican App. Through the Notification API, you can retrieve active notifications and update their statuses as necessary.

Predefined system-managed attributes for Notification 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 Notification 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.

Notification - Object Attributes

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

Name Values Set Description
name String N The configured name of the device.
serialNo String N The device Serial Number.
type String N The type of Notification. See table below.
status Active, Cleared, Dismissed Y The current notification status. Initially notifications are “Active”. Once the problem has been resolved at the device it will switch to “Cleared”. When the notification is “Dismissed” using the Web-App or the API it will be removed if it has already been Cleared. Otherwise it will stay Dismissed until the problem is resolved.

Note: The only set value accepted by the API is “Dismissed”.
description String N Readable description of the problem/notification.
Note on status Attribute

Notifications are initially set to Active. Once the issue has been resolved at the device level, the status changes to Cleared. If a notification is set to Dismissed using the Web-App or the API, it will be removed if it has already been cleared. Otherwise, it will remain dismissed until the problem is resolved.

Notification Types

The following table outlines the various types of notifications that can be generated within the Pelican system:​

Notification Type Description
HVAC Cooling or heating failure.
Relay Wiring module or relay pack communication.
Remote Thermostat Wireless remote temperature sensor.
status The current notification status.
Note: The only set value accepted by the API is “Dismissed”.
Remote Device Wireless remote alarm or occupancy sensor.
Zone Controller Z8 or Z24 controller
Configuration New device requires configuration.
Temperature Outside safe temperature range.
Humidity Outside safe humidity range.
Gateway Gateway communications problem.
Unreachable The device is not communicating with the Internet.
Alarm Alarm sensor notification
Subscription Site subscription notification.
Supply Temperature Outside supply temperature safe range.
Economizer Economizer operation.
Lead Lag Flow problem.
PMS Communication with the hotel PMS.

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