How can we help?
Print

Categories:

OpenAPI

Power Control Module API

PowerOutput Attributes

UPDATED

The PowerOutput attributes enable you to control and monitor the active statuses of the relays in Pelican’s Power Control Modules (PM5 Series). Each module is equipped with five (5) output relays, allowing for versatile management of connected electrical devices.​

Predefined system-managed attributes for PowerOutput objects, used for essential functions of the Power Control Module.. 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 PowerOutput objects. These are custom attributes that users can create, set, and retrieve. Any attribute name not reserved is treated as user-defined. To define a new attribute, assign it a value through a SET request. Once set, these attributes can be accessed using GET requests. There is no restriction on the number of user-defined attributes or their values. User-defined attributes can also be utilized as part of the selection criteria. For example, to manage a group of devices through the API, you could define an attribute named SpecialGroup and set its value to Group1 for the desired power relays. Then, by including SpecialGroup:Group1; in your selection criteria, you can target that specific group of power outputs.

PowerOutput - Object Attributes

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

Name Values Settable Description
name String Yes The configured name of the output relay.
groupName String Yes The configured group name of the output relay.
serialNo String No The Power Control Module serial number.
output On, Off Yes The active output status.
setBy Station, Remote, Schedule No Indicates how the active output was set.
schedule On, Off Yes This is a Set only attribute and enables/disables the schedule.

Code Examples

GET

Set the Schedule to ON for the PM5 Relay named "Bld B Int Lights"

				
					curl -Ls "https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=get&object=PowerOutput&selection=name:Bld%20B%20Int%20Lights&value=output"
				
			
				
					#!/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

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

# Define the selection and attributes to retrieve
my $selection = { 'name' => 'Bld B Int Lights' };
my $attrlist = ['output'];  # List of attributes to get

# Call getAttributes to retrieve the PowerOutput data
my $result = $cc->getAttributes('PowerOutput', $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=PowerOutput&selection=name:Bld%20B%20Int%20Lights&value=output"
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=PowerOutput&selection=name:Bld%20B%20Int%20Lights&value=output';

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>
<PowerOutput>
<output>Off</output>
...
</PowerOutput>
<success>1</success>
<message>Retrieved attributes for 1 power devices.</message>
...
</result>
				
			

SET

Set the Schedule to ON for the PM5 Relay named "Bld B Int Lights"

				
					curl -Ls "https://demo.officeclimatecontrol.net/api.cgi?username=pelicandemosite@gmail.com&password=pelican&request=set&object=PowerOutput&selection=name:Bld%20B%20Int%20Lights&value=Schedule:On"
				
			
				
					#!/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

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

# Define the selection and values as hashes
my $selection = { 'name' => 'Bld B Int Lights' };
my $values = { 'Schedule' => 'On' };

# Call setAttributes to update the PowerOutput
my $result = $cc->setAttributes('PowerOutput', $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=PowerOutput&selection=name:Bld%20B%20Int%20Lights&value=Schedule:On"
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=PowerOutput&selection=name:Bld%20B%20Int%20Lights&value=Schedule:On';

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 power devices.</message>
...
</result>
				
			
Table of Contents