ZWave events
The ZWave addon notifies a script subscribed by zwave.subscribe( "script_name" )
about state of the ZWave world.
Structure of an event is table.
Type of events:
module_reset - gets sent if a ZWave chip has been restored to factory default
{
event = "module_reset"
status = "started"
}
fields | type | description |
---|---|---|
event | string | type of an event |
status | string | actual event status |
include_invoked - gets sent to notify of device inclusion operation tried to start. This event is initiated before the start_include method
{
event = "include_invoked"
}
fields | type | description |
---|---|---|
event | string | type of an event |
include_started - gets sent to notify of device inclusion operation start. This event is initiated by the start_include method
{
event = "include_started"
}
fields | type | description |
---|---|---|
event | string | type of an event |
include_finished - gets sent to notify of device inclusion operation completion. This event is initiated by the start_include method
{
event = "include_finished"
}
fields | type | description |
---|---|---|
event | string | type of an event |
include_finished_error - gets sent to notify of device inclusion operation failed. This event is initiated by the start_include method
{
event = "include_finished_error"
}
fields | type | description |
---|---|---|
event | string | type of an event |
include_finished_timeout - gets sent to notify of device inclusion operation took a lot of time. This event is initiated by the start_include method
{
event = "include_finished_timeout"
}
fields | type | description |
---|---|---|
event | string | type of an event |
include_device_progress - gets sent if a ZWave device inclusion progress changed
{
event = "include_device_progress"
value = 50
}
fields | type | description |
---|---|---|
event | string | type of an event |
value | int | progress in percents (0-100) |
exclude_invoked - gets sent to notify of device exclusion operation tried to start. This event is initiated before the start_exclude method
{
event = "exclude_invoked"
}
fields | type | description |
---|---|---|
event | string | type of an event |
exclude_started - gets sent to notify of device exclusion operation start. This event is initiated by the start_exclude method
{
event = "exclude_started"
}
fields | type | description |
---|---|---|
event | string | type of an event |
exclude_finished - gets sent to notify of device exclusion operation completion. This event is initiated by the start_exclude method
{
event = "exclude_finished"
}
fields | type | description |
---|---|---|
event | string | type of an event |
exclude_finished_error - gets sent to notify of device exclusion operation failed. This event is initiated by the start_exclude method
{
event = "exclude_finished_error"
}
fields | type | description |
---|---|---|
event | string | type of an event |
exclude_finished_timeout - gets sent to notify of device exclusion operation took a lot of time. This event is initiated by the start_exclude method
{
event = "exclude_finished_timeout"
}
fields | type | description |
---|---|---|
event | string | type of an event |
learn_invoked - gets sent to notify of device learning mode tried to start. This event is initiated by the start_learn method
{
event = "learn_invoked"
}
fields | type | description |
---|---|---|
event | string | type of an event |
learn_started - gets sent to notify of device learning mode start. This event is initiated by the start_learn method
{
event = "learn_started"
}
fields | type | description |
---|---|---|
event | string | type of an event |
learn_show_key - gets sent to show a controller dsk key to pass authentication on a remote(including) side. This event gets sent only if remote controller didn't choose an unauthenticated
mode (authentication modes). This event is initiated by the start_learn method.
{
event = "learn_show_key"
}
fields | type | description |
---|---|---|
event | string | type of an event |
key | array of ints | a dsk key as an array of ints containing representation of two-byte values |
learn_progress - gets sent to notify progress of learn mode or, in other words, 'their' network devices interview progress. This event gets sent only if a learning network has at least one device, except a main(remote) controller. This event is initiated by the start_learn method
{
event = "learn_progress"
}
fields | type | description |
---|---|---|
event | string | type of an event |
devices | string | amount of devices in a network we're learning |
current | string | index of a current including device |
status | string | status token |
learn_finished - gets sent to notify of device learning mode completion. This event is initiated by the start_learn method
{
event = "learn_finished"
}
fields | type | description |
---|---|---|
event | string | type of an event |
learn_finished_error - gets sent to notify of device learning mode failed. This event is initiated by the start_learn method
{
event = "learn_finished_error"
}
fields | type | description |
---|---|---|
event | string | type of an event |
learn_finished_timeout - gets sent to notify of device learning mode took a lot of time. This event is initiated by the start_learn method
{
event = "learn_finished_timeout"
}
fields | type | description |
---|---|---|
event | string | type of an event |
action_busy - gets sent to notify that addon can not run new request, because it is busy by other action.
{
event = "action_busy",
action_type = "include_starting"
}
fields | type | description |
---|---|---|
event | string | type of an event |
action_type | string | actual action, which is running |
binary_sensor_value_updated - gets sent to notify that binary sensor value has been changed
{
event = "binary_sensor_value_updated",
node_id = 1,
class_id = 48,
channel_id = 0,
value = 1,
sensor_type = 5
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | ZWave command class id (always 48 for this type of event) |
channel_id | int | channel id |
value | uint | 0 or 1 (meaning depends on sensor type) |
sensor_type | uint | binary sensor type according to ZWave specification |
configuration_value_updated - result of configuration value request (see request_configuration_value api)
{
event = "configuration_value_updated",
node_id = 1,
class_id = 48,
channel_id = 0,
parameter_num = 1,
parameter_size = 2,
value = 1
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | ZWave command class id (always 112 for this type of event) |
channel_id | int | channel id |
parameter_num | uint | configuration parameter number |
parameter_size | uint | configuration parameter value size |
value | uint | value of configuration parameter |
configuration_request_status_updated - status of the set_configuration_value request
{
event = "configuration_request_status_updated",
node_id = 1,
parameter_num = 1,
status = "synced"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
parameter_num | uint | configuration parameter number |
status | string | value of configuration parameter |
door_lock_state_updated - gets sent to notify that door lock state was updated
{
event = "door_lock_state_updated",
node_id = 1,
channel_id = 0,
door_mode = "unsecured",
door_condition = {
latch_state = "latch_open",
bolt_state = "bolt_unlocked",
door_state = "door_open"
}
}
fields | type | required | description |
---|---|---|---|
event | string | + | type of an event |
node_id | int | + | a unique id of a ZWave device within a Zwave network |
channel_id | int | + | channel id |
door_lock_mode | string | + | actual door lock mode |
lock_timeout | int | - | time in seconds before the doorlock will automatically be changed to "secured" mode |
target_door_lock_mode | string | - | following door lock mode (4+ cc version) |
target_door_lock_mode_timeout | string | - | time in seconds before the doorlock will automatically be changed to target_door_lock_mode (4+ cc version) |
enabled_inside_door_handle_ids | array of int | + | list of inside handle ids (1 .. 4) that can be locked locally |
enabled_outside_door_handle_ids | array of int | + | list of outside handle ids (1 .. 4) that can be locked locally |
door_condition.latch_state | string | + | actual latch state |
door_condition.bolt_state | string | + | actual bolt state |
door_condition.door_state | string | + | actual door state |
door_lock_configuration_updated - gets sent to notify that door lock configuration was updated
{
event = "door_lock_configuration_updated",
node_id = 1,
channel_id = 0,
configuration = {
inside_handle_ids = { 1 },
outside_handle_ids = { 1 },
lock_timeout = 20,
auto_relock_timeout = 30,
hold_and_release_timeout = 40,
twist_assist_enabled = true,
block_to_block_enabled = true
}
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
channel_id | int | channel id |
value | table | configuration table |
multilevel_sensor_value_updated - gets sent to notify that multilevel sensor value has been changed
{
event = "multilevel_sensor_value_updated",
node_id = 1,
class_id = 49,
channel_id = 0,
value = 10,
scale = "lux",
sensor_type = "illuminance"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | ZWave command class id (always 49 for this type of event) |
channel_id | int | channel id |
value | float | value |
scale | string | value scale (one of supported for current item value type) |
sensor_type | string | multilevel sensor type according to ZWave specification |
node_added - gets sent if a new ZWave device has been included
{
event = "node_added",
node_id = 2
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
reachable_state_updated - gets sent if a ZWave device reachable state has been changed
{
event = "reachable_state_updated",
node_id = 2,
value = true
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
value | bool | true if ZWave device is reachable, false otherwise |
s2_select_authentication_modes - gets sent to informs about starting of S2 flow and propose available authentication modes
{
event = "s2_select_authentication_modes",
modes = { "accessControl", "authenticated", "unauthenticated" }
}
fields | type | description |
---|---|---|
event | string | type of an event |
modes | table | an array of available authentication modes |
List of possible authentication modes:
Mode | description |
---|---|
accessControl | S2 Access Control |
authenticated | S2 Authenticated |
unauthenticated | S2 Unauthenticated |
s0 | S0 |
clientSide | Client-side authentication |
s2_show_device_side_key - gets sent to show device side key
{
event = "s2_show_device_side_key",
key = { 58975, 37056 }
}
fields | type | description |
---|---|---|
event | string | type of an event |
key | table | an array of 2 items device specific key |
s2_request_device_specific_key - gets sent to request device specific key
{
event = "s2_request_device_specific_key",
key = { 58975, 37056, 29754, 11588, 18902, 12511, 34338 }
}
fields | type | description |
---|---|---|
event | string | type of an event |
key | table | an array of 7 items device specific key (public part) |
node_removed - gets sent if a ZWave device has been excluded from hub network
{
event = "node_removed",
node_id = 2,
manufacturedId = 134,
productId = 2,
productType = 10
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | |
manufacturedId | int | |
productId | int | |
productType | int |
unknown_node_removed - gets sent if a unknown ZWave device has been excluded from another network
{
event = "unknown_node_removed"
}
fields | type | description |
---|---|---|
event | string | type of an event |
value_updated - gets sent if a pcp value has been changed
{
event = "value_updated",
node_id = 2,
class_id = 37,
channel_id = 0,
value = 0
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | |
value | int |
token_value_updated - gets sent if a pcp token value has been changed
{
event = "token_value_updated",
node_id = 2,
class_id = 37,
channel_id = 0,
value = "token"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | channel id |
value | string | token value |
user_code_updated - result of user code request (see request_user_code api)
{
event = "user_code_updated",
node_id = 2,
channel_id = 0,
user_id = 2,
supported_users_count = 250,
userIdStatus = "available",
user_polling_status = "polling",
user_code = "5482"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
channel_id | int | channel id |
user_id | int | user id (from 1 to number of supported users) |
supported_users_count | int | user id's count (from 1 to 250) |
userIdStatus | string | actual user id status |
user_polling_status | string | actual user polling status |
user_code | string | user code (empty or min 4 digits code) |
master_code_updated - result of master code request (see request_master_code api)
{
event = "master_code_updated",
node_id = 2,
channel_id = 0,
value = "1111"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
channel_id | int | channel id |
value | string | master code |
user_codes_keypad_mode_updated - result of user codes keypad mode request (see request_user_codes_keypad_mode api)
{
event = "user_codes_keypad_mode_updated",
node_id = 2,
channel_id = 0,
value = "normal"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
channel_id | int | channel id |
value | string | keypad mode |
user_codes_checksum_updated - result of user codes checksum request (see request_user_codes_checksum api)
{
event = "user_codes_checksum_updated",
node_id = 2,
channel_id = 0,
value = 33971
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
channel_id | int | channel id |
value | int | checksum of all user code ids, codes and statuses (16 bit). The checksum must be calculated using the CRC-CCITT polynomium using initialization value equal to 0x1D0F and 0x1021 (normal representation). |
thermostat_setpoint_value_updated - gets sent if a thermostat setpoint value has been changed
{
event = "thermostat_setpoint_value_updated",
node_id = 2,
class_id = 67,
channel_id = 0,
type = 1,
scale = 0,
value = 11
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | |
type | int | type of an setpoint |
scale | int | temperature scale |
value | int | actual setpoint value |
thermostat_operating_state_value_updated - gets sent if a thermostat operating state value has been changed
{
event = "thermostat_operating_state_value_updated",
node_id = 2,
class_id = 66,
channel_id = 0,
value = "heating"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | |
value | string | actual operating state |
float_value_updated - gets sent if a float pcp value has been changed
{
event = "float_value_updated",
node_id = 2,
class_id = 37,
channel_id = 0,
type = "electric",
scale = "volt",
value = 0,
precision = 3
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | |
type | string | type of metering physical unit |
scale | string | a measurement unit |
value | int | |
precision | int | a number of decimal places of the value |
button_state_updated - gets sent if a pcp button state has been changed
{
event = "button_state_updated",
node_id = 2,
class_id = 37,
channel_id = 0,
button_id = 1,
value = "press_1_time"
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | channel id |
button_id | int | button id |
value | string | button state |
association_updated - gets sent if a pcp association group nodes have been changed
{
event = "association_updated",
node_id = 2,
class_id = 58,
channel_id = 0,
group_id = 1,
group_nodes = [ {node_id = 1, endpoint_id = 0} ]
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | channel id |
group_id | int | id of association group |
group_nodes | table | array of endpoints in group(node_id and endpoint_id for each endpoint) |
scene_activated - gets sent if a scene activeted using scene controller
{
event = "scene_activated",
node_id = 2,
class_id = 43,
channel_id = 0,
scene_id = 1
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | channel id |
scene_id | int | scene id |
example: (event_handling.lua)
local params = ...
if params.event == "node_added" then
print( "we got a node_added event for a " .. params.node_id .. " device" )
elseif params.event == "value_updated" then
print( "we got a value_updated event, pcp: " .. to_string( params.class_id ) + to_string( params.channel_id ) )
end
hail - gets sent if a hail has been received
{
event = "hail",
node_id = 2,
class_id = 130
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
alarm_sensor_value_updated - gets sent if alarm sensor value has been changed
{
event = "alarm_sensor_value_updated",
node_id = 2,
class_id = 156,
channel_id = 0,
sensor_type = "water_alarm",
value = 255,
delay = 0
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | class_id + channel_id construct a unique id of a pcp for a ZWave device |
channel_id | int | |
sensor_type | string | One of alarm sensor types |
value | int | alarm sensor value. 0 - no alarm; 255 - alarm; 1-100 - severity in percents. |
delay | int | indicates time in seconds the remote alarm must be active since last received report |
week_day_entry_lock_schedule_updated - gets sent if week day entry lock schedule updated (or removed)
{
event = "week_day_entry_lock_schedule_updated",
node_id = 2,
class_id = 78,
channel_id = 0,
value =
{
weekDay = "monday",
startHour = 11,
startMinute = 20,
stopHour = 14,
stopMinute = 10
}
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | |
channel_id | int | |
user_id | int | id of user ( see user code cc for details ) |
slot_id | int | |
value | table | object of type, optional |
daily_repeating_entry_lock_schedule_updated - - gets sent if daily repeating entry lock schedule updated (or removed)
{
event = "daily_repeating_entry_lock_schedule_updated",
node_id = 2,
class_id = 78,
channel_id = 0,
user_id = 3,
slot_id = 1,
value =
{
weekDays = { "monday", "friday" },
startHour = 11,
startMinute = 20,
durationHour = 14,
durationMinute = 50
}
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | |
channel_id | int | |
user_id | int | id of user ( see user code cc for details ) |
slot_id | int | |
value | table | object of type, optional |
year_day_entry_lock_schedule_updated - - gets sent if year day entry lock schedule updated (or removed)
{
event = "year_day_entry_lock_schedule_updated",
node_id = 2,
class_id = 78,
channel_id = 0,
user_id = 3,
slot_id = 1,
value =
{
startYear = 2019,
startMonth = 1,
startDay = 10,
startHour = 23,
startMinute = 1,
stopYear = 2019,
stopMonth = 2,
stopDay = 10,
stopHour = 23,
stopMinute = 1
}
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | |
channel_id | int | |
user_id | int | id of user ( see user code cc for details ) |
slot_id | int | |
value | table | object of type, optional |
sound_switch_configuration_updated - - gets sent if sound switch configuration is changed
{
event = "sound_switch_configuration_updated",
node_id = 2,
class_id = 78,
channel_id = 0,
default_tone_id = 1,
volume = 100
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | |
channel_id | int | |
default_tone_id | int | |
volume | int |
sound_switch_tone_play_updated - - gets sent if sound switch tone being played is changed
{
event = "sound_switch_tone_play_updated",
node_id = 2,
class_id = 78,
channel_id = 0,
tone_id = 1,
volume = 100
}
fields | type | description |
---|---|---|
event | string | type of an event |
node_id | int | a unique id of a ZWave device within a Zwave network |
class_id | int | |
channel_id | int | |
tone_id | int | |
volume | int |