velbus-aio 2023.11.0__py3-none-any.whl → 2024.4.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.

Potentially problematic release.


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

Files changed (99) hide show
  1. {velbus_aio-2023.11.0.dist-info → velbus_aio-2024.4.0.dist-info}/METADATA +3 -1
  2. velbus_aio-2024.4.0.dist-info/RECORD +103 -0
  3. {velbus_aio-2023.11.0.dist-info → velbus_aio-2024.4.0.dist-info}/WHEEL +1 -1
  4. velbusaio/channels.py +20 -0
  5. velbusaio/command_registry.py +18 -0
  6. velbusaio/const.py +1 -0
  7. velbusaio/controller.py +1 -0
  8. velbusaio/handler.py +2 -59
  9. velbusaio/helpers.py +1 -0
  10. velbusaio/message.py +1 -0
  11. velbusaio/messages/__init__.py +2 -1
  12. velbusaio/messages/blind_status.py +1 -0
  13. velbusaio/messages/bus_active.py +1 -0
  14. velbusaio/messages/bus_error_counter_status.py +1 -0
  15. velbusaio/messages/bus_error_counter_status_request.py +1 -0
  16. velbusaio/messages/bus_off.py +1 -0
  17. velbusaio/messages/channel_name_part1.py +15 -0
  18. velbusaio/messages/channel_name_part2.py +14 -0
  19. velbusaio/messages/channel_name_part3.py +14 -0
  20. velbusaio/messages/channel_name_request.py +2 -1
  21. velbusaio/messages/clear_led.py +1 -0
  22. velbusaio/messages/counter_status.py +1 -0
  23. velbusaio/messages/counter_status_request.py +1 -0
  24. velbusaio/messages/cover_down.py +1 -0
  25. velbusaio/messages/cover_off.py +1 -0
  26. velbusaio/messages/cover_position.py +1 -0
  27. velbusaio/messages/cover_up.py +1 -0
  28. velbusaio/messages/dali_device_settings.py +2 -1
  29. velbusaio/messages/dali_device_settings_request.py +2 -1
  30. velbusaio/messages/dali_dim_value_status.py +2 -1
  31. velbusaio/messages/dimmer_channel_status.py +2 -1
  32. velbusaio/messages/dimmer_status.py +2 -1
  33. velbusaio/messages/edge_set_custom_color.py +1 -0
  34. velbusaio/messages/fast_blinking_led.py +1 -0
  35. velbusaio/messages/forced_off.py +1 -0
  36. velbusaio/messages/forced_on.py +1 -0
  37. velbusaio/messages/interface_status_request.py +1 -0
  38. velbusaio/messages/ir_receiver_status.py +1 -0
  39. velbusaio/messages/kwh_status.py +1 -0
  40. velbusaio/messages/light_value_request.py +1 -0
  41. velbusaio/messages/memo_text.py +1 -0
  42. velbusaio/messages/memory_data.py +1 -0
  43. velbusaio/messages/memory_data_block.py +1 -0
  44. velbusaio/messages/memory_dump_request.py +1 -0
  45. velbusaio/messages/module_status.py +12 -0
  46. velbusaio/messages/module_status_request.py +1 -0
  47. velbusaio/messages/module_subtype.py +1 -0
  48. velbusaio/messages/module_type.py +117 -14
  49. velbusaio/messages/module_type_request.py +1 -0
  50. velbusaio/messages/push_button_status.py +1 -0
  51. velbusaio/messages/raw.py +1 -0
  52. velbusaio/messages/read_data_block_from_memory.py +1 -0
  53. velbusaio/messages/read_data_from_memory.py +1 -0
  54. velbusaio/messages/realtime_clock_status_request.py +1 -0
  55. velbusaio/messages/receive_buffer_full.py +1 -0
  56. velbusaio/messages/receive_ready.py +1 -0
  57. velbusaio/messages/relay_status.py +1 -0
  58. velbusaio/messages/restore_dimmer.py +6 -2
  59. velbusaio/messages/select_program.py +1 -0
  60. velbusaio/messages/sensor_settings_request.py +1 -0
  61. velbusaio/messages/sensor_temp_request.py +1 -0
  62. velbusaio/messages/sensor_temperature.py +1 -0
  63. velbusaio/messages/set_date.py +5 -4
  64. velbusaio/messages/set_daylight_saving.py +5 -4
  65. velbusaio/messages/set_dimmer.py +6 -2
  66. velbusaio/messages/set_led.py +1 -0
  67. velbusaio/messages/set_realtime_clock.py +5 -4
  68. velbusaio/messages/set_temperature.py +1 -0
  69. velbusaio/messages/slider_status.py +5 -1
  70. velbusaio/messages/slow_blinking_led.py +1 -0
  71. velbusaio/messages/start_relay_blinking_timer.py +1 -0
  72. velbusaio/messages/start_relay_timer.py +1 -0
  73. velbusaio/messages/switch_relay_off.py +1 -0
  74. velbusaio/messages/switch_relay_on.py +1 -0
  75. velbusaio/messages/switch_to_comfort.py +1 -0
  76. velbusaio/messages/switch_to_day.py +1 -0
  77. velbusaio/messages/switch_to_night.py +1 -0
  78. velbusaio/messages/switch_to_safe.py +1 -0
  79. velbusaio/messages/temp_sensor_settings_part1.py +1 -0
  80. velbusaio/messages/temp_sensor_settings_part2.py +1 -0
  81. velbusaio/messages/temp_sensor_settings_part3.py +1 -0
  82. velbusaio/messages/temp_sensor_settings_part4.py +1 -0
  83. velbusaio/messages/temp_sensor_settings_request.py +1 -0
  84. velbusaio/messages/temp_sensor_status.py +1 -0
  85. velbusaio/messages/temp_set_cooling.py +1 -0
  86. velbusaio/messages/temp_set_heating.py +1 -0
  87. velbusaio/messages/update_led_status.py +1 -0
  88. velbusaio/messages/very_fast_blinking_led.py +1 -0
  89. velbusaio/messages/write_data_to_memory.py +1 -0
  90. velbusaio/messages/write_memory_block.py +1 -0
  91. velbusaio/messages/write_module_address_and_serial_number.py +1 -0
  92. velbusaio/module.py +20 -21
  93. velbusaio/protocol.json +10122 -0
  94. velbusaio/protocol.py +2 -2
  95. velbusaio/raw_message.py +6 -6
  96. velbus_aio-2023.11.0.dist-info/RECORD +0 -103
  97. velbusaio/moduleprotocol/protocol.json +0 -26507
  98. {velbus_aio-2023.11.0.dist-info → velbus_aio-2024.4.0.dist-info}/LICENSE +0 -0
  99. {velbus_aio-2023.11.0.dist-info → velbus_aio-2024.4.0.dist-info}/top_level.txt +0 -0
@@ -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
  import struct
@@ -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
  import struct
@@ -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
@@ -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: Danny De Gaspari
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: Danny De Gaspari
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: Danny De Gaspari
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
  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
@@ -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
  import struct
velbusaio/module.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """
2
2
  This represents a velbus module
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import logging
@@ -81,7 +82,7 @@ from velbusaio.messages.module_status import (
81
82
  )
82
83
  from velbusaio.messages.module_status_request import ModuleStatusRequestMessage
83
84
  from velbusaio.messages.module_subtype import ModuleSubTypeMessage
84
- from velbusaio.messages.module_type import ModuleTypeMessage
85
+ from velbusaio.messages.module_type import ModuleTypeMessage, ModuleType2Message
85
86
  from velbusaio.messages.push_button_status import PushButtonStatusMessage
86
87
  from velbusaio.messages.read_data_from_memory import ReadDataFromMemoryMessage
87
88
  from velbusaio.messages.relay_status import RelayStatusMessage, RelayStatusMessage2
@@ -91,6 +92,7 @@ from velbusaio.messages.slider_status import SliderStatusMessage
91
92
  from velbusaio.messages.slow_blinking_led import SlowBlinkingLedMessage
92
93
  from velbusaio.messages.temp_sensor_status import TempSensorStatusMessage
93
94
  from velbusaio.messages.update_led_status import UpdateLedStatusMessage
95
+ from velbusaio.channels import Temperature as TemperatureChannelType
94
96
 
95
97
 
96
98
  class Module:
@@ -110,7 +112,7 @@ class Module:
110
112
  build_week: int | None = None,
111
113
  cache_dir: str | None = None,
112
114
  ) -> Module:
113
- if module_type == 0x45:
115
+ if module_type == 0x45 or module_type == 0x5A:
114
116
  return VmbDali(
115
117
  module_address,
116
118
  module_type,
@@ -175,12 +177,14 @@ class Module:
175
177
  #
176
178
  # The solution would be that this functions knows were the temperature channels are located
177
179
  # and/or what the max number of subaddresses are for each module.
178
- if self._sub_address == {} and self.loaded:
179
- raise Exception("No subaddresses defined")
180
+ # if self._sub_address == {} and self.loaded:
181
+ # raise Exception("No subaddresses defined")
180
182
  for sub in range(1, 4):
181
183
  if sub not in self._sub_address:
182
184
  for i in range(((sub * 8) + 1), (((sub + 1) * 8) + 1)):
183
- if i in self._channels:
185
+ if i in self._channels and not isinstance(
186
+ self._channels[i], TemperatureChannelType
187
+ ):
184
188
  del self._channels[i]
185
189
 
186
190
  def _cache(self) -> None:
@@ -321,6 +325,7 @@ class Module:
321
325
  "cmode": message.mode_str,
322
326
  "cstatus": message.status_str,
323
327
  "sleep_timer": message.sleep_timer,
328
+ "cool_mode": message.cool_mode,
324
329
  },
325
330
  )
326
331
  await self._channels[chan].maybe_update_temperature(
@@ -445,7 +450,7 @@ class Module:
445
450
  await self._update_channel(
446
451
  channel, {"closed": channel_id in message.closed}
447
452
  )
448
- if type(self._channels[channel]) == Button:
453
+ if type(self._channels[channel]) is Button:
449
454
  # only treat 'enabled' if the channel is a Button
450
455
  await self._update_channel(
451
456
  channel, {"enabled": channel_id in message.enabled}
@@ -582,7 +587,11 @@ class Module:
582
587
  addr = "{high:02X}{low:02X}".format(
583
588
  high=message.high_address, low=message.low_address
584
589
  )
585
- mdata = self._data["Memory"]["1"]["Address"][addr]
590
+ if "Memory" not in self._data:
591
+ return
592
+ if "Address" not in self._data["Memory"]:
593
+ return
594
+ mdata = self._data["Memory"]["Address"][addr]
586
595
  if "ModuleName" in mdata and isinstance(self._name, dict):
587
596
  # if self._name is a dict we are still loading
588
597
  # if its a string it was already complete
@@ -698,9 +707,10 @@ class Module:
698
707
  self._name = None
699
708
  return
700
709
 
701
- for _memory_key, memory_part in self._data["Memory"].items():
702
- if "Address" in memory_part:
703
- for addr_int in memory_part["Address"].keys():
710
+ for memory_key, memory_part in self._data["Memory"].items():
711
+
712
+ if memory_key == "Address":
713
+ for addr_int in memory_part.keys():
704
714
  addr = struct.unpack(
705
715
  ">BB", struct.pack(">h", int("0x" + addr_int, 0))
706
716
  )
@@ -727,17 +737,6 @@ class Module:
727
737
  "ThermostatAddr" in self._data and self._data["ThermostatAddr"] != 0
728
738
  ):
729
739
  await self._update_channel(int(chan), {"thermostat": True})
730
- # add extra channel for program selection which is not in the channel list of the protocol.json file,
731
- # but is available in the messages list of the corresponding module.
732
- if keys_exists(self._data, "Messages", "B3"):
733
- self._channels[CHANNEL_SELECTED_PROGRAM] = SelectedProgram(
734
- self,
735
- CHANNEL_SELECTED_PROGRAM,
736
- "Selected Program",
737
- False,
738
- self._writer,
739
- self._address,
740
- )
741
740
 
742
741
 
743
742
  class VmbDali(Module):