velbus-aio 2023.11.0__tar.gz → 2024.4.0__tar.gz

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.

Potentially problematic release.


This version of velbus-aio might be problematic. Click here for more details.

Files changed (114) hide show
  1. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/MANIFEST.in +1 -1
  2. {velbus-aio-2023.11.0/velbus_aio.egg-info → velbus-aio-2024.4.0}/PKG-INFO +3 -1
  3. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/README.md +1 -0
  4. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/pyproject.toml +3 -2
  5. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0/velbus_aio.egg-info}/PKG-INFO +3 -1
  6. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbus_aio.egg-info/SOURCES.txt +2 -2
  7. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/channels.py +20 -0
  8. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/command_registry.py +18 -0
  9. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/const.py +1 -0
  10. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/controller.py +1 -0
  11. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/handler.py +2 -59
  12. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/helpers.py +1 -0
  13. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/message.py +1 -0
  14. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/__init__.py +2 -1
  15. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/blind_status.py +1 -0
  16. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/bus_active.py +1 -0
  17. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/bus_error_counter_status.py +1 -0
  18. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/bus_error_counter_status_request.py +1 -0
  19. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/bus_off.py +1 -0
  20. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/channel_name_part1.py +15 -0
  21. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/channel_name_part2.py +14 -0
  22. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/channel_name_part3.py +14 -0
  23. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/channel_name_request.py +2 -1
  24. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/clear_led.py +1 -0
  25. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/counter_status.py +1 -0
  26. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/counter_status_request.py +1 -0
  27. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/cover_down.py +1 -0
  28. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/cover_off.py +1 -0
  29. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/cover_position.py +1 -0
  30. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/cover_up.py +1 -0
  31. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/dali_device_settings.py +2 -1
  32. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/dali_device_settings_request.py +2 -1
  33. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/dali_dim_value_status.py +2 -1
  34. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/dimmer_channel_status.py +2 -1
  35. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/dimmer_status.py +2 -1
  36. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/edge_set_custom_color.py +1 -0
  37. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/fast_blinking_led.py +1 -0
  38. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/forced_off.py +1 -0
  39. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/forced_on.py +1 -0
  40. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/interface_status_request.py +1 -0
  41. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/ir_receiver_status.py +1 -0
  42. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/kwh_status.py +1 -0
  43. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/light_value_request.py +1 -0
  44. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/memo_text.py +1 -0
  45. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/memory_data.py +1 -0
  46. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/memory_data_block.py +1 -0
  47. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/memory_dump_request.py +1 -0
  48. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/module_status.py +12 -0
  49. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/module_status_request.py +1 -0
  50. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/module_subtype.py +1 -0
  51. velbus-aio-2024.4.0/velbusaio/messages/module_type.py +186 -0
  52. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/module_type_request.py +1 -0
  53. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/push_button_status.py +1 -0
  54. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/raw.py +1 -0
  55. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/read_data_block_from_memory.py +1 -0
  56. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/read_data_from_memory.py +1 -0
  57. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/realtime_clock_status_request.py +1 -0
  58. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/receive_buffer_full.py +1 -0
  59. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/receive_ready.py +1 -0
  60. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/relay_status.py +1 -0
  61. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/restore_dimmer.py +6 -2
  62. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/select_program.py +1 -0
  63. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/sensor_settings_request.py +1 -0
  64. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/sensor_temp_request.py +1 -0
  65. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/sensor_temperature.py +1 -0
  66. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/set_date.py +5 -4
  67. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/set_daylight_saving.py +5 -4
  68. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/set_dimmer.py +6 -2
  69. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/set_led.py +1 -0
  70. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/set_realtime_clock.py +5 -4
  71. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/set_temperature.py +1 -0
  72. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/slider_status.py +5 -1
  73. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/slow_blinking_led.py +1 -0
  74. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/start_relay_blinking_timer.py +1 -0
  75. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/start_relay_timer.py +1 -0
  76. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/switch_relay_off.py +1 -0
  77. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/switch_relay_on.py +1 -0
  78. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/switch_to_comfort.py +1 -0
  79. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/switch_to_day.py +1 -0
  80. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/switch_to_night.py +1 -0
  81. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/switch_to_safe.py +1 -0
  82. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_sensor_settings_part1.py +1 -0
  83. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_sensor_settings_part2.py +1 -0
  84. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_sensor_settings_part3.py +1 -0
  85. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_sensor_settings_part4.py +1 -0
  86. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_sensor_settings_request.py +1 -0
  87. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_sensor_status.py +1 -0
  88. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_set_cooling.py +1 -0
  89. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/temp_set_heating.py +1 -0
  90. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/update_led_status.py +1 -0
  91. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/very_fast_blinking_led.py +1 -0
  92. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/write_data_to_memory.py +1 -0
  93. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/write_memory_block.py +1 -0
  94. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/write_module_address_and_serial_number.py +1 -0
  95. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/module.py +20 -21
  96. velbus-aio-2024.4.0/velbusaio/protocol.json +10122 -0
  97. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/protocol.py +2 -2
  98. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/raw_message.py +6 -6
  99. velbus-aio-2023.11.0/velbusaio/messages/module_type.py +0 -83
  100. velbus-aio-2023.11.0/velbusaio/moduleprotocol/protocol.json +0 -26507
  101. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/LICENSE +0 -0
  102. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/requirements.txt +0 -0
  103. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/setup.cfg +0 -0
  104. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/setup.py +0 -0
  105. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbus_aio.egg-info/dependency_links.txt +0 -0
  106. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbus_aio.egg-info/not-zip-safe +0 -0
  107. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbus_aio.egg-info/requires.txt +0 -0
  108. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbus_aio.egg-info/top_level.txt +0 -0
  109. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/__init__.py +0 -0
  110. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/discovery.py +0 -0
  111. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/exceptions.py +0 -0
  112. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/messages/edge_set_color.py +0 -0
  113. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/py.typed +0 -0
  114. {velbus-aio-2023.11.0 → velbus-aio-2024.4.0}/velbusaio/util.py +0 -0
@@ -2,4 +2,4 @@ include LICENSE
2
2
  include README.md
3
3
  include requirements.txt
4
4
  include velbusaio/py.typed
5
- include velbusaio/moduleprotocol/protocol.json
5
+ include velbusaio/protocol.json
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: velbus-aio
3
- Version: 2023.11.0
3
+ Version: 2024.4.0
4
4
  Summary: Open-source home automation platform running on Python 3.
5
5
  Author-email: Maikel Punie <maikel.punie@gmail.com>
6
6
  License: MIT
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
21
22
  Classifier: Topic :: Home Automation
22
23
  Classifier: Topic :: Software Development :: Libraries
23
24
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -29,6 +30,7 @@ Requires-Dist: pyserial-asyncio>=0.5
29
30
  Requires-Dist: backoff>=1.10.0
30
31
 
31
32
  ![CI](https://github.com/Cereal2nd/velbus-aio/actions/workflows/main.yml/badge.svg)
33
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Cereal2nd/velbus-aio/master.svg)](https://results.pre-commit.ci/latest/github/Cereal2nd/velbus-aio/master)
32
34
 
33
35
  # velbus-aio
34
36
 
@@ -1,4 +1,5 @@
1
1
  ![CI](https://github.com/Cereal2nd/velbus-aio/actions/workflows/main.yml/badge.svg)
2
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Cereal2nd/velbus-aio/master.svg)](https://results.pre-commit.ci/latest/github/Cereal2nd/velbus-aio/master)
2
3
 
3
4
  # velbus-aio
4
5
 
@@ -4,7 +4,7 @@ requires = ["setuptools", "wheel"]
4
4
  [project]
5
5
  name = "velbus-aio"
6
6
  license = {text = "MIT"}
7
- version = "2023.11.0"
7
+ version = "2024.4.0"
8
8
  description = "Open-source home automation platform running on Python 3."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -22,6 +22,7 @@ classifiers = [
22
22
  "Programming Language :: Python :: 3.9",
23
23
  "Programming Language :: Python :: 3.10",
24
24
  "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
25
26
  "Topic :: Home Automation",
26
27
  "Topic :: Software Development :: Libraries",
27
28
  "Topic :: Software Development :: Libraries :: Python Modules",
@@ -50,7 +51,7 @@ exclude_dirs = ["tests"]
50
51
  skips = ["B301", "B403", "B323", "B104", "B110"]
51
52
 
52
53
  [tool.bumpver]
53
- current_version = "2023.11.0"
54
+ current_version = "2024.4.0"
54
55
  version_pattern = "YYYY.MM.INC0"
55
56
  commit_message = "bump version {old_version} -> {new_version}"
56
57
  commit = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: velbus-aio
3
- Version: 2023.11.0
3
+ Version: 2024.4.0
4
4
  Summary: Open-source home automation platform running on Python 3.
5
5
  Author-email: Maikel Punie <maikel.punie@gmail.com>
6
6
  License: MIT
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
21
22
  Classifier: Topic :: Home Automation
22
23
  Classifier: Topic :: Software Development :: Libraries
23
24
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -29,6 +30,7 @@ Requires-Dist: pyserial-asyncio>=0.5
29
30
  Requires-Dist: backoff>=1.10.0
30
31
 
31
32
  ![CI](https://github.com/Cereal2nd/velbus-aio/actions/workflows/main.yml/badge.svg)
33
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Cereal2nd/velbus-aio/master.svg)](https://results.pre-commit.ci/latest/github/Cereal2nd/velbus-aio/master)
32
34
 
33
35
  # velbus-aio
34
36
 
@@ -21,6 +21,7 @@ velbusaio/handler.py
21
21
  velbusaio/helpers.py
22
22
  velbusaio/message.py
23
23
  velbusaio/module.py
24
+ velbusaio/protocol.json
24
25
  velbusaio/protocol.py
25
26
  velbusaio/py.typed
26
27
  velbusaio/raw_message.py
@@ -106,5 +107,4 @@ velbusaio/messages/update_led_status.py
106
107
  velbusaio/messages/very_fast_blinking_led.py
107
108
  velbusaio/messages/write_data_to_memory.py
108
109
  velbusaio/messages/write_memory_block.py
109
- velbusaio/messages/write_module_address_and_serial_number.py
110
- velbusaio/moduleprotocol/protocol.json
110
+ velbusaio/messages/write_module_address_and_serial_number.py
@@ -1,6 +1,7 @@
1
1
  """
2
2
  author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import asyncio
@@ -135,6 +136,18 @@ class Channel:
135
136
  if k != "_writer" and k != "_on_status_update" and k != "_name_parts"
136
137
  }
137
138
 
139
+ def to_json(self) -> dict:
140
+ d = self.__dict__
141
+ return {
142
+ k: d[k]
143
+ for k in d
144
+ if k != "_writer"
145
+ and k != "_on_status_update"
146
+ and k != "_name_parts"
147
+ and k != "_module"
148
+ and k != "__name__"
149
+ }
150
+
138
151
  def __setstate__(self, state):
139
152
  self.__dict__.update(state)
140
153
  self._on_status_update = []
@@ -264,6 +277,10 @@ class Blind(Channel):
264
277
 
265
278
  async def set_position(self, position: int) -> None:
266
279
  # may not be supported by the module
280
+ if position == 100:
281
+ # at least VMB1BLS ignores command 0x1C with position 0x64
282
+ await self.close()
283
+ return
267
284
  cls = commandRegistry.get_command(0x1C, self._module.get_type())
268
285
  msg = cls(self._address)
269
286
  msg.channel = self._num
@@ -537,6 +554,9 @@ class Temperature(Channel):
537
554
  def get_climate_mode(self) -> str:
538
555
  return self._cstatus
539
556
 
557
+ def get_cool_mode(self) -> str:
558
+ return self._cool_mode
559
+
540
560
  async def set_temp(self, temp: float) -> None:
541
561
  cls = commandRegistry.get_command(0xE4, self._module.get_type())
542
562
  msg = cls(self._address)
@@ -1,12 +1,14 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com> and Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  MODULE_DIRECTORY = {
7
8
  0x01: "VMB8PB",
8
9
  0x02: "VMB1RY",
9
10
  0x03: "VMB1BL",
11
+ 0x04: "VMB4LEDPWM-20",
10
12
  0x05: "VMB6IN",
11
13
  0x07: "VMB1DM",
12
14
  0x08: "VMB4RY",
@@ -65,6 +67,22 @@ MODULE_DIRECTORY = {
65
67
  0x43: "VMBIN",
66
68
  0x44: "VMB4PB",
67
69
  0x45: "VMBDALI",
70
+ 0x48: "VMB4RYLD-10",
71
+ 0x49: "VMB4RYNO-10",
72
+ 0x4A: "VMB2BLE-10",
73
+ 0x4B: "VMB8DC-20",
74
+ 0x4C: "VMB6PB-20",
75
+ 0x4F: "VMBEL1-20",
76
+ 0x50: "VMBEL2-20",
77
+ 0x51: "VMBEL4-20",
78
+ 0x52: "VMBELO-20",
79
+ 0x53: "VMBGP1-20",
80
+ 0x54: "VMBGP2-20",
81
+ 0x55: "VMBGP4-20",
82
+ 0x56: "VMBGPO-20",
83
+ 0x5A: "VMBDALI-20",
84
+ 0x5C: "VMBEL4PIR-20",
85
+ 0x5F: "VMBGP4PIR-20",
68
86
  }
69
87
 
70
88
 
@@ -1,6 +1,7 @@
1
1
  """
2
2
  Author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from typing import Final
@@ -1,6 +1,7 @@
1
1
  """
2
2
  Main interface for the velbusaio lib
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import asyncio
@@ -2,6 +2,7 @@
2
2
  Velbus packet handler
3
3
  :Author maikel punie <maikel.punie@gmail.com>
4
4
  """
5
+
5
6
  from __future__ import annotations
6
7
 
7
8
  import asyncio
@@ -9,7 +10,6 @@ import json
9
10
  import logging
10
11
  import re
11
12
  from typing import TYPE_CHECKING, Awaitable, Callable
12
-
13
13
  import pkg_resources
14
14
 
15
15
  from velbusaio.command_registry import commandRegistry
@@ -39,7 +39,7 @@ class PacketHandler:
39
39
  self._scan_complete = False
40
40
  self._scan_complete_event = asyncio.Event()
41
41
  with open(
42
- pkg_resources.resource_filename(__name__, "moduleprotocol/protocol.json")
42
+ pkg_resources.resource_filename(__name__, "protocol.json")
43
43
  ) as protocol_file:
44
44
  self.pdata = json.load(protocol_file)
45
45
 
@@ -118,63 +118,6 @@ class PacketHandler:
118
118
  )
119
119
  )
120
120
 
121
- # def _handle_message(self, rawMsg: RawMessage) -> None:
122
- # module_type = self._velbus.get_module(rawMsg.address).get_type()
123
- # this_msg = keys_exists(
124
- # self.pdata, "ModuleTypes", h2(module_type), "Messages", h2(rawMsg.command), "Data"
125
- # )
126
- # if this_msg and "PerByte" in this_msg:
127
- # self._per_byte(this_msg["PerByte"], rawMsg)
128
-
129
- # def _per_byte(self, cmsg, rawMsg: RawMessage) -> dict:
130
- # result = {}
131
- # byte_index = 0
132
- # for byte in rawMsg.data:
133
- # num = str(byte_index)
134
- # # only do something if its defined
135
- # if num not in cmsg:
136
- # continue
137
- # # check if we can do a binary match
138
- # for mat in cmsg[num]["Match"]:
139
- # if (
140
- # (mat.startswith("%") and re.match(mat[1:], f"{byte:08b}"))
141
- # or mat == f"{byte:08b}"
142
- # or mat == f"{byte:02x}"
143
- # ):
144
- # result = self._per_byte_handle(
145
- # result, cmsg[num]["Match"][mat], byte
146
- # )
147
- # byte_index += 1
148
- # return result
149
-
150
- # def _per_byte_handle(self, result: dict, todo: dict, byte: int) -> dict:
151
- # if "Channel" in todo:
152
- # result["Channel"] = todo["Channel"]
153
- # if "Value" in todo:
154
- # result["Value"] = todo["Value"]
155
- # if "Convert" in todo:
156
- # result["ValueList"] = []
157
- # if todo["Convert"] == "Decimal":
158
- # result["ValueList"].append(int(byte))
159
- # elif todo["Convert"] == "Counter":
160
- # result["ValueList"].append(f"{byte:02x}")
161
- # elif todo["Convert"] == "Temperature":
162
- # print("CONVERT temperature")
163
- # elif todo["Convert"] == "Divider":
164
- # bin_str = f"{byte:08b}"
165
- # chan = bin_str[6:]
166
- # val = bin_str[:5]
167
- # print(f"CONVERT Divider {chan} {val}")
168
- # elif todo["Convert"] == "Channel":
169
- # print("CONVERT Channel")
170
- # elif todo["Convert"] == "ChannelBit":
171
- # print("CONVERT ChannelBit")
172
- # elif todo["Convert"].startswith("ChannelBitStatus"):
173
- # print("CONVERT ChannelBitStatus")
174
- # else:
175
- # self._log.error("UNKNOWN convert requested: {}".format(todo["Convert"]))
176
- # return result
177
-
178
121
  async def _handle_module_type(self, msg: Message) -> None:
179
122
  """
180
123
  load the module data
@@ -1,6 +1,7 @@
1
1
  """
2
2
  Helper functions
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import os
@@ -1,6 +1,7 @@
1
1
  """
2
2
  The velbus abstract message class
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import json
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.messages.blind_status import BlindStatusMessage, BlindStatusNgMessage
@@ -54,7 +55,7 @@ from velbusaio.messages.raw import MeteoRawMessage, SensorRawMessage
54
55
  from velbusaio.messages.module_status import ModuleStatusMessage, ModuleStatusMessage2
55
56
  from velbusaio.messages.module_status_request import ModuleStatusRequestMessage
56
57
  from velbusaio.messages.module_subtype import ModuleSubTypeMessage
57
- from velbusaio.messages.module_type import ModuleTypeMessage
58
+ from velbusaio.messages.module_type import ModuleTypeMessage, ModuleType2Message
58
59
  from velbusaio.messages.module_type_request import ModuleTypeRequestMessage
59
60
  from velbusaio.messages.push_button_status import PushButtonStatusMessage
60
61
  from velbusaio.messages.read_data_block_from_memory import (
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import json
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -69,6 +70,20 @@ class ChannelNamePart1Message(Message):
69
70
  "VMBELPIR",
70
71
  "VMBDALI",
71
72
  "VMB4AN",
73
+ "VMB6PB-20",
74
+ "VMBEL1-20",
75
+ "VMBEL2-20",
76
+ "VMBEL4-20",
77
+ "VMBELO-20",
78
+ "VMBGP1-20",
79
+ "VMBGP2-20",
80
+ "VMBGP4-20",
81
+ "VMBGPO-20",
82
+ "VMBDALI-20",
83
+ "VMBEL4PIR-20",
84
+ "VMBGP4PIR-20",
85
+ "VMB4LEDPWM-20",
86
+ "VMB8DC-20",
72
87
  ],
73
88
  )
74
89
  class ChannelNamePart1Message2(ChannelNamePart1Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -69,6 +70,19 @@ class ChannelNamePart2Message(Message):
69
70
  "VMBELPIR",
70
71
  "VMBDALI",
71
72
  "VMB4AN",
73
+ "VMB6PB-20",
74
+ "VMBEL1-20",
75
+ "VMBEL2-20",
76
+ "VMBEL4-20",
77
+ "VMBELO-20",
78
+ "VMBGP1-20",
79
+ "VMBGP2-20",
80
+ "VMBGP4-20",
81
+ "VMBGPO-20",
82
+ "VMBDALI-20",
83
+ "VMBEL4PIR-20",
84
+ "VMBGP4PIR-20",
85
+ "VMB8DC-20",
72
86
  ],
73
87
  )
74
88
  class ChannelNamePart2Message2(ChannelNamePart2Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -69,6 +70,19 @@ class ChannelNamePart3Message(Message):
69
70
  "VMBELPIR",
70
71
  "VMBDALI",
71
72
  "VMB4AN",
73
+ "VMB6PB-20",
74
+ "VMBEL1-20",
75
+ "VMBEL2-20",
76
+ "VMBEL4-20",
77
+ "VMBELO-20",
78
+ "VMBGP1-20",
79
+ "VMBGP2-20",
80
+ "VMBGP4-20",
81
+ "VMBGPO-20",
82
+ "VMBDALI-20",
83
+ "VMBEL4PIR-20",
84
+ "VMBGP4PIR-20",
85
+ "VMB8DC-20",
72
86
  ],
73
87
  )
74
88
  class ChannelNamePart3Message2(ChannelNamePart3Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org> and Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -70,7 +71,7 @@ class ChannelNameRequestMessage2(ChannelNameRequestMessage):
70
71
  return bytes([COMMAND_CODE, tmp])
71
72
 
72
73
 
73
- @register(COMMAND_CODE, ["VMBDALI"])
74
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
74
75
  class ChannelNameRequestMessage3(ChannelNameRequestMessage):
75
76
  """
76
77
  send by:
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Niels Laukens
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import dataclasses
@@ -12,7 +13,7 @@ from velbusaio.message import Message
12
13
  COMMAND_CODE = 0xE8
13
14
 
14
15
 
15
- @register(COMMAND_CODE, ["VMBDALI"])
16
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
16
17
  class DaliDeviceSettingMsg(Message):
17
18
  """
18
19
  send by: VMBDALI
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Niels Laukens
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import enum
@@ -17,7 +18,7 @@ class DataSource(enum.Enum):
17
18
  FromDaliDevice = 1
18
19
 
19
20
 
20
- @register(COMMAND_CODE, ["VMBDALI"])
21
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
21
22
  class DaliDeviceSettingsRequest(Message):
22
23
  """
23
24
  send by:
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Niels Laukens
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -9,7 +10,7 @@ from velbusaio.message import Message
9
10
  COMMAND_CODE = 0xA5
10
11
 
11
12
 
12
- @register(COMMAND_CODE, ["VMBDALI"])
13
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
13
14
  class DimValueStatus(Message):
14
15
  """
15
16
  send by: VMBDALI
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Frank van Breugel
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -21,7 +22,7 @@ LED_FAST_BLINKING = 1 << 5
21
22
  LED_VERY_FAST_BLINKING = 1 << 4
22
23
 
23
24
 
24
- @register(COMMAND_CODE, ["VMB4DC", "VMBDMI", "VMBDMI-R"])
25
+ @register(COMMAND_CODE, ["VMB4DC", "VMBDMI", "VMBDMI-R", "VMB8DC-20"])
25
26
  class DimmerChannelStatusMessage(Message):
26
27
  """
27
28
  sent by: VMB4DC
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Frank van Breugel
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -24,7 +25,7 @@ LED_FAST_BLINKING = 1 << 5
24
25
  LED_VERY_FAST_BLINKING = 1 << 4
25
26
 
26
27
 
27
- @register(COMMAND_CODE, ["VMBDME", "VMB1LED"])
28
+ @register(COMMAND_CODE, ["VMB1DM", "VMBDME", "VMB1LED"])
28
29
  class DimmerStatusMessage(Message):
29
30
  """
30
31
  sent by: VMBDME
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register