UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

AeotecSDG2 Class

Module: ozw

This module allows for controlling and monitoring certain elements of an Aeotec Smart Dimmer Gen 2.

Methods

AeotecSDG2

(
  • nodeID
)
Number

AeotecSDG2 constructor

Parameters:

  • nodeID Number

    The ZWave node number of the device we are interested in. Use the ozwdump example to see what nodes you have available.

Returns:

Number:

setLevel

(
  • level
)

Set the output level of the dimmer switch. This is a value between 0 (fully off) and 99 (fully on).

Parameters:

  • level Number

    The desired output level of the dimmer switch. Valid values are between 0-99.

getLevel

() Number

Return the current output level of the dimmer switch. This will be a number between 0 (fully off) and 99 (fully on).

Returns:

Number:

the current dimmer output level.

on

()

Turn the switch fully on by setting the highest level (99). This is equivalent to calling setLevel(99).

off

()

Turn the switch off by setting the lowest level (0). This is equivalent to calling setLevel(0).

isOn

() Boolean

Check to see if the switch is on or off. Any dimmer level greater that 0 is considered 'on'.

Returns:

Boolean:

true if the dimmer switch is on, false otherwise.

update

()

Query the device and update internal state. Strictly speaking, this is not really neccessary b a device may send this data on it's own at periodic intervals. This method causes OZW to specifically query the device for it's current Energy, Watts, Volts, Current, and dimmer Level status. The device may take some time to respond.

getEnergy

() Number

Return the device's accumulated energy usage in kilo-watt-hours (kWh).

Returns:

Number:

The energy usage in kWh.

getWatts

() Number

Return the device's current power consumption in Watts.

Returns:

Number:

The current power consumption in Watts.

getVolts

() Number

Return the device's current voltage measurement in Volts.

Returns:

Number:

The volts measurement.

getCurrent

() Number

Return the device's current consumption in Amps.

Returns:

Number:

The current consumption measurement in Amps.

Properties

INDEX_Level

Enum INDEX_VALUES_T

INDEX_Energy_kWh

Enum INDEX_VALUES_T

INDEX_Power_Watts

Enum INDEX_VALUES_T

INDEX_Volts

Enum INDEX_VALUES_T

INDEX_Current

Enum INDEX_VALUES_T