velbus-aio 2023.11.0__py3-none-any.whl → 2023.12.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.
- {velbus_aio-2023.11.0.dist-info → velbus_aio-2023.12.0.dist-info}/METADATA +2 -1
- {velbus_aio-2023.11.0.dist-info → velbus_aio-2023.12.0.dist-info}/RECORD +17 -17
- {velbus_aio-2023.11.0.dist-info → velbus_aio-2023.12.0.dist-info}/WHEEL +1 -1
- velbusaio/channels.py +15 -0
- velbusaio/command_registry.py +15 -0
- velbusaio/messages/__init__.py +1 -1
- velbusaio/messages/dimmer_status.py +1 -1
- velbusaio/messages/module_type.py +116 -14
- velbusaio/messages/restore_dimmer.py +1 -1
- velbusaio/messages/set_date.py +4 -4
- velbusaio/messages/set_daylight_saving.py +4 -4
- velbusaio/messages/set_dimmer.py +1 -1
- velbusaio/messages/set_realtime_clock.py +4 -4
- velbusaio/messages/slider_status.py +1 -1
- velbusaio/module.py +9 -5
- {velbus_aio-2023.11.0.dist-info → velbus_aio-2023.12.0.dist-info}/LICENSE +0 -0
- {velbus_aio-2023.11.0.dist-info → velbus_aio-2023.12.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: velbus-aio
|
|
3
|
-
Version: 2023.
|
|
3
|
+
Version: 2023.12.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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
velbusaio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
velbusaio/channels.py,sha256=
|
|
3
|
-
velbusaio/command_registry.py,sha256=
|
|
2
|
+
velbusaio/channels.py,sha256=ezviD9AepEneuBezcWpk0tWoPZxbTit8wuMcBO44MsM,22848
|
|
3
|
+
velbusaio/command_registry.py,sha256=UJOknKYGDPb0pPuvsH42GetEVC-Sa3bMkiSExE6DfPc,4787
|
|
4
4
|
velbusaio/const.py,sha256=9JY8oMrE4galRPAv247RXP_xDOdYkyPc7lBlptJius4,1550
|
|
5
5
|
velbusaio/controller.py,sha256=h8LProppbTYJNdyyS5rQ3ZweiTjcKsdbKBzNoOS_IAk,9253
|
|
6
6
|
velbusaio/discovery.py,sha256=Px6qoZl4QhF17aMz6JxstCORBpLzZGWEK9h4Vyvg57o,1649
|
|
@@ -8,12 +8,12 @@ velbusaio/exceptions.py,sha256=FHkXaM3dK5Gkk-QGAf9dLE3FPlCU2FRZWUyY-4KRNnA,515
|
|
|
8
8
|
velbusaio/handler.py,sha256=gI0Zma9SbcVEvAzYno4IJbqwtEYQk5Cp6zxVNtmox54,8342
|
|
9
9
|
velbusaio/helpers.py,sha256=8PWyD13UA244ESk5YwPcRzvjK3OBAqmhwAwC6E9W4B4,2542
|
|
10
10
|
velbusaio/message.py,sha256=ZFy0iup_DK_so_wZsr2F-3A4AJgQGxf5C3TXjK4BMW0,5047
|
|
11
|
-
velbusaio/module.py,sha256=
|
|
11
|
+
velbusaio/module.py,sha256=GmuUthbqlluI8n8HHgTjMsPbzSWWDUa5Y2XPSbJArms,35355
|
|
12
12
|
velbusaio/protocol.py,sha256=sut7jf3IJiJRx59w1EJs0AX4Aa15vrPNgIWJrtQkMjc,8220
|
|
13
13
|
velbusaio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
velbusaio/raw_message.py,sha256=5604X_0Itav6Ts89tXWvXs6sdx_KWRvPvSHjtFjXlMA,4613
|
|
15
15
|
velbusaio/util.py,sha256=eCsGQJ9nuzk_B2skBlv3MsNaMaHDXo1a1qSPjObzXH4,1540
|
|
16
|
-
velbusaio/messages/__init__.py,sha256=
|
|
16
|
+
velbusaio/messages/__init__.py,sha256=7L1ziMh5u5HE62MjzcDRhKVof294puZzKFCbBrqxeqw,5892
|
|
17
17
|
velbusaio/messages/blind_status.py,sha256=3K5JRRn34_N1oQRKNBCkNwWIwhaURYL1ZNZhQZWFnSU,3417
|
|
18
18
|
velbusaio/messages/bus_active.py,sha256=7aSGEASI4WxWZV9HI6P1b_p6wU1UvbJYmT90Hz_I8ls,748
|
|
19
19
|
velbusaio/messages/bus_error_counter_status.py,sha256=GYMAxyIHUZLzse-pzyUgegLMY75ptFLKNP5qADbuNFg,1177
|
|
@@ -34,7 +34,7 @@ velbusaio/messages/dali_device_settings.py,sha256=JeiUGw5oPPQde7buNz0T7euZ-QJVxm
|
|
|
34
34
|
velbusaio/messages/dali_device_settings_request.py,sha256=3IqaXOxqidJCJ1FxFMDofaXiX75SCgFcPyOQk0p6L_Q,1461
|
|
35
35
|
velbusaio/messages/dali_dim_value_status.py,sha256=V2Fs8CZNihIi9ZxQs7Bxkt9qCInFXxMZnF6vKhIUCnQ,1044
|
|
36
36
|
velbusaio/messages/dimmer_channel_status.py,sha256=nJ_83uVe0FIiwWmGt7XNXcRYu3ikNUwxOOg5nHzaOPw,2470
|
|
37
|
-
velbusaio/messages/dimmer_status.py,sha256=
|
|
37
|
+
velbusaio/messages/dimmer_status.py,sha256=QwWbVoCLndhymsOcj-jw0scqUuQRU3m6J6q1FwgNgn4,2937
|
|
38
38
|
velbusaio/messages/edge_set_color.py,sha256=enwPshhNrleAQQwc3RobPt5foZ1ynE_74SlBEuzd86w,3305
|
|
39
39
|
velbusaio/messages/edge_set_custom_color.py,sha256=fw4hQTrTxNBb63XLTY9iLFtPYrNh0mAAE28DCxG9h1A,1337
|
|
40
40
|
velbusaio/messages/fast_blinking_led.py,sha256=Q5scu34RQJZ43EDZCR1kJy63gULSWHN5bpKpqo_XOOc,908
|
|
@@ -51,7 +51,7 @@ velbusaio/messages/memory_dump_request.py,sha256=g8jWuy3IwqG6UvTz2_eVng1e0TAPy8X
|
|
|
51
51
|
velbusaio/messages/module_status.py,sha256=PLsmTheV-fTGHc5FhrzNXMxvGKP8EeYFjadY07ENOn0,6399
|
|
52
52
|
velbusaio/messages/module_status_request.py,sha256=Iv9Y2UXzPFyz3FiL0yH-o231S5_dOfv9z72AYgEjLjM,960
|
|
53
53
|
velbusaio/messages/module_subtype.py,sha256=aDoXFR6fnVFitPLnB9RNLnR4S_t4MZP1uoMMzg4JfB0,1463
|
|
54
|
-
velbusaio/messages/module_type.py,sha256=
|
|
54
|
+
velbusaio/messages/module_type.py,sha256=2VhKxtPF_8VKPsyWGUvBcwTlxVIxgNnRi5HVYdAAwgU,4115
|
|
55
55
|
velbusaio/messages/module_type_request.py,sha256=v8LBuPG_nxvh2lid9XG254M522PN-zSVezEMCOLrGis,753
|
|
56
56
|
velbusaio/messages/push_button_status.py,sha256=AkhZJ5xhMjWDKidOffLZewIi8qWDTu7q8qt4joNenIw,1553
|
|
57
57
|
velbusaio/messages/raw.py,sha256=m7xaGhDqmvHxy0UzWC4gijAbkqXkNEdfrsKRDKWX1JM,1963
|
|
@@ -61,18 +61,18 @@ velbusaio/messages/realtime_clock_status_request.py,sha256=KEvcmWlgN4XbpHSA90fg3
|
|
|
61
61
|
velbusaio/messages/receive_buffer_full.py,sha256=dgyzmZ8VxhQk8r4vUs2uWuojut2Akj4IMazkqfDa1e4,857
|
|
62
62
|
velbusaio/messages/receive_ready.py,sha256=f1LdUVcUTG7rj71wCVHgF03zbkIx4CpJKG7zgXIERf4,686
|
|
63
63
|
velbusaio/messages/relay_status.py,sha256=BBJHM54gzbOTAoQ_N8ls3IiJoOIklKFCvBU4odntXvM,2836
|
|
64
|
-
velbusaio/messages/restore_dimmer.py,sha256=
|
|
64
|
+
velbusaio/messages/restore_dimmer.py,sha256=Xk3GqthYwqCMc6rPXCCc5EXWoXZWpWrk1r8nevfdfso,1783
|
|
65
65
|
velbusaio/messages/select_program.py,sha256=RHvOvWXC7w8wxMhco0NUDPIMK6r6Q2LCd87Kdnl7hxI,834
|
|
66
66
|
velbusaio/messages/sensor_settings_request.py,sha256=njSYjNTxhNyRKJLP7wexaWHnYiSWbrSlOm_F7myuBdw,818
|
|
67
67
|
velbusaio/messages/sensor_temp_request.py,sha256=R-VNtqqiDbgZjPNfj5nE0_bTuGLD74Zy-FUsrCcyXFI,598
|
|
68
68
|
velbusaio/messages/sensor_temperature.py,sha256=Erh7pIrbxpmurg3x9_di6A6Os_2Sgpid7T6LgHuWQyA,1557
|
|
69
|
-
velbusaio/messages/set_date.py,sha256=
|
|
70
|
-
velbusaio/messages/set_daylight_saving.py,sha256=
|
|
71
|
-
velbusaio/messages/set_dimmer.py,sha256=
|
|
69
|
+
velbusaio/messages/set_date.py,sha256=aV8qO3kJsIMsLZPwVZB5PKivBVa7YHpottj6sTgUSiM,1459
|
|
70
|
+
velbusaio/messages/set_daylight_saving.py,sha256=bpP4BN-uyFIRt4Y6finaaYBIzI08A5AVsUFJfnpxzkg,1117
|
|
71
|
+
velbusaio/messages/set_dimmer.py,sha256=gS3Bm6BvKj9ZnHDOGwTzrEGukXnoPVkAQCRwLOG-E9Q,1936
|
|
72
72
|
velbusaio/messages/set_led.py,sha256=hNmbmS2hXqTBVfXMWYhyf10-BOvd5ZwimMd74Cyj5PQ,899
|
|
73
|
-
velbusaio/messages/set_realtime_clock.py,sha256=
|
|
73
|
+
velbusaio/messages/set_realtime_clock.py,sha256=2EVdIKLB0M1syBZyIpD-vxiEJMriqElxnw3cO773Nw4,1308
|
|
74
74
|
velbusaio/messages/set_temperature.py,sha256=PMs_uXWMhggIX0s2ikediwTJ4WSpvrXzahCJ0Ak_hks,958
|
|
75
|
-
velbusaio/messages/slider_status.py,sha256=
|
|
75
|
+
velbusaio/messages/slider_status.py,sha256=poNQY8hvdTVqD0qfLxvmp-w3js2MVozTLR657cZOI8o,1393
|
|
76
76
|
velbusaio/messages/slow_blinking_led.py,sha256=a5Kpbx_IAYzOoahkgaqcc61j3ecFjy6fT9Dox6BlUiM,908
|
|
77
77
|
velbusaio/messages/start_relay_blinking_timer.py,sha256=KdTqYxXquPn07_Con_vSfbi7KthdsUv4SwkxJj2MEGk,1297
|
|
78
78
|
velbusaio/messages/start_relay_timer.py,sha256=fhaIJrVOP2MrIpzzlswyENC4XwhS8YOgr4p6rShSYyA,1289
|
|
@@ -96,8 +96,8 @@ velbusaio/messages/write_data_to_memory.py,sha256=2bC-vuv_RK3hGxvKeba1zR405ffj-C
|
|
|
96
96
|
velbusaio/messages/write_memory_block.py,sha256=5pP4hCRV7tc5xYxHO_51t-uCYgNtVHiaPic_ZGG2Y9s,1031
|
|
97
97
|
velbusaio/messages/write_module_address_and_serial_number.py,sha256=gU-yAHxICP6LPQX7BRj-WUfiVpTk0sV1CMlXeElAwl4,1596
|
|
98
98
|
velbusaio/moduleprotocol/protocol.json,sha256=zChwegR8Ic_Msw5iVMV_W3kVmSyK5DwYof46wD7l9H8,883766
|
|
99
|
-
velbus_aio-2023.
|
|
100
|
-
velbus_aio-2023.
|
|
101
|
-
velbus_aio-2023.
|
|
102
|
-
velbus_aio-2023.
|
|
103
|
-
velbus_aio-2023.
|
|
99
|
+
velbus_aio-2023.12.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
100
|
+
velbus_aio-2023.12.0.dist-info/METADATA,sha256=nl4xVLuNrlqrwm2OcgO0V1tkXSFJZ31P2QmYgeIvb0Q,3079
|
|
101
|
+
velbus_aio-2023.12.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
102
|
+
velbus_aio-2023.12.0.dist-info/top_level.txt,sha256=W0-lSOwD23mm8FqaIe9vY20fKicBMIdUVjF-zmfxRnY,15
|
|
103
|
+
velbus_aio-2023.12.0.dist-info/RECORD,,
|
velbusaio/channels.py
CHANGED
|
@@ -135,6 +135,18 @@ class Channel:
|
|
|
135
135
|
if k != "_writer" and k != "_on_status_update" and k != "_name_parts"
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
def to_json(self) -> dict:
|
|
139
|
+
d = self.__dict__
|
|
140
|
+
return {
|
|
141
|
+
k: d[k]
|
|
142
|
+
for k in d
|
|
143
|
+
if k != "_writer"
|
|
144
|
+
and k != "_on_status_update"
|
|
145
|
+
and k != "_name_parts"
|
|
146
|
+
and k != "_module"
|
|
147
|
+
and k != "__name__"
|
|
148
|
+
}
|
|
149
|
+
|
|
138
150
|
def __setstate__(self, state):
|
|
139
151
|
self.__dict__.update(state)
|
|
140
152
|
self._on_status_update = []
|
|
@@ -537,6 +549,9 @@ class Temperature(Channel):
|
|
|
537
549
|
def get_climate_mode(self) -> str:
|
|
538
550
|
return self._cstatus
|
|
539
551
|
|
|
552
|
+
def get_cool_mode(self) -> str:
|
|
553
|
+
return self._cool_mode
|
|
554
|
+
|
|
540
555
|
async def set_temp(self, temp: float) -> None:
|
|
541
556
|
cls = commandRegistry.get_command(0xE4, self._module.get_type())
|
|
542
557
|
msg = cls(self._address)
|
velbusaio/command_registry.py
CHANGED
|
@@ -65,6 +65,21 @@ MODULE_DIRECTORY = {
|
|
|
65
65
|
0x43: "VMBIN",
|
|
66
66
|
0x44: "VMB4PB",
|
|
67
67
|
0x45: "VMBDALI",
|
|
68
|
+
0x48: "VMB4RYLD-10",
|
|
69
|
+
0x49: "VMB4RYNO-10",
|
|
70
|
+
0x4A: "VMB2BLE-10",
|
|
71
|
+
0x4C: "VMB6PB-20",
|
|
72
|
+
0x4F: "VMBEL1-20",
|
|
73
|
+
0x50: "VMBEL2-20",
|
|
74
|
+
0x51: "VMBEL4-20",
|
|
75
|
+
0x52: "VMBELO-20",
|
|
76
|
+
0x53: "VMBGP1-20",
|
|
77
|
+
0x54: "VMBGP2-20",
|
|
78
|
+
0x55: "VMBGP4-20",
|
|
79
|
+
0x56: "VMBGPO-20",
|
|
80
|
+
0x5A: "VMBDALI-20",
|
|
81
|
+
0x5C: "VMBEL4PIR-20",
|
|
82
|
+
0x5F: "VMBGP4PIR-20",
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
|
velbusaio/messages/__init__.py
CHANGED
|
@@ -54,7 +54,7 @@ from velbusaio.messages.raw import MeteoRawMessage, SensorRawMessage
|
|
|
54
54
|
from velbusaio.messages.module_status import ModuleStatusMessage, ModuleStatusMessage2
|
|
55
55
|
from velbusaio.messages.module_status_request import ModuleStatusRequestMessage
|
|
56
56
|
from velbusaio.messages.module_subtype import ModuleSubTypeMessage
|
|
57
|
-
from velbusaio.messages.module_type import ModuleTypeMessage
|
|
57
|
+
from velbusaio.messages.module_type import ModuleTypeMessage, ModuleType2Message
|
|
58
58
|
from velbusaio.messages.module_type_request import ModuleTypeRequestMessage
|
|
59
59
|
from velbusaio.messages.push_button_status import PushButtonStatusMessage
|
|
60
60
|
from velbusaio.messages.read_data_block_from_memory import (
|
|
@@ -25,7 +25,70 @@ MODULES_WITHOUT_SERIAL = {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
@register(
|
|
28
|
+
@register(
|
|
29
|
+
COMMAND_CODE,
|
|
30
|
+
[
|
|
31
|
+
"VMB1BL",
|
|
32
|
+
"VMB6IN",
|
|
33
|
+
"VMB1DM",
|
|
34
|
+
"VMB4RY",
|
|
35
|
+
"VMB2BL",
|
|
36
|
+
"VMB8IR",
|
|
37
|
+
"VMB4PD",
|
|
38
|
+
"VMB1TS",
|
|
39
|
+
"VMB1TH",
|
|
40
|
+
"VMB1TC",
|
|
41
|
+
"VMB1LED",
|
|
42
|
+
"VMB4RYLD",
|
|
43
|
+
"VMB4RYNO",
|
|
44
|
+
"VMB4DC",
|
|
45
|
+
"VMBLCDWB",
|
|
46
|
+
"VMBDME",
|
|
47
|
+
"VMBDMI",
|
|
48
|
+
"VMB8PBU",
|
|
49
|
+
"VMB6PBN",
|
|
50
|
+
"VMB2PBN",
|
|
51
|
+
"VMB6PBB",
|
|
52
|
+
"VMB4RF",
|
|
53
|
+
"VMB1RYNO",
|
|
54
|
+
"VMB1BLE",
|
|
55
|
+
"VMB2BLE",
|
|
56
|
+
"VMBGP1",
|
|
57
|
+
"VMBGP2",
|
|
58
|
+
"VMBGP4",
|
|
59
|
+
"VMBGPO",
|
|
60
|
+
"VMB7IN",
|
|
61
|
+
"VMBGPOD",
|
|
62
|
+
"VMB1RYNOS",
|
|
63
|
+
"VMBPIRM",
|
|
64
|
+
"VMBPIRC",
|
|
65
|
+
"VMBPIRO",
|
|
66
|
+
"VMBGP4PIR",
|
|
67
|
+
"VMB1BLS",
|
|
68
|
+
"VMBDMI-R",
|
|
69
|
+
"VMBMETEO",
|
|
70
|
+
"VMB4AN",
|
|
71
|
+
"VMBVP01",
|
|
72
|
+
"VMBEL1",
|
|
73
|
+
"VMBEL2",
|
|
74
|
+
"VMBEL4",
|
|
75
|
+
"VMBELO",
|
|
76
|
+
"VMBELPIR",
|
|
77
|
+
"VMBSIG",
|
|
78
|
+
"VMBGP1-2",
|
|
79
|
+
"VMBGP2-2",
|
|
80
|
+
"VMBGP4-2",
|
|
81
|
+
"VMBGPOD-2",
|
|
82
|
+
"VMBGP4PIR-2",
|
|
83
|
+
"VMCM3",
|
|
84
|
+
"VMBUSBIP",
|
|
85
|
+
"VMB1RYS",
|
|
86
|
+
"VMBKP",
|
|
87
|
+
"VMBIN",
|
|
88
|
+
"VMB4PB",
|
|
89
|
+
"VMBDALI",
|
|
90
|
+
],
|
|
91
|
+
)
|
|
29
92
|
class ModuleTypeMessage(Message):
|
|
30
93
|
"""
|
|
31
94
|
send by: VMB6IN, VMB4RYLD
|
|
@@ -66,18 +129,57 @@ class ModuleTypeMessage(Message):
|
|
|
66
129
|
self.build_year = data[-2]
|
|
67
130
|
self.build_week = data[-1]
|
|
68
131
|
|
|
69
|
-
|
|
132
|
+
|
|
133
|
+
@register(
|
|
134
|
+
COMMAND_CODE,
|
|
135
|
+
[
|
|
136
|
+
"VMB4RYLD-10",
|
|
137
|
+
"VMB4RYNO-10",
|
|
138
|
+
"VMB2BLE-10",
|
|
139
|
+
"VMB6PB-20",
|
|
140
|
+
"VMBEL1-20",
|
|
141
|
+
"VMBEL2-20",
|
|
142
|
+
"VMBEL4-20",
|
|
143
|
+
"VMBELO-20",
|
|
144
|
+
"VMBGP1-20",
|
|
145
|
+
"VMBGP2-20",
|
|
146
|
+
"VMBGP4-20",
|
|
147
|
+
"VMBGPO-20",
|
|
148
|
+
"VMBEL4PIR-20",
|
|
149
|
+
"VMBGP4PIR-20",
|
|
150
|
+
],
|
|
151
|
+
)
|
|
152
|
+
class ModuleType2Message(Message):
|
|
153
|
+
def __init__(self, address=None):
|
|
154
|
+
Message.__init__(self)
|
|
155
|
+
self.module_type = 0x00
|
|
156
|
+
self.led_on = []
|
|
157
|
+
self.led_slow_blinking = []
|
|
158
|
+
self.led_fast_blinking = []
|
|
159
|
+
self.serial = 0
|
|
160
|
+
self.memory_map_version = 0
|
|
161
|
+
self.build_year = 0
|
|
162
|
+
self.build_week = 0
|
|
163
|
+
self.term = 0
|
|
164
|
+
self.set_defaults(address)
|
|
165
|
+
|
|
166
|
+
def module_name(self):
|
|
70
167
|
"""
|
|
71
|
-
:return:
|
|
168
|
+
:return: str
|
|
169
|
+
"""
|
|
170
|
+
return "Unknown"
|
|
171
|
+
|
|
172
|
+
def populate(self, priority, address, rtr, data):
|
|
173
|
+
"""
|
|
174
|
+
:return: None
|
|
72
175
|
"""
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
)
|
|
176
|
+
self.needs_low_priority(priority)
|
|
177
|
+
self.needs_no_rtr(rtr)
|
|
178
|
+
self.set_attributes(priority, address, rtr)
|
|
179
|
+
self.module_type = data[0]
|
|
180
|
+
if data[0] not in MODULES_WITHOUT_SERIAL:
|
|
181
|
+
(self.serial,) = struct.unpack(">L", bytes([0, 0, data[1], data[2]]))
|
|
182
|
+
self.memory_map_version = data[3]
|
|
183
|
+
self.build_year = data[-3]
|
|
184
|
+
self.build_week = data[-2]
|
|
185
|
+
self.term = data[-1]
|
velbusaio/messages/set_date.py
CHANGED
|
@@ -17,14 +17,14 @@ class SetDate(Message):
|
|
|
17
17
|
received by all modules
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
def __init__(self, address=0x00):
|
|
20
|
+
def __init__(self, address=0x00) -> None:
|
|
21
21
|
Message.__init__(self)
|
|
22
22
|
self._day = None
|
|
23
23
|
self._mon = None
|
|
24
24
|
self._year = None
|
|
25
25
|
self.set_defaults(address)
|
|
26
26
|
|
|
27
|
-
def set_defaults(self, address):
|
|
27
|
+
def set_defaults(self, address) -> None:
|
|
28
28
|
if address is not None:
|
|
29
29
|
self.set_address(address)
|
|
30
30
|
self.set_low_priority()
|
|
@@ -34,7 +34,7 @@ class SetDate(Message):
|
|
|
34
34
|
self._mon = lclt[1]
|
|
35
35
|
self._year = lclt[0]
|
|
36
36
|
|
|
37
|
-
def populate(self, priority, address, rtr, data):
|
|
37
|
+
def populate(self, priority, address, rtr, data) -> None:
|
|
38
38
|
"""
|
|
39
39
|
:return: None
|
|
40
40
|
"""
|
|
@@ -46,7 +46,7 @@ class SetDate(Message):
|
|
|
46
46
|
self._mon = data[1]
|
|
47
47
|
self._year = (data[2] << 8) + data[3]
|
|
48
48
|
|
|
49
|
-
def data_to_binary(self):
|
|
49
|
+
def data_to_binary(self) -> bytes:
|
|
50
50
|
"""
|
|
51
51
|
:return: bytes
|
|
52
52
|
"""
|
|
@@ -17,12 +17,12 @@ class SetDaylightSaving(Message):
|
|
|
17
17
|
received by all modules
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
def __init__(self, address=0x00):
|
|
20
|
+
def __init__(self, address=0x00) -> None:
|
|
21
21
|
Message.__init__(self)
|
|
22
22
|
self._ds = None
|
|
23
23
|
self.set_defaults(address)
|
|
24
24
|
|
|
25
|
-
def set_defaults(self, address):
|
|
25
|
+
def set_defaults(self, address) -> None:
|
|
26
26
|
if address is not None:
|
|
27
27
|
self.set_address(address)
|
|
28
28
|
self.set_low_priority()
|
|
@@ -30,7 +30,7 @@ class SetDaylightSaving(Message):
|
|
|
30
30
|
lclt = time.localtime()
|
|
31
31
|
self._ds = not lclt[8]
|
|
32
32
|
|
|
33
|
-
def populate(self, priority, address, rtr, data):
|
|
33
|
+
def populate(self, priority, address, rtr, data) -> None:
|
|
34
34
|
"""
|
|
35
35
|
:return: None
|
|
36
36
|
"""
|
|
@@ -40,7 +40,7 @@ class SetDaylightSaving(Message):
|
|
|
40
40
|
self.set_attributes(priority, address, rtr)
|
|
41
41
|
self._ds = data[0]
|
|
42
42
|
|
|
43
|
-
def data_to_binary(self):
|
|
43
|
+
def data_to_binary(self) -> bytes:
|
|
44
44
|
"""
|
|
45
45
|
:return: bytes
|
|
46
46
|
"""
|
velbusaio/messages/set_dimmer.py
CHANGED
|
@@ -9,7 +9,7 @@ from velbusaio.message import Message
|
|
|
9
9
|
COMMAND_CODE = 0x07
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@register(COMMAND_CODE, ["VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED"])
|
|
12
|
+
@register(COMMAND_CODE, ["VMB1DM", "VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED"])
|
|
13
13
|
class SetDimmerMessage(Message):
|
|
14
14
|
"""
|
|
15
15
|
send by:
|
|
@@ -17,14 +17,14 @@ class SetRealtimeClock(Message):
|
|
|
17
17
|
received by all modules
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
def __init__(self, address=0x00):
|
|
20
|
+
def __init__(self, address=0x00) -> None:
|
|
21
21
|
Message.__init__(self)
|
|
22
22
|
self._wday = None
|
|
23
23
|
self._hour = None
|
|
24
24
|
self._min = None
|
|
25
25
|
self.set_defaults(address)
|
|
26
26
|
|
|
27
|
-
def set_defaults(self, address):
|
|
27
|
+
def set_defaults(self, address) -> None:
|
|
28
28
|
if address is not None:
|
|
29
29
|
self.set_address(address)
|
|
30
30
|
self.set_low_priority()
|
|
@@ -34,7 +34,7 @@ class SetRealtimeClock(Message):
|
|
|
34
34
|
self._hour = lclt[3]
|
|
35
35
|
self._min = lclt[4]
|
|
36
36
|
|
|
37
|
-
def populate(self, priority, address, rtr, data):
|
|
37
|
+
def populate(self, priority, address, rtr, data) -> None:
|
|
38
38
|
"""
|
|
39
39
|
:return: None
|
|
40
40
|
"""
|
|
@@ -46,7 +46,7 @@ class SetRealtimeClock(Message):
|
|
|
46
46
|
self._hour = data[1]
|
|
47
47
|
self._min = data[2]
|
|
48
48
|
|
|
49
|
-
def data_to_binary(self):
|
|
49
|
+
def data_to_binary(self) -> bytes:
|
|
50
50
|
"""
|
|
51
51
|
:return: bytes
|
|
52
52
|
"""
|
|
@@ -9,7 +9,7 @@ from velbusaio.message import Message
|
|
|
9
9
|
COMMAND_CODE = 0x0F
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@register(COMMAND_CODE, ["VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED"])
|
|
12
|
+
@register(COMMAND_CODE, ["VMB1DM", "VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED"])
|
|
13
13
|
class SliderStatusMessage(Message):
|
|
14
14
|
"""
|
|
15
15
|
sent by: VMBDME
|
velbusaio/module.py
CHANGED
|
@@ -81,7 +81,7 @@ from velbusaio.messages.module_status import (
|
|
|
81
81
|
)
|
|
82
82
|
from velbusaio.messages.module_status_request import ModuleStatusRequestMessage
|
|
83
83
|
from velbusaio.messages.module_subtype import ModuleSubTypeMessage
|
|
84
|
-
from velbusaio.messages.module_type import ModuleTypeMessage
|
|
84
|
+
from velbusaio.messages.module_type import ModuleTypeMessage, ModuleType2Message
|
|
85
85
|
from velbusaio.messages.push_button_status import PushButtonStatusMessage
|
|
86
86
|
from velbusaio.messages.read_data_from_memory import ReadDataFromMemoryMessage
|
|
87
87
|
from velbusaio.messages.relay_status import RelayStatusMessage, RelayStatusMessage2
|
|
@@ -91,6 +91,7 @@ from velbusaio.messages.slider_status import SliderStatusMessage
|
|
|
91
91
|
from velbusaio.messages.slow_blinking_led import SlowBlinkingLedMessage
|
|
92
92
|
from velbusaio.messages.temp_sensor_status import TempSensorStatusMessage
|
|
93
93
|
from velbusaio.messages.update_led_status import UpdateLedStatusMessage
|
|
94
|
+
from velbusaio.channels import Temperature as TemperatureChannelType
|
|
94
95
|
|
|
95
96
|
|
|
96
97
|
class Module:
|
|
@@ -175,12 +176,14 @@ class Module:
|
|
|
175
176
|
#
|
|
176
177
|
# The solution would be that this functions knows were the temperature channels are located
|
|
177
178
|
# and/or what the max number of subaddresses are for each module.
|
|
178
|
-
if self._sub_address == {} and self.loaded:
|
|
179
|
-
|
|
179
|
+
# if self._sub_address == {} and self.loaded:
|
|
180
|
+
# raise Exception("No subaddresses defined")
|
|
180
181
|
for sub in range(1, 4):
|
|
181
182
|
if sub not in self._sub_address:
|
|
182
183
|
for i in range(((sub * 8) + 1), (((sub + 1) * 8) + 1)):
|
|
183
|
-
if i in self._channels
|
|
184
|
+
if i in self._channels and not isinstance(
|
|
185
|
+
self._channels[i], TemperatureChannelType
|
|
186
|
+
):
|
|
184
187
|
del self._channels[i]
|
|
185
188
|
|
|
186
189
|
def _cache(self) -> None:
|
|
@@ -321,6 +324,7 @@ class Module:
|
|
|
321
324
|
"cmode": message.mode_str,
|
|
322
325
|
"cstatus": message.status_str,
|
|
323
326
|
"sleep_timer": message.sleep_timer,
|
|
327
|
+
"cool_mode": message.cool_mode,
|
|
324
328
|
},
|
|
325
329
|
)
|
|
326
330
|
await self._channels[chan].maybe_update_temperature(
|
|
@@ -445,7 +449,7 @@ class Module:
|
|
|
445
449
|
await self._update_channel(
|
|
446
450
|
channel, {"closed": channel_id in message.closed}
|
|
447
451
|
)
|
|
448
|
-
if type(self._channels[channel])
|
|
452
|
+
if type(self._channels[channel]) is Button:
|
|
449
453
|
# only treat 'enabled' if the channel is a Button
|
|
450
454
|
await self._update_channel(
|
|
451
455
|
channel, {"enabled": channel_id in message.enabled}
|
|
File without changes
|
|
File without changes
|