zwave-js-server-python 0.58.0__py3-none-any.whl → 0.59.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zwave_js_server/const/__init__.py +3 -3
- zwave_js_server/const/command_class/lock.py +1 -0
- zwave_js_server/const/command_class/multilevel_sensor.py +107 -107
- zwave_js_server/const/command_class/notification.py +60 -42
- zwave_js_server/event.py +1 -1
- zwave_js_server/model/controller/event_model.py +3 -3
- zwave_js_server/model/endpoint.py +30 -44
- zwave_js_server/model/node/__init__.py +13 -2
- zwave_js_server/util/lock.py +24 -4
- {zwave_js_server_python-0.58.0.dist-info → zwave_js_server_python-0.59.0.dist-info}/METADATA +1 -1
- {zwave_js_server_python-0.58.0.dist-info → zwave_js_server_python-0.59.0.dist-info}/RECORD +15 -15
- {zwave_js_server_python-0.58.0.dist-info → zwave_js_server_python-0.59.0.dist-info}/WHEEL +1 -1
- {zwave_js_server_python-0.58.0.dist-info → zwave_js_server_python-0.59.0.dist-info}/LICENSE +0 -0
- {zwave_js_server_python-0.58.0.dist-info → zwave_js_server_python-0.59.0.dist-info}/entry_points.txt +0 -0
- {zwave_js_server_python-0.58.0.dist-info → zwave_js_server_python-0.59.0.dist-info}/top_level.txt +0 -0
@@ -16,7 +16,7 @@ CC_SPECIFIC_NOTIFICATION_TYPE = "notificationType"
|
|
16
16
|
class NotificationType(IntEnum):
|
17
17
|
"""Enum for known notification types."""
|
18
18
|
|
19
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
19
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
20
20
|
UNKNOWN = -1
|
21
21
|
ACCESS_CONTROL = 6
|
22
22
|
APPLIANCE = 12
|
@@ -58,9 +58,10 @@ class NotificationEventValue(IntEnum):
|
|
58
58
|
class AccessControlNotificationEvent(NotificationEvent):
|
59
59
|
"""Enum for known access control notification event."""
|
60
60
|
|
61
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
61
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
62
62
|
UNKNOWN = -1
|
63
63
|
ALL_USER_CODES_DELETED = 12
|
64
|
+
ALL_USERS_DELETED = 37
|
64
65
|
AUTO_LOCK_LOCKED_OPERATION = 9
|
65
66
|
AUTO_LOCK_NOT_FULLY_LOCKED_OPERATION = 10
|
66
67
|
BARRIER_BATTERY_STATUS_BARRIER_SENSOR_LOW_BATTERY_WARNING = 74
|
@@ -78,10 +79,17 @@ class AccessControlNotificationEvent(NotificationEvent):
|
|
78
79
|
)
|
79
80
|
BARRIER_UNABLE_TO_PERFORM_REQUESTED_OPERATION_DUE_TO_UL_REQUIREMENTS = 68
|
80
81
|
BARRIER_VACATION_MODE = 71
|
82
|
+
CREDENTIAL_ADDED = 43
|
83
|
+
CREDENTIAL_DELETED = 45
|
84
|
+
CREDENTIAL_LOCK_OPEN_OPERATION = 35
|
85
|
+
CREDENTIAL_MODIFIED = 44
|
86
|
+
CREDENTIAL_UNCHANGED = 46
|
87
|
+
CREDENTIAL_UNLOCK_CLOSE_OPERATION = 36
|
81
88
|
DOOR_HANDLE_STATE_WINDOW_DOOR_HANDLE_IS_CLOSED = 25
|
82
89
|
DOOR_HANDLE_STATE_WINDOW_DOOR_HANDLE_IS_OPEN = 24
|
83
90
|
DOOR_STATE_WINDOW_DOOR_IS_CLOSED = 23
|
84
91
|
DOOR_STATE_WINDOW_DOOR_IS_OPEN = 22
|
92
|
+
INVALID_CREDENTIAL_USED = 50
|
85
93
|
KEYPAD_LOCK_OPERATION = 5
|
86
94
|
KEYPAD_STATE_KEYPAD_BUSY = 17
|
87
95
|
KEYPAD_STATE_KEYPAD_TEMPORARY_DISABLED = 16
|
@@ -94,15 +102,24 @@ class AccessControlNotificationEvent(NotificationEvent):
|
|
94
102
|
MANUAL_UNLOCK_OPERATION = 2
|
95
103
|
MANUALLY_ENTER_USER_ACCESS_CODE_EXCEEDS_CODE_LIMIT = 19
|
96
104
|
MESSAGING_USER_CODE_ENTERED_VIA_KEYPAD = 32
|
105
|
+
MULTIPLE_CREDENTIALS_DELETED = 38
|
97
106
|
NEW_PROGRAM_CODE_ENTERED_UNIQUE_CODE_FOR_LOCK_CONFIGURATION = 18
|
98
107
|
NEW_USER_CODE_ADDED = 14
|
99
108
|
NEW_USER_CODE_NOT_ADDED_DUE_TO_DUPLICATE_CODE = 15
|
109
|
+
NON_ACCESS_CREDENTIAL_ENTERED_VIA_LOCAL_INTERFACE = 51
|
100
110
|
RF_LOCK_OPERATION = 3
|
101
111
|
RF_NOT_FULLY_LOCKED_OPERATION = 8
|
102
112
|
RF_UNLOCK_OPERATION = 4
|
103
113
|
SINGLE_USER_CODE_DELETED = 13
|
104
114
|
UNLOCK_BY_RF_WITH_INVALID_USER_CODE = 20
|
105
115
|
UNLOCK_OPERATION_WITH_USER_CODE = 34
|
116
|
+
USER_ADDED = 39
|
117
|
+
USER_DELETED = 41
|
118
|
+
USER_MODIFIED = 40
|
119
|
+
USER_UNCHANGED = 42
|
120
|
+
VALID_CREDENTIAL_ACCESS_DENIED_NOT_ENOUGH_CREDENTIALS_ENTERED = 49
|
121
|
+
VALID_CREDENTIAL_ACCESS_DENIED_SCHEDULE_INACTIVE = 48
|
122
|
+
VALID_CREDENTIAL_ACCESS_DENIED_USER_ACTIVE_STATE_SET_TO_OCCUPIED_DISABLED = 47
|
106
123
|
|
107
124
|
@classmethod
|
108
125
|
def _missing_(
|
@@ -117,7 +134,7 @@ class BarrierPerformingInitializationProcessNotificationEventValue(
|
|
117
134
|
):
|
118
135
|
"""Enum for known barrier performing initialization process notification event value."""
|
119
136
|
|
120
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
137
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
121
138
|
UNKNOWN = -1
|
122
139
|
PERFORMING_PROCESS = 255
|
123
140
|
PROCESS_COMPLETED = 0
|
@@ -133,7 +150,7 @@ class BarrierPerformingInitializationProcessNotificationEventValue(
|
|
133
150
|
class BarrierSafetyBeamObstacleNotificationEventValue(NotificationEventValue):
|
134
151
|
"""Enum for known barrier safety beam obstacle notification event value."""
|
135
152
|
|
136
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
153
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
137
154
|
UNKNOWN = -1
|
138
155
|
NO_OBSTRUCTION = 0
|
139
156
|
OBSTRUCTION = 255
|
@@ -149,7 +166,7 @@ class BarrierSafetyBeamObstacleNotificationEventValue(NotificationEventValue):
|
|
149
166
|
class BarrierVacationModeNotificationEventValue(NotificationEventValue):
|
150
167
|
"""Enum for known barrier vacation mode notification event value."""
|
151
168
|
|
152
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
169
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
153
170
|
UNKNOWN = -1
|
154
171
|
MODE_DISABLED = 0
|
155
172
|
MODE_ENABLED = 255
|
@@ -165,7 +182,7 @@ class BarrierVacationModeNotificationEventValue(NotificationEventValue):
|
|
165
182
|
class DoorStateWindowDoorIsOpenNotificationEventValue(NotificationEventValue):
|
166
183
|
"""Enum for known door state window/door is open notification event value."""
|
167
184
|
|
168
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
185
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
169
186
|
UNKNOWN = -1
|
170
187
|
WINDOW_DOOR_IS_OPEN_IN_REGULAR_POSITION = 0
|
171
188
|
WINDOW_DOOR_IS_OPEN_IN_TILT_POSITION = 1
|
@@ -181,7 +198,7 @@ class DoorStateWindowDoorIsOpenNotificationEventValue(NotificationEventValue):
|
|
181
198
|
class ApplianceNotificationEvent(NotificationEvent):
|
182
199
|
"""Enum for known appliance notification event."""
|
183
200
|
|
184
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
201
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
185
202
|
UNKNOWN = -1
|
186
203
|
APPLIANCE_STATUS_BOILING = 8
|
187
204
|
APPLIANCE_STATUS_DRAINING = 14
|
@@ -216,7 +233,7 @@ class ApplianceNotificationEvent(NotificationEvent):
|
|
216
233
|
class ClockNotificationEvent(NotificationEvent):
|
217
234
|
"""Enum for known clock notification event."""
|
218
235
|
|
219
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
236
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
220
237
|
UNKNOWN = -1
|
221
238
|
TIME_REMAINING = 3
|
222
239
|
TIMER_ENDED = 2
|
@@ -231,7 +248,7 @@ class ClockNotificationEvent(NotificationEvent):
|
|
231
248
|
class CoAlarmNotificationEvent(NotificationEvent):
|
232
249
|
"""Enum for known co alarm notification event."""
|
233
250
|
|
234
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
251
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
235
252
|
UNKNOWN = -1
|
236
253
|
ALARM_STATUS_ALARM_SILENCED = 6
|
237
254
|
MAINTENANCE_STATUS_REPLACEMENT_REQUIRED = 4
|
@@ -250,7 +267,7 @@ class CoAlarmNotificationEvent(NotificationEvent):
|
|
250
267
|
class TestStatusCarbonMonoxideTestNotificationEventValue(NotificationEventValue):
|
251
268
|
"""Enum for known test status carbon monoxide test notification event value."""
|
252
269
|
|
253
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
270
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
254
271
|
UNKNOWN = -1
|
255
272
|
TEST_FAILED = 2
|
256
273
|
TEST_OK = 1
|
@@ -266,7 +283,7 @@ class TestStatusCarbonMonoxideTestNotificationEventValue(NotificationEventValue)
|
|
266
283
|
class Co2AlarmNotificationEvent(NotificationEvent):
|
267
284
|
"""Enum for known co2 alarm notification event."""
|
268
285
|
|
269
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
286
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
270
287
|
UNKNOWN = -1
|
271
288
|
ALARM_STATUS_ALARM_SILENCED = 6
|
272
289
|
MAINTENANCE_STATUS_REPLACEMENT_REQUIRED = 4
|
@@ -287,7 +304,7 @@ class Co2AlarmNotificationEvent(NotificationEvent):
|
|
287
304
|
class TestStatusCarbonDioxideTestNotificationEventValue(NotificationEventValue):
|
288
305
|
"""Enum for known test status carbon dioxide test notification event value."""
|
289
306
|
|
290
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
307
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
291
308
|
UNKNOWN = -1
|
292
309
|
TEST_FAILED = 2
|
293
310
|
TEST_OK = 1
|
@@ -303,7 +320,7 @@ class TestStatusCarbonDioxideTestNotificationEventValue(NotificationEventValue):
|
|
303
320
|
class EmergencyAlarmNotificationEvent(NotificationEvent):
|
304
321
|
"""Enum for known emergency alarm notification event."""
|
305
322
|
|
306
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
323
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
307
324
|
UNKNOWN = -1
|
308
325
|
CONTACT_FIRE_SERVICE = 2
|
309
326
|
CONTACT_MEDICAL_SERVICE = 3
|
@@ -320,7 +337,7 @@ class EmergencyAlarmNotificationEvent(NotificationEvent):
|
|
320
337
|
class GasAlarmNotificationEvent(NotificationEvent):
|
321
338
|
"""Enum for known gas alarm notification event."""
|
322
339
|
|
323
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
340
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
324
341
|
UNKNOWN = -1
|
325
342
|
ALARM_STATUS_GAS_ALARM_TEST = 5
|
326
343
|
COMBUSTIBLE_GAS_STATUS_COMBUSTIBLE_GAS_DETECTED = 2
|
@@ -340,7 +357,7 @@ class GasAlarmNotificationEvent(NotificationEvent):
|
|
340
357
|
class HeatAlarmNotificationEvent(NotificationEvent):
|
341
358
|
"""Enum for known heat alarm notification event."""
|
342
359
|
|
343
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
360
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
344
361
|
UNKNOWN = -1
|
345
362
|
ALARM_STATUS_ALARM_SILENCED = 9
|
346
363
|
ALARM_STATUS_HEAT_ALARM_TEST = 7
|
@@ -367,7 +384,7 @@ class HeatAlarmNotificationEvent(NotificationEvent):
|
|
367
384
|
class HomeHealthNotificationEvent(NotificationEvent):
|
368
385
|
"""Enum for known home health notification event."""
|
369
386
|
|
370
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
387
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
371
388
|
UNKNOWN = -1
|
372
389
|
FALL_DETECTED = 12
|
373
390
|
POSITION_STATUS_LEAVING_BED = 1
|
@@ -393,7 +410,7 @@ class HomeHealthNotificationEvent(NotificationEvent):
|
|
393
410
|
class SleepApneaStatusSleepApneaDetectedNotificationEventValue(NotificationEventValue):
|
394
411
|
"""Enum for known sleep apnea status sleep apnea detected notification event value."""
|
395
412
|
|
396
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
413
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
397
414
|
UNKNOWN = -1
|
398
415
|
LOW_BREATH = 1
|
399
416
|
NO_BREATH_AT_ALL = 2
|
@@ -411,7 +428,7 @@ class VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue(
|
|
411
428
|
):
|
412
429
|
"""Enum for known voc level status volatile organic compound level notification event value."""
|
413
430
|
|
414
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
431
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
415
432
|
UNKNOWN = -1
|
416
433
|
CLEAN = 1
|
417
434
|
HIGHLY_POLLUTED = 4
|
@@ -431,7 +448,7 @@ class VocLevelStatusVolatileOrganicCompoundLevelNotificationEventValue(
|
|
431
448
|
class HomeMonitoringNotificationEvent(NotificationEvent):
|
432
449
|
"""Enum for known home monitoring notification event."""
|
433
450
|
|
434
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
451
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
435
452
|
UNKNOWN = -1
|
436
453
|
HOME_OCCUPANCY_STATUS_HOME_OCCUPIED = 2
|
437
454
|
HOME_OCCUPANCY_STATUS_HOME_OCCUPIED_LOCATION_PROVIDED = 1
|
@@ -447,7 +464,7 @@ class HomeMonitoringNotificationEvent(NotificationEvent):
|
|
447
464
|
class HomeSecurityNotificationEvent(NotificationEvent):
|
448
465
|
"""Enum for known home security notification event."""
|
449
466
|
|
450
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
467
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
451
468
|
UNKNOWN = -1
|
452
469
|
COVER_STATUS_TAMPERING_PRODUCT_COVER_REMOVED = 3
|
453
470
|
GLASS_BREAKAGE = 6
|
@@ -473,7 +490,7 @@ class HomeSecurityNotificationEvent(NotificationEvent):
|
|
473
490
|
class IrrigationNotificationEvent(NotificationEvent):
|
474
491
|
"""Enum for known irrigation notification event."""
|
475
492
|
|
476
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
493
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
477
494
|
UNKNOWN = -1
|
478
495
|
DEVICE_CONFIGURATION_STATUS_DEVICE_IS_NOT_CONFIGURED = 5
|
479
496
|
SCHEDULE_ID_STATUS_SCHEDULE_FINISHED = 2
|
@@ -492,7 +509,7 @@ class IrrigationNotificationEvent(NotificationEvent):
|
|
492
509
|
class LightSensorNotificationEvent(NotificationEvent):
|
493
510
|
"""Enum for known light sensor notification event."""
|
494
511
|
|
495
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
512
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
496
513
|
UNKNOWN = -1
|
497
514
|
LIGHT_COLOR_TRANSITION_DETECTED = 2
|
498
515
|
LIGHT_DETECTION_STATUS_LIGHT_DETECTED = 1
|
@@ -508,7 +525,7 @@ class LightSensorNotificationEvent(NotificationEvent):
|
|
508
525
|
class PestControlNotificationEvent(NotificationEvent):
|
509
526
|
"""Enum for known pest control notification event."""
|
510
527
|
|
511
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
528
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
512
529
|
UNKNOWN = -1
|
513
530
|
PEST_DETECTED = 6
|
514
531
|
PEST_DETECTED_LOCATION_PROVIDED = 5
|
@@ -530,7 +547,7 @@ class PestControlNotificationEvent(NotificationEvent):
|
|
530
547
|
class PowerManagementNotificationEvent(NotificationEvent):
|
531
548
|
"""Enum for known power management notification event."""
|
532
549
|
|
533
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
550
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
534
551
|
UNKNOWN = -1
|
535
552
|
BACKUP_BATTERY_LEVEL_STATUS_BACK_UP_BATTERY_DISCONNECTED = 18
|
536
553
|
BACKUP_BATTERY_LEVEL_STATUS_BACK_UP_BATTERY_IS_LOW = 16
|
@@ -562,7 +579,7 @@ class PowerManagementNotificationEvent(NotificationEvent):
|
|
562
579
|
class SirenNotificationEvent(NotificationEvent):
|
563
580
|
"""Enum for known siren notification event."""
|
564
581
|
|
565
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
582
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
566
583
|
UNKNOWN = -1
|
567
584
|
SIREN_STATUS_SIREN_ACTIVE = 1
|
568
585
|
|
@@ -575,7 +592,7 @@ class SirenNotificationEvent(NotificationEvent):
|
|
575
592
|
class SmokeAlarmNotificationEvent(NotificationEvent):
|
576
593
|
"""Enum for known smoke alarm notification event."""
|
577
594
|
|
578
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
595
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
579
596
|
UNKNOWN = -1
|
580
597
|
ALARM_STATUS_ALARM_SILENCED = 6
|
581
598
|
ALARM_STATUS_SMOKE_ALARM_TEST = 3
|
@@ -597,7 +614,7 @@ class SmokeAlarmNotificationEvent(NotificationEvent):
|
|
597
614
|
class SystemNotificationEvent(NotificationEvent):
|
598
615
|
"""Enum for known system notification event."""
|
599
616
|
|
600
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
617
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
601
618
|
UNKNOWN = -1
|
602
619
|
COVER_STATUS_TAMPERING_PRODUCT_COVER_REMOVED = 6
|
603
620
|
EMERGENCY_SHUTOFF = 7
|
@@ -616,7 +633,7 @@ class SystemNotificationEvent(NotificationEvent):
|
|
616
633
|
class WaterAlarmNotificationEvent(NotificationEvent):
|
617
634
|
"""Enum for known water alarm notification event."""
|
618
635
|
|
619
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
636
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
620
637
|
UNKNOWN = -1
|
621
638
|
MAINTENANCE_STATUS_REPLACE_WATER_FILTER = 5
|
622
639
|
PUMP_STATUS_SUMP_PUMP_ACTIVE = 10
|
@@ -641,7 +658,7 @@ class WaterAlarmNotificationEvent(NotificationEvent):
|
|
641
658
|
class WaterFlowAlarmNotificationEventValue(NotificationEventValue):
|
642
659
|
"""Enum for known water flow alarm notification event value."""
|
643
660
|
|
644
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
661
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
645
662
|
UNKNOWN = -1
|
646
663
|
ABOVE_HIGH_THRESHOLD = 3
|
647
664
|
BELOW_LOW_THRESHOLD = 2
|
@@ -659,7 +676,7 @@ class WaterFlowAlarmNotificationEventValue(NotificationEventValue):
|
|
659
676
|
class WaterLevelAlarmNotificationEventValue(NotificationEventValue):
|
660
677
|
"""Enum for known water level alarm notification event value."""
|
661
678
|
|
662
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
679
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
663
680
|
UNKNOWN = -1
|
664
681
|
ABOVE_HIGH_THRESHOLD = 3
|
665
682
|
BELOW_LOW_THRESHOLD = 2
|
@@ -676,7 +693,7 @@ class WaterLevelAlarmNotificationEventValue(NotificationEventValue):
|
|
676
693
|
class WaterPressureAlarmNotificationEventValue(NotificationEventValue):
|
677
694
|
"""Enum for known water pressure alarm notification event value."""
|
678
695
|
|
679
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
696
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
680
697
|
UNKNOWN = -1
|
681
698
|
ABOVE_HIGH_THRESHOLD = 3
|
682
699
|
BELOW_LOW_THRESHOLD = 2
|
@@ -694,7 +711,7 @@ class WaterPressureAlarmNotificationEventValue(NotificationEventValue):
|
|
694
711
|
class WaterTemperatureAlarmNotificationEventValue(NotificationEventValue):
|
695
712
|
"""Enum for known water temperature alarm notification event value."""
|
696
713
|
|
697
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
714
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
698
715
|
UNKNOWN = -1
|
699
716
|
ABOVE_HIGH_THRESHOLD = 3
|
700
717
|
BELOW_LOW_THRESHOLD = 2
|
@@ -711,7 +728,7 @@ class WaterTemperatureAlarmNotificationEventValue(NotificationEventValue):
|
|
711
728
|
class WaterQualityMonitoringNotificationEvent(NotificationEvent):
|
712
729
|
"""Enum for known water quality monitoring notification event."""
|
713
730
|
|
714
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
731
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
715
732
|
UNKNOWN = -1
|
716
733
|
ACIDITY_PH_SENSOR_STATUS_ACIDITY_PH_EMPTY = 5
|
717
734
|
ACIDITY_PH_STATUS_ACIDITY_PH_ALARM = 2
|
@@ -742,7 +759,7 @@ class WaterQualityMonitoringNotificationEvent(NotificationEvent):
|
|
742
759
|
class AcidityStatusAcidityAlarmNotificationEventValue(NotificationEventValue):
|
743
760
|
"""Enum for known acidity (ph) status acidity (ph) alarm notification event value."""
|
744
761
|
|
745
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
762
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
746
763
|
UNKNOWN = -1
|
747
764
|
ABOVE_HIGH_THRESHOLD = 2
|
748
765
|
BELOW_LOW_THRESHOLD = 1
|
@@ -760,7 +777,7 @@ class AcidityStatusAcidityAlarmNotificationEventValue(NotificationEventValue):
|
|
760
777
|
class ChlorineAlarmNotificationEventValue(NotificationEventValue):
|
761
778
|
"""Enum for known chlorine alarm notification event value."""
|
762
779
|
|
763
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
780
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
764
781
|
UNKNOWN = -1
|
765
782
|
ABOVE_HIGH_THRESHOLD = 2
|
766
783
|
BELOW_LOW_THRESHOLD = 1
|
@@ -776,7 +793,7 @@ class ChlorineAlarmNotificationEventValue(NotificationEventValue):
|
|
776
793
|
class WaterOxidationAlarmNotificationEventValue(NotificationEventValue):
|
777
794
|
"""Enum for known water oxidation alarm notification event value."""
|
778
795
|
|
779
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
796
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
780
797
|
UNKNOWN = -1
|
781
798
|
ABOVE_HIGH_THRESHOLD = 2
|
782
799
|
BELOW_LOW_THRESHOLD = 1
|
@@ -792,12 +809,13 @@ class WaterOxidationAlarmNotificationEventValue(NotificationEventValue):
|
|
792
809
|
class WaterValveNotificationEvent(NotificationEvent):
|
793
810
|
"""Enum for known water valve notification event."""
|
794
811
|
|
795
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
812
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
796
813
|
UNKNOWN = -1
|
797
814
|
MASTER_VALVE_CURRENT_ALARM = 6
|
798
815
|
MASTER_VALVE_OPERATION = 2
|
799
816
|
MASTER_VALVE_SHORT_CIRCUIT = 4
|
800
817
|
VALVE_CURRENT_ALARM = 5
|
818
|
+
VALVE_JAMMED = 7
|
801
819
|
VALVE_OPERATION = 1
|
802
820
|
VALVE_SHORT_CIRCUIT = 3
|
803
821
|
|
@@ -812,7 +830,7 @@ class WaterValveNotificationEvent(NotificationEvent):
|
|
812
830
|
class MasterValveCurrentAlarmNotificationEventValue(NotificationEventValue):
|
813
831
|
"""Enum for known master valve current alarm notification event value."""
|
814
832
|
|
815
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
833
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
816
834
|
UNKNOWN = -1
|
817
835
|
ABOVE_HIGH_THRESHOLD = 3
|
818
836
|
BELOW_LOW_THRESHOLD = 2
|
@@ -830,7 +848,7 @@ class MasterValveCurrentAlarmNotificationEventValue(NotificationEventValue):
|
|
830
848
|
class MasterValveOperationNotificationEventValue(NotificationEventValue):
|
831
849
|
"""Enum for known master valve operation notification event value."""
|
832
850
|
|
833
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
851
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
834
852
|
UNKNOWN = -1
|
835
853
|
OFF_CLOSED = 0
|
836
854
|
ON_OPEN = 1
|
@@ -846,7 +864,7 @@ class MasterValveOperationNotificationEventValue(NotificationEventValue):
|
|
846
864
|
class ValveCurrentAlarmNotificationEventValue(NotificationEventValue):
|
847
865
|
"""Enum for known valve current alarm notification event value."""
|
848
866
|
|
849
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
867
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
850
868
|
UNKNOWN = -1
|
851
869
|
ABOVE_HIGH_THRESHOLD = 3
|
852
870
|
BELOW_LOW_THRESHOLD = 2
|
@@ -864,7 +882,7 @@ class ValveCurrentAlarmNotificationEventValue(NotificationEventValue):
|
|
864
882
|
class ValveOperationNotificationEventValue(NotificationEventValue):
|
865
883
|
"""Enum for known valve operation notification event value."""
|
866
884
|
|
867
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
885
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
868
886
|
UNKNOWN = -1
|
869
887
|
OFF_CLOSED = 0
|
870
888
|
ON_OPEN = 1
|
@@ -880,7 +898,7 @@ class ValveOperationNotificationEventValue(NotificationEventValue):
|
|
880
898
|
class WeatherAlarmNotificationEvent(NotificationEvent):
|
881
899
|
"""Enum for known weather alarm notification event."""
|
882
900
|
|
883
|
-
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/
|
901
|
+
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/core/src/registries/Notifications.ts
|
884
902
|
UNKNOWN = -1
|
885
903
|
FREEZE_ALARM = 3
|
886
904
|
MOISTURE_ALARM = 2
|
zwave_js_server/event.py
CHANGED
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
from typing import Literal, TypedDict
|
6
6
|
|
7
|
-
from ...const import RemoveNodeReason
|
7
|
+
from ...const import InclusionStrategy, RemoveNodeReason
|
8
8
|
from ...event import BaseEventModel
|
9
9
|
from ..node.data_model import FoundNodeDataType, NodeDataType
|
10
10
|
from .firmware import (
|
@@ -142,7 +142,7 @@ class InclusionStartedEventModel(BaseControllerEventModel):
|
|
142
142
|
"""Model for `inclusion started` event data."""
|
143
143
|
|
144
144
|
event: Literal["inclusion started"]
|
145
|
-
|
145
|
+
strategy: InclusionStrategy
|
146
146
|
|
147
147
|
@classmethod
|
148
148
|
def from_dict(cls, data: dict) -> InclusionStartedEventModel:
|
@@ -150,7 +150,7 @@ class InclusionStartedEventModel(BaseControllerEventModel):
|
|
150
150
|
return cls(
|
151
151
|
source=data["source"],
|
152
152
|
event=data["event"],
|
153
|
-
|
153
|
+
strategy=data["strategy"],
|
154
154
|
)
|
155
155
|
|
156
156
|
|
@@ -293,49 +293,13 @@ class Endpoint(EventBase):
|
|
293
293
|
|
294
294
|
async def async_set_raw_config_parameter_value(
|
295
295
|
self,
|
296
|
-
new_value: int
|
296
|
+
new_value: int,
|
297
297
|
property_: int | str,
|
298
298
|
property_key: int | None = None,
|
299
299
|
value_size: Literal[1, 2, 4] | None = None,
|
300
300
|
value_format: ConfigurationValueFormat | None = None,
|
301
|
-
) ->
|
301
|
+
) -> SetConfigParameterResult:
|
302
302
|
"""Send setRawConfigParameterValue."""
|
303
|
-
try:
|
304
|
-
zwave_value = next(
|
305
|
-
config_value
|
306
|
-
for config_value in self.get_configuration_values().values()
|
307
|
-
if property_
|
308
|
-
== (
|
309
|
-
config_value.property_name
|
310
|
-
if isinstance(property_, str)
|
311
|
-
else config_value.property_
|
312
|
-
)
|
313
|
-
and property_key == config_value.property_key
|
314
|
-
)
|
315
|
-
except StopIteration:
|
316
|
-
raise NotFoundError(
|
317
|
-
f"Configuration parameter with parameter {property_} and bitmask "
|
318
|
-
f"{property_key} on node {self} could not be found"
|
319
|
-
) from None
|
320
|
-
|
321
|
-
if not isinstance(new_value, str):
|
322
|
-
value = new_value
|
323
|
-
else:
|
324
|
-
try:
|
325
|
-
value = int(
|
326
|
-
next(
|
327
|
-
k
|
328
|
-
for k, v in zwave_value.metadata.states.items()
|
329
|
-
if v == new_value
|
330
|
-
)
|
331
|
-
)
|
332
|
-
except StopIteration:
|
333
|
-
raise NotFoundError(
|
334
|
-
f"Configuration parameter {zwave_value.value_id} does not have "
|
335
|
-
f"{new_value} as a valid state. If this is a valid call, you must "
|
336
|
-
"use the state key instead of the string."
|
337
|
-
) from None
|
338
|
-
|
339
303
|
if (value_size is not None and value_format is None) or (
|
340
304
|
value_size is None and value_format is not None
|
341
305
|
):
|
@@ -351,9 +315,9 @@ class Endpoint(EventBase):
|
|
351
315
|
)
|
352
316
|
|
353
317
|
options = {
|
354
|
-
"value":
|
355
|
-
"parameter":
|
356
|
-
"bitMask":
|
318
|
+
"value": new_value,
|
319
|
+
"parameter": property_,
|
320
|
+
"bitMask": property_key,
|
357
321
|
"valueSize": value_size,
|
358
322
|
"valueFormat": value_format,
|
359
323
|
}
|
@@ -365,11 +329,33 @@ class Endpoint(EventBase):
|
|
365
329
|
)
|
366
330
|
|
367
331
|
if data is None:
|
368
|
-
return
|
332
|
+
return SetConfigParameterResult(CommandStatus.QUEUED)
|
369
333
|
|
370
334
|
if (result := data.get("result")) is None:
|
371
|
-
return
|
335
|
+
return SetConfigParameterResult(CommandStatus.ACCEPTED)
|
372
336
|
|
373
|
-
return
|
337
|
+
return SetConfigParameterResult(
|
374
338
|
CommandStatus.ACCEPTED, SupervisionResult(result)
|
375
339
|
)
|
340
|
+
|
341
|
+
async def async_get_raw_config_parameter_value(
|
342
|
+
self,
|
343
|
+
property_: int,
|
344
|
+
property_key: int | None = None,
|
345
|
+
allow_unexpected_response: bool | None = None,
|
346
|
+
) -> Any:
|
347
|
+
"""Call getRawConfigParameterValue."""
|
348
|
+
options = {
|
349
|
+
"parameter": property_,
|
350
|
+
"bitMask": property_key,
|
351
|
+
"allowUnexpectedResponse": allow_unexpected_response,
|
352
|
+
}
|
353
|
+
|
354
|
+
result = await self.async_send_command(
|
355
|
+
"get_raw_config_parameter_value",
|
356
|
+
options={k: v for k, v in options.items() if v is not None},
|
357
|
+
require_schema=39,
|
358
|
+
wait_for_result=True,
|
359
|
+
)
|
360
|
+
assert result
|
361
|
+
return result["value"]
|
@@ -965,17 +965,28 @@ class Node(EventBase):
|
|
965
965
|
|
966
966
|
async def async_set_raw_config_parameter_value(
|
967
967
|
self,
|
968
|
-
new_value: int
|
968
|
+
new_value: int,
|
969
969
|
property_: int | str,
|
970
970
|
property_key: int | None = None,
|
971
971
|
value_size: Literal[1, 2, 4] | None = None,
|
972
972
|
value_format: ConfigurationValueFormat | None = None,
|
973
|
-
) ->
|
973
|
+
) -> SetConfigParameterResult:
|
974
974
|
"""Send setRawConfigParameterValue."""
|
975
975
|
return await self.endpoints[0].async_set_raw_config_parameter_value(
|
976
976
|
new_value, property_, property_key, value_size, value_format
|
977
977
|
)
|
978
978
|
|
979
|
+
async def async_get_raw_config_parameter_value(
|
980
|
+
self,
|
981
|
+
property_: int,
|
982
|
+
property_key: int | None = None,
|
983
|
+
allow_unexpected_response: bool | None = None,
|
984
|
+
) -> int:
|
985
|
+
"""Call getRawConfigParameterValue."""
|
986
|
+
return await self.endpoints[0].async_get_raw_config_parameter_value(
|
987
|
+
property_, property_key, allow_unexpected_response
|
988
|
+
)
|
989
|
+
|
979
990
|
def handle_test_powerlevel_progress(self, event: Event) -> None:
|
980
991
|
"""Process a test power level progress event."""
|
981
992
|
event.data["test_power_level_progress"] = TestPowerLevelProgress(
|
zwave_js_server/util/lock.py
CHANGED
@@ -14,6 +14,7 @@ from ..const.command_class.lock import (
|
|
14
14
|
CURRENT_BLOCK_TO_BLOCK_PROPERTY,
|
15
15
|
CURRENT_HOLD_AND_RELEASE_TIME_PROPERTY,
|
16
16
|
CURRENT_TWIST_ASSIST_PROPERTY,
|
17
|
+
LOCK_USERCODE_ID_PROPERTY,
|
17
18
|
LOCK_USERCODE_PROPERTY,
|
18
19
|
LOCK_USERCODE_STATUS_PROPERTY,
|
19
20
|
CodeSlotStatus,
|
@@ -130,6 +131,7 @@ async def get_usercode_from_node(node: Node, code_slot: int) -> CodeSlot:
|
|
130
131
|
This call will populate the ValueDB and trigger value update events from the
|
131
132
|
driver.
|
132
133
|
"""
|
134
|
+
# https://zwave-js.github.io/node-zwave-js/#/api/CCs/UserCode?id=get
|
133
135
|
await node.async_invoke_cc_api(
|
134
136
|
CommandClass.USER_CODE, "get", code_slot, wait_for_result=True
|
135
137
|
)
|
@@ -141,17 +143,34 @@ async def set_usercode(
|
|
141
143
|
) -> SetValueResult | None:
|
142
144
|
"""Set the usercode to index X on the lock."""
|
143
145
|
value = get_code_slot_value(node, code_slot, LOCK_USERCODE_PROPERTY)
|
146
|
+
return await node.async_set_value(value, usercode)
|
144
147
|
|
145
|
-
if len(str(usercode)) < 4:
|
146
|
-
raise ValueError("User code must be at least 4 digits")
|
147
148
|
|
148
|
-
|
149
|
+
async def set_usercodes(node: Node, codes: dict[int, str]) -> SupervisionResult | None:
|
150
|
+
"""Set the usercode to index X on the lock."""
|
151
|
+
cc_api_codes = [
|
152
|
+
{
|
153
|
+
LOCK_USERCODE_ID_PROPERTY: code_slot,
|
154
|
+
LOCK_USERCODE_STATUS_PROPERTY: CodeSlotStatus.ENABLED,
|
155
|
+
LOCK_USERCODE_PROPERTY: usercode,
|
156
|
+
}
|
157
|
+
for code_slot, usercode in codes.items()
|
158
|
+
]
|
159
|
+
# https://zwave-js.github.io/node-zwave-js/#/api/CCs/UserCode?id=setmany
|
160
|
+
data = await node.async_invoke_cc_api(
|
161
|
+
CommandClass.USER_CODE, "setMany", cc_api_codes, wait_for_result=True
|
162
|
+
)
|
163
|
+
|
164
|
+
if not data:
|
165
|
+
raise ValueError("Received unexpected response from User Code CC setMany API")
|
166
|
+
|
167
|
+
return SupervisionResult(data)
|
149
168
|
|
150
169
|
|
151
170
|
async def clear_usercode(node: Node, code_slot: int) -> SetValueResult | None:
|
152
171
|
"""Clear a code slot on the lock."""
|
153
172
|
value = get_code_slot_value(node, code_slot, LOCK_USERCODE_STATUS_PROPERTY)
|
154
|
-
return await node.async_set_value(value, CodeSlotStatus.AVAILABLE
|
173
|
+
return await node.async_set_value(value, CodeSlotStatus.AVAILABLE)
|
155
174
|
|
156
175
|
|
157
176
|
async def set_configuration(
|
@@ -197,6 +216,7 @@ async def set_configuration(
|
|
197
216
|
if errors:
|
198
217
|
raise ValueError("\n".join(errors))
|
199
218
|
|
219
|
+
# https://zwave-js.github.io/node-zwave-js/#/api/CCs/UserCode?id=setconfiguration
|
200
220
|
data = await endpoint.async_invoke_cc_api(
|
201
221
|
CommandClass.DOOR_LOCK, "setConfiguration", configuration.to_dict()
|
202
222
|
)
|