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.

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 all notifications

				
					curl -L "https://your-site-name.officeclimatecontrol.net/api.cgi?username=USERNAME&password=PASSWORD&request=get&object=notification&value=name;serialNo;type;description;status"
				
			
				
					#!/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(
    'USERNAME',                       # username
    'PASSWORD',                       # password
    'your-site-name.officeclimatecontrol.net'  # website
);

# Define the attributes to retrieve (no selection specified)
my $selection = {};
my $attrlist = ['name', 'serialNo', 'type', 'description', 'status'];

# Call getAttributes to retrieve the notification data
my $result = $cc->getAttributes('notification', $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://your-site-name.officeclimatecontrol.net/api.cgi?username=USERNAME&password=PASSWORD&request=get&object=notification&value=name;serialNo;type;description;status"
try:
    response = requests.get(url, verify=True)
    if response.status_code == 200:
        print("Success:", response.text)
    else:
        print("Error: HTTP", response.status_code)
except requests.exceptions.SSLError as e:
    print("SSL Error:", str(e))
except requests.exceptions.RequestException as e:
    print("Request Error:", str(e))
				
			
				
					const https = require('https');

const url = 'https://your-site-name.officeclimatecontrol.net/api.cgi?username=USERNAME&password=PASSWORD&request=get&object=notification&value=name;serialNo;type;description;status';

https.get(url, (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>
<Notification>
<name>the hizzy</name>
<serialNo>8A4-SK7Z</serialNo>
<type>Relay</type>
<description>Room 101 (Serial No: 8A4-SK7Z) Check Economizer Controller.</description>
<status>Active</status>
...
</Notification>
<Notification>
<name>RT1-DC TCM Remote</name>
<serialNo>7A3-WDN4</serialNo>
<type>Remote Thermostat</type>
<description>RT1-DC TCM Remote Remote Thermostat S/N 7A3-WDN4 Battery Low</description>
<status>Dismissed</status>
...
</Notification>
<success>1</success>
<message>Retrieved 2 notifications.</message>
...
</result>
				
			
Table of Contents