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.

AeotecDW2E Class

Module: ozw

This module allows for monitoring certain elements of an Aeotec Door/Window Sensor 2nd Edition Z-Wave device.
NOTE: This is a battery powered device that spends most of it's time sleeping (sort of like a cat). This means that on initial startup, there is not enough information known about the device to reliably query anything. Use isDeviceAvailable() to test whether the device has responded to OZW 's probe request before requesting information for it.
The device information should become known once the device has awakened, either via it's configuration, or manually via the include button on the device. By default the device will never wake on it's own, so you should use the openzwave control panel or similar software to configure a periodic wakeup time.

Methods

AeotecDW2E

(
  • nodeID
)
Number

AeotecDW2E 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:

isDeviceAvailable

() Boolean

Returns true if the node (device) information has been received yet, false otherwise. A sleeping node (like this device) will not be available for monitoring until all node info has been received. This will occur once the device has been awakened and has responded to OZW 's probe request.

Returns:

Boolean:

true if the node is available, false otherwise.

isAlarmTripped

() Boolean

Return the alarm value. If the device is not available yet (see isDeviceAvailable() ), false will always be returned.

Returns:

Boolean:

true if in the tripped state, false otherwise.

isTamperTripped

() Boolean

Return the alarm's tamper switch valu. If the device is not available yet (see isDeviceAvailable() ), false will always be returned.

Returns:

Boolean:

true if in the tripped state, false otherwise.

getBatteryLevel

() Number

Return the current bettery level of the sensor as a percentage. The number returned will be between 0-100. If the device is not available yet (see isDeviceAvailable() ), 0 will always be returned.

Returns:

Number:

The Battery power level.

Properties

INDEX_Alarm

Enum INDEX_VALUES_T

INDEX_AlarmLevel

Enum INDEX_VALUES_T

INDEX_BatteryLevel

Enum INDEX_VALUES_T