zwave-js-server-python 0.54.0__py3-none-any.whl → 0.55.1__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/client.py CHANGED
@@ -6,6 +6,7 @@ from collections import defaultdict
6
6
  from collections.abc import Callable
7
7
  from copy import deepcopy
8
8
  from datetime import datetime
9
+ import functools
9
10
  import logging
10
11
  from operator import itemgetter
11
12
  import pprint
@@ -39,6 +40,11 @@ from .model.driver import Driver
39
40
  from .model.log_message import LogMessage
40
41
  from .model.version import VersionInfo, VersionInfoDataType
41
42
 
43
+ try:
44
+ import orjson as json
45
+ except ImportError:
46
+ import json
47
+
42
48
  SIZE_PARSE_JSON_EXECUTOR = 8192
43
49
 
44
50
  # Message IDs
@@ -458,9 +464,11 @@ class Client:
458
464
 
459
465
  try:
460
466
  if len(msg.data) > SIZE_PARSE_JSON_EXECUTOR:
461
- data: dict = await self._loop.run_in_executor(None, msg.json)
467
+ data: dict = await self._loop.run_in_executor(
468
+ None, functools.partial(msg.json, loads=json.loads)
469
+ )
462
470
  else:
463
- data = msg.json()
471
+ data = msg.json(loads=json.loads)
464
472
  except ValueError as err:
465
473
  raise InvalidMessage("Received invalid JSON.") from err
466
474
 
@@ -557,7 +565,7 @@ class Client:
557
565
  }
558
566
  )
559
567
 
560
- await self._client.send_json(message)
568
+ await self._client.send_json(message, dumps=json.dumps)
561
569
 
562
570
  async def __aenter__(self) -> Client:
563
571
  """Connect to the websocket."""
@@ -3,17 +3,16 @@ from __future__ import annotations
3
3
 
4
4
  from dataclasses import dataclass, field
5
5
  from enum import Enum, IntEnum
6
- from importlib import metadata
7
6
  import logging
8
7
  from typing import TypedDict
9
8
 
10
9
  PACKAGE_NAME = "zwave-js-server-python"
11
- __version__ = metadata.version(PACKAGE_NAME)
10
+ __version__ = "0.55.1"
12
11
 
13
12
  # minimal server schema version we can handle
14
13
  MIN_SERVER_SCHEMA_VERSION = 33
15
14
  # max server schema version we can handle (and our code is compatible with)
16
- MAX_SERVER_SCHEMA_VERSION = 33
15
+ MAX_SERVER_SCHEMA_VERSION = 34
17
16
 
18
17
  VALUE_UNKNOWN = "unknown"
19
18
 
@@ -12,6 +12,95 @@ from enum import IntEnum
12
12
  CC_SPECIFIC_SCALE = "scale"
13
13
  CC_SPECIFIC_SENSOR_TYPE = "sensorType"
14
14
 
15
+ ACCELERATION_X_AXIS_PROPERTY = "Acceleration X-axis"
16
+ ACCELERATION_Y_AXIS_PROPERTY = "Acceleration Y-axis"
17
+ ACCELERATION_Z_AXIS_PROPERTY = "Acceleration Z-axis"
18
+ AIR_FLOW_PROPERTY = "Air flow"
19
+ AIR_TEMPERATURE_PROPERTY = "Air temperature"
20
+ AMMONIA_PROPERTY = "Ammonia"
21
+ ANGLE_POSITION_PROPERTY = "Angle position"
22
+ APPLIED_FORCE_ON_THE_SENSOR_PROPERTY = "Applied force on the sensor"
23
+ ATMOSPHERIC_PRESSURE_PROPERTY = "Atmospheric pressure"
24
+ BAROMETRIC_PRESSURE_PROPERTY = "Barometric pressure"
25
+ BASIS_METABOLIC_RATE_PROPERTY = "Basis metabolic rate (BMR)"
26
+ BLOOD_PRESSURE_PROPERTY = "Blood pressure"
27
+ BODY_MASS_INDEX_PROPERTY = "Body Mass Index (BMI)"
28
+ BOILER_WATER_TEMPERATURE_PROPERTY = "Boiler water temperature"
29
+ BONE_MASS_PROPERTY = "Bone mass"
30
+ CARBON_DIOXIDE_LEVEL_PROPERTY = "Carbon dioxide (CO₂) level"
31
+ CARBON_MONOXIDE_LEVEL_PROPERTY = "Carbon monoxide (CO) level"
32
+ CONDENSER_COIL_TEMPERATURE_PROPERTY = "Condenser Coil temperature"
33
+ CURRENT_PROPERTY = "Current"
34
+ DEFROST_TEMPERATURE_PROPERTY = "Defrost temperature"
35
+ DEW_POINT_PROPERTY = "Dew point"
36
+ DIRECTION_PROPERTY = "Direction"
37
+ DISCHARGE_LINE_TEMPERATURE_PROPERTY = "Discharge Line temperature"
38
+ DISCHARGE_PRESSURE_PROPERTY = "Discharge Pressure"
39
+ DISTANCE_PROPERTY = "Distance"
40
+ DOMESTIC_HOT_WATER_TEMPERATURE_PROPERTY = "Domestic Hot Water (DHW) temperature"
41
+ ELECTRICAL_CONDUCTIVITY_PROPERTY = "Electrical conductivity"
42
+ ELECTRICAL_RESISTIVITY_PROPERTY = "Electrical resistivity"
43
+ EVAPORATOR_COIL_TEMPERATURE_PROPERTY = "Evaporator Coil temperature"
44
+ EXHAUST_TEMPERATURE_PROPERTY = "Exhaust temperature"
45
+ FAT_MASS_PROPERTY = "Fat mass"
46
+ FORMALDEHYDE_LEVEL_PROPERTY = "Formaldehyde (CH₂O) level"
47
+ FREQUENCY_PROPERTY = "Frequency"
48
+ GENERAL_PURPOSE_PROPERTY = "General purpose"
49
+ HEART_RATE_PROPERTY = "Heart rate"
50
+ HEART_RATE_LF_HF_RATIO_PROPERTY = "Heart Rate LF/HF ratio"
51
+ HUMIDITY_PROPERTY = "Humidity"
52
+ ILLUMINANCE_PROPERTY = "Illuminance"
53
+ LEAD_PROPERTY = "Lead"
54
+ LIQUID_LINE_TEMPERATURE_PROPERTY = "Liquid Line temperature"
55
+ LOUDNESS_PROPERTY = "Loudness"
56
+ METHANE_DENSITY_PROPERTY = "Methane (CH₄) density"
57
+ MOISTURE_PROPERTY = "Moisture"
58
+ MOTION_DIRECTION_PROPERTY = "Motion Direction"
59
+ MUSCLE_MASS_PROPERTY = "Muscle mass"
60
+ NITROGEN_DIOXIDE_PROPERTY = "Nitrogen dioxide"
61
+ OUTSIDE_TEMPERATURE_PROPERTY = "Outside temperature"
62
+ OZONE_PROPERTY = "Ozone"
63
+ PARTICULATE_MATTER_1_PROPERTY = "Particulate Matter 1"
64
+ PARTICULATE_MATTER_10_PROPERTY = "Particulate Matter 10"
65
+ PARTICULATE_MATTER_2_5_PROPERTY = "Particulate Matter 2.5"
66
+ PERSON_COUNTER_ENTERING_PROPERTY = "Person counter (entering)"
67
+ PERSON_COUNTER_EXITING_PROPERTY = "Person counter (exiting)"
68
+ POWER_PROPERTY = "Power"
69
+ RADON_CONCENTRATION_PROPERTY = "Radon concentration"
70
+ RAIN_RATE_PROPERTY = "Rain rate"
71
+ RELATIVE_MODULATION_LEVEL_PROPERTY = "Relative Modulation level"
72
+ RESPIRATORY_RATE_PROPERTY = "Respiratory rate"
73
+ RETURN_AIR_TEMPERATURE_PROPERTY = "Return Air temperature"
74
+ RF_SIGNAL_STRENGTH_PROPERTY = "RF signal strength"
75
+ ROTATION_PROPERTY = "Rotation"
76
+ SEISMIC_INTENSITY_PROPERTY = "Seismic Intensity"
77
+ SEISMIC_MAGNITUDE_PROPERTY = "Seismic magnitude"
78
+ SMOKE_DENSITY_PROPERTY = "Smoke density"
79
+ SOIL_HUMIDITY_PROPERTY = "Soil humidity"
80
+ SOIL_REACTIVITY_PROPERTY = "Soil reactivity"
81
+ SOIL_SALINITY_PROPERTY = "Soil salinity"
82
+ SOIL_TEMPERATURE_PROPERTY = "Soil temperature"
83
+ SOLAR_RADIATION_PROPERTY = "Solar radiation"
84
+ SUCTION_PRESSURE_PROPERTY = "Suction Pressure"
85
+ SULFUR_DIOXIDE_PROPERTY = "Sulfur dioxide"
86
+ SUPPLY_AIR_TEMPERATURE_PROPERTY = "Supply Air temperature"
87
+ TANK_CAPACITY_PROPERTY = "Tank capacity"
88
+ TARGET_TEMPERATURE_PROPERTY = "Target temperature"
89
+ TIDE_LEVEL_PROPERTY = "Tide level"
90
+ TIME_PROPERTY = "Time"
91
+ TOTAL_BODY_WATER_PROPERTY = "Total body water (TBW)"
92
+ ULTRAVIOLET_PROPERTY = "Ultraviolet"
93
+ VELOCITY_PROPERTY = "Velocity"
94
+ VOLATILE_ORGANIC_COMPOUND_LEVEL_PROPERTY = "Volatile Organic Compound level"
95
+ VOLTAGE_PROPERTY = "Voltage"
96
+ WATER_ACIDITY_PROPERTY = "Water acidity"
97
+ WATER_CHLORINE_LEVEL_PROPERTY = "Water Chlorine level"
98
+ WATER_FLOW_PROPERTY = "Water flow"
99
+ WATER_OXIDATION_REDUCTION_POTENTIAL_PROPERTY = "Water Oxidation reduction potential"
100
+ WATER_PRESSURE_PROPERTY = "Water pressure"
101
+ WATER_TEMPERATURE_PROPERTY = "Water temperature"
102
+ WEIGHT_PROPERTY = "Weight"
103
+
15
104
 
16
105
  class MultilevelSensorType(IntEnum):
17
106
  """Enum for known multilevel sensor types."""
@@ -786,9 +875,9 @@ UNIT_WATT_PER_SQUARE_METER: list[MultilevelSensorScaleType] = [
786
875
 
787
876
  # ----------------------------------------------------------------------------------- #
788
877
  # **END OF AUTOGENERATED CONTENT** (DO NOT EDIT/REMOVE THIS COMMENT BLOCK AND DO NOT #
789
- # EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, UPDATE THE LINES AROUND 135 #
790
- # IN scripts/generate_multilevel_sensor_constants.py THEN RE-RUN THE SCRIPT. ALL #
791
- # LINES WRITTEN BELOW THIS BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS) #
878
+ # EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, ADD IT TO THE IMPORTS IN THE #
879
+ # CORRESPONDING GENERATION SCRIPT THEN RE-RUN THE SCRIPT. LINES WRITTEN BELOW THIS #
880
+ # BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS) #
792
881
  # ----------------------------------------------------------------------------------- #
793
882
 
794
883
  CO_SENSORS = [MultilevelSensorType.CARBON_MONOXIDE_LEVEL]
@@ -17,6 +17,7 @@ class NotificationType(IntEnum):
17
17
  """Enum for known notification types."""
18
18
 
19
19
  # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json
20
+ UNKNOWN = -1
20
21
  ACCESS_CONTROL = 6
21
22
  APPLIANCE = 12
22
23
  CLOCK = 11
@@ -40,6 +41,11 @@ class NotificationType(IntEnum):
40
41
  WATER_VALVE = 15
41
42
  WEATHER_ALARM = 16
42
43
 
44
+ @classmethod
45
+ def _missing_(cls: type, value: object) -> NotificationType: # noqa: ARG003
46
+ """Set default enum member if an unknown value is provided."""
47
+ return NotificationType.UNKNOWN
48
+
43
49
 
44
50
  class NotificationEvent(IntEnum):
45
51
  """Common base class for Notification CC states enums."""
@@ -940,7 +946,7 @@ NOTIFICATION_EVENT_TO_EVENT_VALUE_MAP: dict[
940
946
 
941
947
  # ----------------------------------------------------------------------------------- #
942
948
  # **END OF AUTOGENERATED CONTENT** (DO NOT EDIT/REMOVE THIS COMMENT BLOCK AND DO NOT #
943
- # EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, UPDATE THE LINES AROUND 135 #
944
- # IN scripts/generate_multilevel_sensor_constants.py THEN RE-RUN THE SCRIPT. ALL #
945
- # LINES WRITTEN BELOW THIS BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS) #
949
+ # EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, ADD IT TO THE IMPORTS IN THE #
950
+ # CORRESPONDING GENERATION SCRIPT THEN RE-RUN THE SCRIPT. LINES WRITTEN BELOW THIS #
951
+ # BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS) #
946
952
  # ----------------------------------------------------------------------------------- #
zwave_js_server/event.py CHANGED
@@ -1,9 +1,10 @@
1
1
  """Provide Event base classes for Z-Wave JS."""
2
2
  from __future__ import annotations
3
3
 
4
+ from collections.abc import Callable
4
5
  from dataclasses import dataclass, field
5
6
  import logging
6
- from typing import Callable, Literal
7
+ from typing import Literal
7
8
 
8
9
  try:
9
10
  from pydantic.v1 import BaseModel
@@ -98,6 +98,15 @@ class Controller(EventBase):
98
98
  return False
99
99
  return self.home_id == other.home_id
100
100
 
101
+ def _generate_rebuild_routes_status(
102
+ self, data: dict[str, str]
103
+ ) -> dict[Node, RebuildRoutesStatus]:
104
+ """Generate rebuild routes status."""
105
+ return {
106
+ self.nodes[int(node_id)]: RebuildRoutesStatus(status)
107
+ for node_id, status in data.items()
108
+ }
109
+
101
110
  @property
102
111
  def sdk_version(self) -> str | None:
103
112
  """Return sdk_version."""
@@ -240,6 +249,10 @@ class Controller(EventBase):
240
249
  self._statistics = ControllerStatistics(
241
250
  self.data.get("statistics", DEFAULT_CONTROLLER_STATISTICS)
242
251
  )
252
+ if "rebuildRoutesProgress" in self.data:
253
+ self._rebuild_routes_progress = self._generate_rebuild_routes_status(
254
+ self.data["rebuildRoutesProgress"]
255
+ )
243
256
 
244
257
  async def async_begin_inclusion(
245
258
  self,
@@ -903,18 +916,16 @@ class Controller(EventBase):
903
916
 
904
917
  def handle_rebuild_routes_progress(self, event: Event) -> None:
905
918
  """Process a rebuild routes progress event."""
906
- self._rebuild_routes_progress = {
907
- self.nodes[int(node_id)]: RebuildRoutesStatus(status)
908
- for node_id, status in event.data["progress"].items()
909
- }
919
+ self._rebuild_routes_progress = self._generate_rebuild_routes_status(
920
+ event.data["progress"]
921
+ )
910
922
  self.data["isRebuildingRoutes"] = True
911
923
 
912
924
  def handle_rebuild_routes_done(self, event: Event) -> None:
913
925
  """Process a rebuild routes done event."""
914
- self._last_rebuild_routes_result = {
915
- self.nodes[int(node_id)]: RebuildRoutesStatus(status)
916
- for node_id, status in event.data["result"].items()
917
- }
926
+ self._last_rebuild_routes_result = self._generate_rebuild_routes_status(
927
+ event.data["result"]
928
+ )
918
929
  self._rebuild_routes_progress = None
919
930
  self.data["isRebuildingRoutes"] = False
920
931
 
@@ -16,7 +16,7 @@ class ControllerDataType(TypedDict, total=False):
16
16
  isPrimary: bool
17
17
  isSUC: bool
18
18
  nodeType: int
19
- isUsingHomeIdFromOtherNetwork: bool # TODO: The following items are missing in the docs.
19
+ isUsingHomeIdFromOtherNetwork: bool
20
20
  isSISPresent: bool
21
21
  wasRealPrimary: bool
22
22
  firmwareVersion: str
@@ -31,3 +31,4 @@ class ControllerDataType(TypedDict, total=False):
31
31
  inclusionState: int
32
32
  rfRegion: int
33
33
  status: int
34
+ rebuildRoutesProgress: dict[str, str]
@@ -45,9 +45,16 @@ class MetaDataType(TypedDict, total=False):
45
45
  ccSpecific: dict[str, Any]
46
46
  valueChangeOptions: list[str]
47
47
  allowManualEntry: bool
48
- valueSize: int
49
48
  stateful: bool
50
49
  secret: bool
50
+ default: int
51
+ # Configuration Value specific attributes
52
+ valueSize: int
53
+ format: int
54
+ noBulkSupport: bool # deprecated
55
+ isAdvanced: bool
56
+ requiresReInclusion: bool
57
+ isFromConfig: bool
51
58
 
52
59
 
53
60
  class ValueDataType(TypedDict, total=False):
@@ -184,6 +191,38 @@ class ValueMetadata:
184
191
  """Return secret."""
185
192
  return self.data.get("secret")
186
193
 
194
+ @property
195
+ def default(self) -> int | None:
196
+ """Return default."""
197
+ return self.data.get("default")
198
+
199
+ @property
200
+ def format(self) -> ConfigurationValueFormat | None:
201
+ """Return format."""
202
+ if (format_ := self.data.get("format")) is None:
203
+ return None
204
+ return ConfigurationValueFormat(format_)
205
+
206
+ @property
207
+ def no_bulk_support(self) -> bool | None:
208
+ """Return noBulkSupport."""
209
+ return self.data.get("noBulkSupport")
210
+
211
+ @property
212
+ def is_advanced(self) -> bool | None:
213
+ """Return isAdvanced."""
214
+ return self.data.get("isAdvanced")
215
+
216
+ @property
217
+ def requires_re_inclusion(self) -> bool | None:
218
+ """Return requiresReInclusion."""
219
+ return self.data.get("requiresReInclusion")
220
+
221
+ @property
222
+ def is_from_config(self) -> bool | None:
223
+ """Return isFromConfig."""
224
+ return self.data.get("isFromConfig")
225
+
187
226
  def update(self, data: MetaDataType) -> None:
188
227
  """Update data."""
189
228
  self.data.update(data)
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.1
2
+ Name: zwave-js-server-python
3
+ Version: 0.55.1
4
+ Summary: Python wrapper for zwave-js-server
5
+ Author-email: Home Assistant Team <hello@home-assistant.io>
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "[]"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright [yyyy] [name of copyright owner]
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
207
+
208
+ Project-URL: Source Code, https://github.com/home-assistant-libs/zwave-js-server-python
209
+ Project-URL: Bug Reports, https://github.com/home-assistant-libs/zwave-js-server-python/issues
210
+ Keywords: home,automation,zwave,zwave-js
211
+ Classifier: Development Status :: 4 - Beta
212
+ Classifier: Intended Audience :: Developers
213
+ Classifier: Natural Language :: English
214
+ Classifier: Programming Language :: Python :: 3
215
+ Classifier: Programming Language :: Python :: 3.11
216
+ Classifier: Topic :: Home Automation
217
+ Requires-Python: >=3.11
218
+ Description-Content-Type: text/markdown
219
+ License-File: LICENSE
220
+ Requires-Dist: aiohttp >3
221
+ Requires-Dist: pydantic >=1.10.0
222
+ Provides-Extra: orjson
223
+ Requires-Dist: orjson >=3.9.9 ; extra == 'orjson'
224
+
225
+ # zwave-js-server-python
226
+
227
+ Python library for communicating with [zwave-js-server](https://github.com/zwave-js/zwave-js-server/). Goal for this library is to replicate the structure and the events of Z-Wave JS 1:1. So it has a `Driver`, `Controller` and `Node` classes.
228
+
229
+ ## Setup development environment
230
+
231
+ To setup your development environment, run `scripts/setup`, which will install all requirements and set up pre-commit checks.
232
+
233
+ ## Trying it out
234
+
235
+ ```shell
236
+ python3 -m zwave_js_server ws://localhost:3000
237
+ ```
238
+
239
+ Or get the version of the server
240
+
241
+ ```shell
242
+ python3 -m zwave_js_server ws://localhost:3000 --server-version
243
+ ```
244
+
245
+ Or dump the state. Optionally add `--event-timeout 5` if you want to listen 5 seconds extra for events.
246
+
247
+ ```shell
248
+ python3 -m zwave_js_server ws://localhost:3000 --dump-state
249
+ ```
250
+
251
+ ## Sending commands
252
+
253
+ ```python
254
+ try:
255
+ result = await client.async_send_command({ "command": "start_listening" })
256
+ except zwave_js_server.client.FailedCommand as err:
257
+ print("Command failed with", err.error_code)
258
+ ```
259
+
260
+ ## Optional dependencies
261
+
262
+ `zwave-js-server-python` optionally supports `orjson` which can be installed with the `orjson` extra (e.g. `pip install zwave-js-server-python[orjson]`)
@@ -1,13 +1,13 @@
1
1
  zwave_js_server/__init__.py,sha256=Ey3O4Tha56uU-M92oLJmQHupCJ7B9oZmxlQTo8pGUM8,45
2
2
  zwave_js_server/__main__.py,sha256=WrQz8N_YAXMpHeyFLHW4YBw6nFyAAXE-GXjuyIUAfQI,3659
3
- zwave_js_server/client.py,sha256=v22E_-uYPhataZTDCdIKTMPAsEhKoxh8x5p6NN1TGBY,19828
3
+ zwave_js_server/client.py,sha256=bOeWL_-XX3NX20KUgiVcOH0dk6JR8uH1K2LGw3-N_BM,20022
4
4
  zwave_js_server/dump.py,sha256=Tp1t-z43pzH_XY8q6y6wxnMMro1VX2xvkJfO3LfdwvA,1522
5
- zwave_js_server/event.py,sha256=_G_eFqqdIIdwJmFFI24JVzEQTnn8MFqbg0LI88Iw4_A,2003
5
+ zwave_js_server/event.py,sha256=5MHjHQMk1WbHFWfXdErzfGfu0XmgIVRPOzWKbdx8WtY,2030
6
6
  zwave_js_server/exceptions.py,sha256=QIfk9v7g0ZmUzmR8PyIEKZ6yeMyvTtcjH9vLdm-fv-8,6147
7
7
  zwave_js_server/firmware.py,sha256=-3I_oE30dN9EICtVPhuYxZiUbKb0OGNz7uZcLwxMR7Q,2380
8
8
  zwave_js_server/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  zwave_js_server/version.py,sha256=p8VrajAOTouropkkKJIaNL2LVQywjVpK1e1gnaLUWYY,400
10
- zwave_js_server/const/__init__.py,sha256=syIyMiNawrijNkccHB6yPq2RTX2nwufgQh-bpc89bTU,13860
10
+ zwave_js_server/const/__init__.py,sha256=iW2HAGU6JV-CHLGt_qCLVZP-leIy7UHAmZH8wYaGx74,13807
11
11
  zwave_js_server/const/command_class/__init__.py,sha256=WilOppnr9CXahDjEEkAXyh_j7iCq_qZ1GtBkjWLoQUg,37
12
12
  zwave_js_server/const/command_class/barrier_operator.py,sha256=qk5IQ0711BhsrcgChQe3nxYUSNMkz1hQ44TaKOF0D2Y,819
13
13
  zwave_js_server/const/command_class/basic.py,sha256=eUtHzrCXyCrh3dn-V38_8jpD--k3zqqfA1_6k3a7LN0,95
@@ -18,9 +18,9 @@ zwave_js_server/const/command_class/entry_control.py,sha256=FQ3wJY6099FxzTNZgRHL
18
18
  zwave_js_server/const/command_class/humidity_control.py,sha256=MwpaQqu_9THooCjkoms-TDJQcydqx9hulT6JguQIorU,1893
19
19
  zwave_js_server/const/command_class/lock.py,sha256=oyiFFgkip9zNIiR1vB61Z4Jov7lw97vGEe2LyMBLwCg,6628
20
20
  zwave_js_server/const/command_class/meter.py,sha256=8Dc2WNzU-zpVYv5itrXI-XJl1QwSr7O9I6Uv590aheo,3997
21
- zwave_js_server/const/command_class/multilevel_sensor.py,sha256=0RZEzfXGrGm9r0J31uoZLC-fS-aQaMHR5vb4FvUnorE,32902
21
+ zwave_js_server/const/command_class/multilevel_sensor.py,sha256=Js5ZIORRkGAEfJa491m91Jf8L0Owxg9ibUBQTSaUSP4,37067
22
22
  zwave_js_server/const/command_class/multilevel_switch.py,sha256=I93kamL24Mjqn-0n6YnhuUtu-C5WfobNM5RBmGSlKw4,575
23
- zwave_js_server/const/command_class/notification.py,sha256=QV5DL8mE75gYLU22-qL9S0FrxFMxtR1mj--Hzs5M7vQ,37672
23
+ zwave_js_server/const/command_class/notification.py,sha256=psLLSYNsBaKq3lEOTXdChvLrNPwZK2CD3BCGWmD1QGs,37899
24
24
  zwave_js_server/const/command_class/power_level.py,sha256=R9gDAC4sxwfayKYQIIMMNDmv5TPfsDc0a9FhQRSWBe8,379
25
25
  zwave_js_server/const/command_class/protection.py,sha256=wDTw6aP0XV70bvj4uSzr2Yy0a9VWTTCsjdTCY4ojkZQ,119
26
26
  zwave_js_server/const/command_class/scene_activation.py,sha256=cDzsjKrYR-cO050hakMsI9e_DCVMgjYYVJODwvETmQg,111
@@ -41,10 +41,10 @@ zwave_js_server/model/log_message.py,sha256=IaIzJK-vdQqocNB2EG3WK5RR7chBW4ZHPS0I
41
41
  zwave_js_server/model/notification.py,sha256=PY4QqXmimt5wiM7L3FnXgJSbV9KAPrHSG_PL0vP6pv4,6164
42
42
  zwave_js_server/model/statistics.py,sha256=28Gwmocxr4lzLqj8t6aalCzsz4ecrO6QJbUvfnOIQ6Y,3180
43
43
  zwave_js_server/model/utils.py,sha256=crLn4Jj6oCcDwJRDZgPO-fdTLSmV8R0DfwCNp7aKTOg,1156
44
- zwave_js_server/model/value.py,sha256=YaEAsS12-6dVW1jWceMXwvTZ-jooPfqFPbsPkF-r_h4,12430
44
+ zwave_js_server/model/value.py,sha256=6vvjWNPaMmYTXnn1PVsLI0B8wCGXxJ3syEpOSLVPquw,13551
45
45
  zwave_js_server/model/version.py,sha256=WjgC_kRLN14gsMAc0FR47Uvg7oihDxaPUWknGy2xMQE,1271
46
- zwave_js_server/model/controller/__init__.py,sha256=eW5HoulNj2jIA9FWtUQHVYsB4yCMLYuLIJPwanp_bnA,35930
47
- zwave_js_server/model/controller/data_model.py,sha256=ZoPxiODEL3UB5YUKbuPr0CjmtkIHNv3Q1UqXgSYP3Yw,834
46
+ zwave_js_server/model/controller/__init__.py,sha256=0b08BXWKLU-4cNvNccP4MvmD8MG3feN051mPey3IzGU,36310
47
+ zwave_js_server/model/controller/data_model.py,sha256=aFhoQ52pI-hDmEuuRy6jFEBReho6_OV8nVQQrTffa9g,822
48
48
  zwave_js_server/model/controller/event_model.py,sha256=sE2bzgOfarl53lsgoWR7WeSL-geWCGx65qZszIy4bp0,6206
49
49
  zwave_js_server/model/controller/firmware.py,sha256=lBAq7B9RMvOPX5kQJdIBbkXFay_KOv0eF8h0NOe7dm0,2906
50
50
  zwave_js_server/model/controller/inclusion_and_provisioning.py,sha256=yIhHRmgkFaKESs9XnkZex5Abghua5O8lfFSBqwiMXhc,7268
@@ -65,9 +65,9 @@ zwave_js_server/util/command_class/__init__.py,sha256=sRxti47ekLTzfk8B609CMQumIb
65
65
  zwave_js_server/util/command_class/energy_production.py,sha256=89h5d7hZdvbbMoT1j9LgdlfonPt16-ED-_feZat-PIQ,1488
66
66
  zwave_js_server/util/command_class/meter.py,sha256=edJLxyIh93LTs9j-95XnyYj80yrrP3E5v8wanuet8hI,1257
67
67
  zwave_js_server/util/command_class/multilevel_sensor.py,sha256=ypW90oCEwRlt3l81iqEaYPXziraxitBOzFaub85ZYn8,1426
68
- zwave_js_server_python-0.54.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
- zwave_js_server_python-0.54.0.dist-info/METADATA,sha256=QFNybeR9UKyfY2z41qMu5gk_xeSVeMhyAir1cNf4kNU,1756
70
- zwave_js_server_python-0.54.0.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
71
- zwave_js_server_python-0.54.0.dist-info/entry_points.txt,sha256=lvzma7Rd_3FW_k-_xGuTfpvcvA2MR_22DOz5f1t7-xg,73
72
- zwave_js_server_python-0.54.0.dist-info/top_level.txt,sha256=-hwsl-i4Av5Op_yfOHC_OP56KPmzp_iVEkeohRIN5Ng,16
73
- zwave_js_server_python-0.54.0.dist-info/RECORD,,
68
+ zwave_js_server_python-0.55.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
+ zwave_js_server_python-0.55.1.dist-info/METADATA,sha256=UDSjAgZ9OhT6A7DzwyyJdKTfJy_iCMfZFJFa0OzEGOQ,15020
70
+ zwave_js_server_python-0.55.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
71
+ zwave_js_server_python-0.55.1.dist-info/entry_points.txt,sha256=lvzma7Rd_3FW_k-_xGuTfpvcvA2MR_22DOz5f1t7-xg,73
72
+ zwave_js_server_python-0.55.1.dist-info/top_level.txt,sha256=-hwsl-i4Av5Op_yfOHC_OP56KPmzp_iVEkeohRIN5Ng,16
73
+ zwave_js_server_python-0.55.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,54 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: zwave-js-server-python
3
- Version: 0.54.0
4
- Summary: Python wrapper for zwave-js-server
5
- Home-page: https://github.com/home-assistant-libs/zwave-js-server-python
6
- Download-URL: https://github.com/home-assistant-libs/zwave-js-server-python
7
- Author: Home Assistant Team
8
- Author-email: hello@home-assistant.io
9
- Classifier: Development Status :: 4 - Beta
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Natural Language :: English
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Topic :: Home Automation
15
- Requires-Python: >=3.11
16
- Description-Content-Type: text/markdown
17
- License-File: LICENSE
18
- Requires-Dist: aiohttp >3
19
- Requires-Dist: pydantic >=1.10.0
20
-
21
- # zwave-js-server-python
22
-
23
- Python library for communicating with [zwave-js-server](https://github.com/zwave-js/zwave-js-server/). Goal for this library is to replicate the structure and the events of Z-Wave JS 1:1. So it has a `Driver`, `Controller` and `Node` classes.
24
-
25
- ## Setup development environment
26
-
27
- To setup your development environment, run `scripts/setup`, which will install all requirements and set up pre-commit checks.
28
-
29
- ## Trying it out
30
-
31
- ```shell
32
- python3 -m zwave_js_server ws://localhost:3000
33
- ```
34
-
35
- Or get the version of the server
36
-
37
- ```shell
38
- python3 -m zwave_js_server ws://localhost:3000 --server-version
39
- ```
40
-
41
- Or dump the state. Optionally add `--event-timeout 5` if you want to listen 5 seconds extra for events.
42
-
43
- ```shell
44
- python3 -m zwave_js_server ws://localhost:3000 --dump-state
45
- ```
46
-
47
- ## Sending commands
48
-
49
- ```python
50
- try:
51
- result = await client.async_send_command({ "command": "start_listening" })
52
- except zwave_js_server.client.FailedCommand as err:
53
- print("Command failed with", err.error_code)
54
- ```