velbus-aio 2025.3.1__py3-none-any.whl → 2025.4.2__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.

@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: velbus-aio
3
- Version: 2025.3.1
3
+ Version: 2025.4.2
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
@@ -29,6 +29,7 @@ Requires-Dist: pyserial>=3.5.0
29
29
  Requires-Dist: pyserial-asyncio_fast>=0.11
30
30
  Requires-Dist: backoff>=1.10.0
31
31
  Requires-Dist: aiofile
32
+ Dynamic: license-file
32
33
 
33
34
  ![CI](https://github.com/Cereal2nd/velbus-aio/actions/workflows/main.yml/badge.svg)
34
35
  [![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)
@@ -1,6 +1,7 @@
1
+ velbus_aio-2025.4.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1
2
  velbusaio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- velbusaio/channels.py,sha256=Idbm_kITI9cKuATkxab1VSEXhjaIc-5VS49Yc5kknkg,23407
3
- velbusaio/command_registry.py,sha256=OuFnjU8Iy4HWW3016QwD_ai1x3btRUmCbVcJ260hNtA,5256
3
+ velbusaio/channels.py,sha256=pR-y7Res_MAPSFEM62eLx844HU0EjX7SyyEpJT4YU74,23556
4
+ velbusaio/command_registry.py,sha256=nlx4__0ASr5WurOYLC-HEqswlg_qm3Y5trs4V8FhnvU,5350
4
5
  velbusaio/const.py,sha256=aHClMaMS6NINTCrjeRwLbVzdvS91VgFKM8j61ks5tn0,1862
5
6
  velbusaio/controller.py,sha256=Ohc-18ydnm76-5fOD_b24Aa_uYu6CdkI3ulfhska5og,8887
6
7
  velbusaio/discovery.py,sha256=Px6qoZl4QhF17aMz6JxstCORBpLzZGWEK9h4Vyvg57o,1649
@@ -8,24 +9,26 @@ velbusaio/exceptions.py,sha256=FHkXaM3dK5Gkk-QGAf9dLE3FPlCU2FRZWUyY-4KRNnA,515
8
9
  velbusaio/handler.py,sha256=gkRikfrTzekL0hFQSUV0AjVuMoUY1DNONEhbRBKyRko,11901
9
10
  velbusaio/helpers.py,sha256=iqpoereRH4JY5WAkozIqWvXWyRmhko-J-UGXDylFyEM,2537
10
11
  velbusaio/message.py,sha256=_MRuI4XnMcqeduCDJ3AwhAPL1B8VMstFDnjjLo8QuxM,5018
11
- velbusaio/module.py,sha256=KoE6PIYu9EW7Az2oK0y4LhNCSoZZV8VkPTfG9IIwMjg,37212
12
+ velbusaio/module.py,sha256=y5uegbCl0vowBqoeagycRjP6FPLDPaGJ4ZJeW22wMqA,37631
12
13
  velbusaio/protocol.py,sha256=RIpdL0vPlL4qE4bC8sEZSD0SRS4tWtR9MdzjTPSd2zs,8002
13
14
  velbusaio/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
15
  velbusaio/raw_message.py,sha256=ODoTPVAvyXXQSMXxtQO1U5OxcoQ4W8JJN5fotEDGSTo,4690
15
16
  velbusaio/util.py,sha256=FW6YCiPYWOCgqHDs8-LbzME0h81mqftYVG0qqZ-oo7Y,1568
16
- velbusaio/messages/__init__.py,sha256=ZiApo-9boa5fcxzuaTH3dQ2m8nfTVjrG84pL5V6rFbg,5893
17
+ velbusaio/vlp_reader.py,sha256=mHhp0Le-u8PT0Nk3glZrB7qK4JFR906NyB-nHDlnYC8,1039
18
+ velbusaio/messages/__init__.py,sha256=2Zgrk4VBoSJXKYhwS18gxuiE96jDvnpBBjeYI1yHjqs,6072
17
19
  velbusaio/messages/blind_status.py,sha256=q2CQgcU1ZsXMyjR2co8Eegj0LZRDfRqvpCTVvjovNWA,3432
18
20
  velbusaio/messages/bus_active.py,sha256=AB1mEvbMXRuOaC2CQ7hzKSLmbaJnyFqqXrARi-aSdtg,749
19
21
  velbusaio/messages/bus_error_counter_status.py,sha256=x0RIzil6IcXWq6GHEFYDkSAergNF51JQYyetDXjvvzY,1178
20
22
  velbusaio/messages/bus_error_counter_status_request.py,sha256=zjX3k8MKgR9FO253a7bIlO-ba6SHmLi2WZT6ayAicrw,703
21
23
  velbusaio/messages/bus_off.py,sha256=z0PmNZyTlwee6jXnzgK4zHhFvevAXNboDrEEQvyLLfc,679
22
- velbusaio/messages/channel_name_part1.py,sha256=zN3rRXBQDLtIwy1ZdQmzNQPWUo1GPf0BQtQzYfiEYdo,2904
23
- velbusaio/messages/channel_name_part2.py,sha256=oeh48APKbJJxIDzLba7RLDjHN3bY6_2p7N1RFtqsrpw,2904
24
- velbusaio/messages/channel_name_part3.py,sha256=VsCUi1nhOzkhgJzQWgEXB91k4KWSImsLivWqDFdJVmo,2905
24
+ velbusaio/messages/channel_name_part1.py,sha256=QThXbpzIadHVtTqdCU9pSJl-_yvBoy4TTzouTB108S4,2929
25
+ velbusaio/messages/channel_name_part2.py,sha256=vJKQA-wj9-0qarNyj54qGKkQtMuas_dd5jIezNJeatQ,2929
26
+ velbusaio/messages/channel_name_part3.py,sha256=hWZugwMKMwKNzKgT3jGsSF8vp_c1IBV0yScMzvlUKiE,2930
25
27
  velbusaio/messages/channel_name_request.py,sha256=t8Tpx9l4XLgF6cDwUylXk0r8vmNG2QrXJq9F4TwAaBg,2378
26
28
  velbusaio/messages/clear_led.py,sha256=AcGRCD0OdlHcFonvHA075nVwvOtZ6KfyjrXeE6A7DZA,912
27
29
  velbusaio/messages/counter_status.py,sha256=UgSRw-pipFb8C2DxauHw8Pjem1qTvzUFpiahui73-Is,1240
28
30
  velbusaio/messages/counter_status_request.py,sha256=VLFaI7MFnTCH1s8acfKlcAGscJElwxYRC56eT3bbB7Y,919
31
+ velbusaio/messages/counter_value.py,sha256=rfde3vhMDOZuMwmc32VGn_Dbqj_4gi6QRJyh33e-tIE,1261
29
32
  velbusaio/messages/cover_down.py,sha256=0q805ghMmdeFbNLPXZ9TIqsn4QUiwaET4W6j0XEe58E,2566
30
33
  velbusaio/messages/cover_off.py,sha256=kzzZKSXiLJJdrXPmIx0dFwR99j6PS6VVpmZp8BbrEY4,2257
31
34
  velbusaio/messages/cover_position.py,sha256=_BgQz3DqZGirXDthj7xq72hxr51FYv2tyrdCMQkwzIY,1282
@@ -33,7 +36,7 @@ velbusaio/messages/cover_up.py,sha256=iFPCWuRhIc54oMQAFz5DZsUW23673_nNHoPFJC_HA_
33
36
  velbusaio/messages/dali_device_settings.py,sha256=KzJ7OFkFRPuCXSOThuplM48J_kH0I3RE82ZRCpmiqYA,4870
34
37
  velbusaio/messages/dali_device_settings_request.py,sha256=InTnrwLD7l9gCHXKlJ69FHMXcejtYMUZBtnffx9nDQU,1476
35
38
  velbusaio/messages/dali_dim_value_status.py,sha256=Kgtfb65HCku4OBm6uaxKFpK3VtlYaTemSjMhZqngqkY,1059
36
- velbusaio/messages/dimmer_channel_status.py,sha256=uk0SqV3EMJcDGZjoJDA_iHEpgk57qaa7xg1CQkSlIvc,2484
39
+ velbusaio/messages/dimmer_channel_status.py,sha256=v3VszfQoPY05Dt3yzyWIlOJTKSXE1IP044x1x_sLHj4,2501
37
40
  velbusaio/messages/dimmer_status.py,sha256=pWsWXJGWmYGio4FyUktI9aYnIBQkGCQ5ZwaeqnenYsU,2938
38
41
  velbusaio/messages/edge_set_color.py,sha256=YhxTv-WtDrZ_O67Ro6V-bcHrxj3tyBI1GuzTI5LkIVw,3306
39
42
  velbusaio/messages/edge_set_custom_color.py,sha256=Lz-7prBveqPwuDWv2Mn13X9TAXGBEquw8xz2_y9NtTk,1338
@@ -48,11 +51,13 @@ velbusaio/messages/memo_text.py,sha256=RwAjm14oths6rmsjC8WFFS7uOD9UHRue1UxTd4AuQ
48
51
  velbusaio/messages/memory_data.py,sha256=kH_jTCZCyivRnD3DJeiWKDTG01Vk91LbdRXVjj8WHBU,1031
49
52
  velbusaio/messages/memory_data_block.py,sha256=3QufrOahEkIhJjivWtOXp62YuVaUwx6trA-OQls6ohQ,1045
50
53
  velbusaio/messages/memory_dump_request.py,sha256=xrPsdpygD9DUF3lp-BzJacuq1dNkqz2wtHpqu_F1zVM,699
51
- velbusaio/messages/module_status.py,sha256=83UrRFXgRRngcF36fogyw8G5XPFlyaoZoW7XlxwvnQE,6637
54
+ velbusaio/messages/module_status.py,sha256=Y2OQUzijtA27snTEVHlyoOrcaLQbSq_3KHKAVDLGR_o,6662
52
55
  velbusaio/messages/module_status_request.py,sha256=s3h8F6Dpmjcb4hqDQKIzdOgocW1F_st40cctcW7WmQ4,961
53
56
  velbusaio/messages/module_subtype.py,sha256=KG-OC0eW-ZRnP1P8EWmcay6O-no6Mn2cklEjokaIW9M,1487
54
- velbusaio/messages/module_type.py,sha256=fb4q_SP3B6h_f9jGxgMvNoIpgBPXx36nwjCmtf0DfBw,4154
57
+ velbusaio/messages/module_type.py,sha256=pzIs4VmPRpquV-Z6UJg8dpwXp0TTGTLpoBNuqSY1t1I,4221
55
58
  velbusaio/messages/module_type_request.py,sha256=fntMYCF1WVwSseCy3zRoZQH6JeGz8JDfTkwHC3AvcB4,754
59
+ velbusaio/messages/psu_load.py,sha256=001KIz84CbnC54gHxhfAiNbcEMRpVUBzDwQ7T-yxY8s,1232
60
+ velbusaio/messages/psu_values.py,sha256=Yd_ndU8yIei7CoL2NV6FHCefO5h_gzRsPNUYxGUGP0o,1300
56
61
  velbusaio/messages/push_button_status.py,sha256=SRFLvNC00FdKDTSb4kNVSHeXI1i5Ey5ENxpsB3B8FuU,1554
57
62
  velbusaio/messages/raw.py,sha256=pepZSUVY-ro5jv3ZyO6BI3ap5RZ2g_Bd9dlbaICFldQ,1964
58
63
  velbusaio/messages/read_data_block_from_memory.py,sha256=GQwnO71rwPTFgu4YyB4FNQs4_G4dAOGuAsBqwBzmpXs,975
@@ -61,18 +66,18 @@ velbusaio/messages/realtime_clock_status_request.py,sha256=cDhA8lkCfvHtYwKIQ-bew
61
66
  velbusaio/messages/receive_buffer_full.py,sha256=Xg4zy6rM-3Zxp3wjRRpVXA3UsFIiUZA0l-vU8c_Y33Q,858
62
67
  velbusaio/messages/receive_ready.py,sha256=BjIu-zWlrBGV2BF1BdKF6jUbfzNLAUblq3SRTtF_0rg,687
63
68
  velbusaio/messages/relay_status.py,sha256=du16mnJXIzbDSsaIJnoN5KkdqsloOgNkfoFuu3x_F5Y,2837
64
- velbusaio/messages/restore_dimmer.py,sha256=YQsR7NF1pC40KaegxQhqcmL2mL57aPHsgzdA3YHrLxQ,1822
69
+ velbusaio/messages/restore_dimmer.py,sha256=Zo-B4k-mbFElR7LJothvUooKAq7L5-u9pryyW5akH9w,1910
65
70
  velbusaio/messages/select_program.py,sha256=9jLhsCuYGQsw-FMxpmNljPZifGeE_oJ6A5bgCRI2JJ0,835
66
71
  velbusaio/messages/sensor_settings_request.py,sha256=Uwywf0JGwBwc_2ZlfxVJicm3oUlWBNEcclcHA2_Mv5I,819
67
72
  velbusaio/messages/sensor_temp_request.py,sha256=bTChj9udOjIww9vJ2SWmMtbry_8jLDvbWSAy_ZPmrb4,599
68
73
  velbusaio/messages/sensor_temperature.py,sha256=ThA_4FFhQutCSt8147yCy7ocUFfizWaUV2JHoNzesNc,1558
69
74
  velbusaio/messages/set_date.py,sha256=jcWb8c5mB71HNBwLCQ9ocEPSHQdZP0yfGJL4_swsRWQ,1359
70
75
  velbusaio/messages/set_daylight_saving.py,sha256=CpoKrSt62UzzNxl8SDcpDcb0GKnLcD1f73-ULzqDEzU,1049
71
- velbusaio/messages/set_dimmer.py,sha256=W0Pw1JAxXn7anhiNC3BLLSizrfQDxlqnc2_YRzUV53A,2049
76
+ velbusaio/messages/set_dimmer.py,sha256=JSSck0-XzjeFZSOBHltfVEJX2xKRDHDyH_o2tTmI1Mc,2077
72
77
  velbusaio/messages/set_led.py,sha256=X8tIDzJgtf5EsH92rjoUyrECNFW-ECgAQoQ9TnvJEQk,900
73
78
  velbusaio/messages/set_realtime_clock.py,sha256=h34pCvyPm7tSQ5BdB8yC8SRulrtldeX-ZJFv3Wcvdk0,1209
74
79
  velbusaio/messages/set_temperature.py,sha256=78LfGOBZo2bw7eF38uyXOjUcJrsSvQPDW2qbXLOYd0o,959
75
- velbusaio/messages/slider_status.py,sha256=AlBI1DJPLUwxOFfPIKYv15bFOnVXm__Tym7AW4xGMxo,1418
80
+ velbusaio/messages/slider_status.py,sha256=bm9-xZqVVZGpBQItQ7eIFc6NVKqbqLJjxn7evavybOM,1506
76
81
  velbusaio/messages/slow_blinking_led.py,sha256=UktzpRtyM4mR7_KQuNjqenPEeM3P1vgTyMW8dnVwylQ,909
77
82
  velbusaio/messages/start_relay_blinking_timer.py,sha256=AUqeXzQlxoW-jxG0YR7Lqt8QfDC1qX3u_MVSMkI783E,1298
78
83
  velbusaio/messages/start_relay_timer.py,sha256=FZP4hL3t0rNF_b8GluAM_IymBRkp86epx2rJ29LXpyQ,1290
@@ -98,8 +103,9 @@ velbusaio/messages/write_module_address_and_serial_number.py,sha256=6y57j-md3btN
98
103
  velbusaio/module_spec/01.json,sha256=HgE7mouKohbnMbT_bPl1yo59py36daqyhyG5ZVVluzA,953
99
104
  velbusaio/module_spec/02.json,sha256=f5xCxEGlqu1lVdMBRu8IDXV1RMXNRgi0cDk_e24UhFc,158
100
105
  velbusaio/module_spec/03.json,sha256=a-nJbRjNfXpJsOAwGPkbQjJpF4QDBjj5N1HZezCWgnU,255
106
+ velbusaio/module_spec/04.json,sha256=hOnYZtjYOHDmprC1bzNQKx_bHfsR-vzVeeUMghoLqbM,4924
101
107
  velbusaio/module_spec/05.json,sha256=0m7xOx3l5Fo4cfC6EqRpAom3fzA_Zz4UCUgEcxLCpYI,823
102
- velbusaio/module_spec/06.json,sha256=3sf5P8mCq0Yvs3z0Qnv9zFAV_dfhEiJMgeKuImaJ-hs,3166
108
+ velbusaio/module_spec/06.json,sha256=4pOkZknryAP_pCXAO8yK5o_s7gdoVRuFu37mie1dDEw,3188
103
109
  velbusaio/module_spec/07.json,sha256=YLR1SAcSM4PBdghWxKAhGGLomtB5tMWls7JNH7vVNzQ,161
104
110
  velbusaio/module_spec/08.json,sha256=VxnheRrmMjvk208W2joPOUmi63e8HUximTpG8i62xfM,547
105
111
  velbusaio/module_spec/09.json,sha256=RDzASLWiILU7vNU5sBonI9DhHhiPGC-4NrWH6hp52qg,378
@@ -160,10 +166,10 @@ velbusaio/module_spec/45.json,sha256=aAlc4ANbdDXJs7YhXm06te-gN43uaL80DS9qoinS2cQ
160
166
  velbusaio/module_spec/48.json,sha256=WfumNT6fFZxPWV2LjPAk58pcTpL8Phc4Aytglrsed_E,3223
161
167
  velbusaio/module_spec/49.json,sha256=5Qu1mKtO_Qemvs11e2U_m-vg_QgWgu96IK2dy1-yaWI,3220
162
168
  velbusaio/module_spec/4A.json,sha256=YEa9airi4DpJcKAkHuienkIzRR-AzGJZeQNuuzR0l2Q,2720
163
- velbusaio/module_spec/4B.json,sha256=2OI1pysdFIsJv1R7M0KtVA4OvYAZFUhqQWAt2h_h_Tc,3611
169
+ velbusaio/module_spec/4B.json,sha256=RbY4975C_g3OrCNDZqcedbV316eYxBouHMsHJWWM-0M,3633
164
170
  velbusaio/module_spec/4C.json,sha256=l1oMv_JnUEpEIFY1GZMUeXDWPjbUz98tZZ-4VsGxhsM,3464
165
171
  velbusaio/module_spec/4D.json,sha256=9Lho_3m4H5SBhx363zCDN3HnA8zLlygIi0EgXyOolF8,3213
166
- velbusaio/module_spec/4E.json,sha256=wDEjpA6nMdV2WUndz2WDdzea3WTcMwMVV6sT_RR2pz4,8883
172
+ velbusaio/module_spec/4E.json,sha256=NQj7CtGDXMIDi8xe7em2kyeprNjayaA_bNx21wqM1BM,11118
167
173
  velbusaio/module_spec/4F.json,sha256=ePImVotWcTbCvJ5xYN3hBqwZkGoRFEgFJV4AwXg474A,1631
168
174
  velbusaio/module_spec/50.json,sha256=xmchRD1S_Z4j3aLEafYsAZtW7bOWpWCWvUk-8SU3Zww,1628
169
175
  velbusaio/module_spec/51.json,sha256=8xrdwniKVokfLK9k44JIBr_xJ4H0yh8pN1SuX1-fOc0,1622
@@ -178,8 +184,7 @@ velbusaio/module_spec/5C.json,sha256=yw_XlccuFp-buRL_NXThwQLwblVRa0diLpUDm9Exrg0
178
184
  velbusaio/module_spec/5F.json,sha256=ebSwLMUW5A4LCRGOrF-vwxSVvrWZMNUWz10Xrmz7SwM,1259
179
185
  velbusaio/module_spec/60.json,sha256=Teih3jAybl5AELjY3gFbZrFN0RIMSU1yuvdsYZlMvTo,74
180
186
  velbusaio/module_spec/broadcast.json,sha256=L2Sc9FhZ7NOuu7K5g5jAhvUQGDP6a2CKrg-uWh_v-sA,2250
181
- velbus_aio-2025.3.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
182
- velbus_aio-2025.3.1.dist-info/METADATA,sha256=A2hgXa1CzBiKygd6FIDbfDURMz-E_vgFrjK0LpNGU3g,4540
183
- velbus_aio-2025.3.1.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
184
- velbus_aio-2025.3.1.dist-info/top_level.txt,sha256=W0-lSOwD23mm8FqaIe9vY20fKicBMIdUVjF-zmfxRnY,15
185
- velbus_aio-2025.3.1.dist-info/RECORD,,
187
+ velbus_aio-2025.4.2.dist-info/METADATA,sha256=WSJ0-GV-TmG0ZqKE5t87kTenc4-PSzEEO-j1kn9QWmw,4562
188
+ velbus_aio-2025.4.2.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
189
+ velbus_aio-2025.4.2.dist-info/top_level.txt,sha256=W0-lSOwD23mm8FqaIe9vY20fKicBMIdUVjF-zmfxRnY,15
190
+ velbus_aio-2025.4.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
velbusaio/channels.py CHANGED
@@ -379,6 +379,8 @@ class ButtonCounter(Button):
379
379
  _pulses = None
380
380
  _counter = None
381
381
  _delay = None
382
+ _power = None
383
+ _energy = None
382
384
 
383
385
  def get_categories(self) -> list[str]:
384
386
  if self._counter:
@@ -391,11 +393,13 @@ class ButtonCounter(Button):
391
393
  return False
392
394
 
393
395
  def get_state(self) -> int:
394
- val = 0
396
+ if self._energy:
397
+ return self._energy
395
398
  # if we don't know the delay
396
399
  # or we don't know the unit
397
400
  # or the delay is the max value
398
401
  # we always return 0
402
+ val = 0
399
403
  if not self._delay or not self._Unit or self._delay == 0xFFFF:
400
404
  return round(0, 2)
401
405
  if self._Unit == VOLUME_LITERS_HOUR:
@@ -418,6 +422,8 @@ class ButtonCounter(Button):
418
422
  return None
419
423
 
420
424
  def get_counter_state(self) -> int:
425
+ if self._power:
426
+ return self._power
421
427
  return round((self._counter / self._pulses), 2)
422
428
 
423
429
  def get_counter_unit(self) -> str:
@@ -9,6 +9,7 @@ MODULE_DIRECTORY = {
9
9
  0x01: "VMB8PB",
10
10
  0x02: "VMB1RY",
11
11
  0x03: "VMB1BL",
12
+ 0x04: "VMBPSUMNGR-20",
12
13
  0x05: "VMB6IN",
13
14
  0x06: "VMB4LEDPWM-20",
14
15
  0x07: "VMB1DM",
@@ -39,6 +40,8 @@ MODULE_DIRECTORY = {
39
40
  0x20: "VMBGP4",
40
41
  0x21: "VMBGPO",
41
42
  0x22: "VMB7IN",
43
+ 0x23: "VMBPIRO-10",
44
+ 0x24: "VMBGPTC",
42
45
  0x28: "VMBGPOD",
43
46
  0x29: "VMB1RYNOS",
44
47
  0x2A: "VMBPIRM",
@@ -47,6 +50,7 @@ MODULE_DIRECTORY = {
47
50
  0x2D: "VMBGP4PIR",
48
51
  0x2E: "VMB1BLS",
49
52
  0x2F: "VMBDMI-R",
53
+ 0x30: "VMBRFR8S",
50
54
  0x31: "VMBMETEO",
51
55
  0x32: "VMB4AN",
52
56
  0x33: "VMBVP01",
@@ -33,6 +33,7 @@ from velbusaio.messages.channel_name_request import (
33
33
  from velbusaio.messages.clear_led import ClearLedMessage
34
34
  from velbusaio.messages.counter_status import CounterStatusMessage
35
35
  from velbusaio.messages.counter_status_request import CounterStatusRequestMessage
36
+ from velbusaio.messages.counter_value import CounterValueMessage
36
37
  from velbusaio.messages.cover_down import CoverDownMessage, CoverDownMessage2
37
38
  from velbusaio.messages.cover_off import CoverOffMessage, CoverOffMessage2
38
39
  from velbusaio.messages.cover_position import CoverPosMessage
@@ -56,6 +57,8 @@ from velbusaio.messages.module_status_request import ModuleStatusRequestMessage
56
57
  from velbusaio.messages.module_subtype import ModuleSubTypeMessage
57
58
  from velbusaio.messages.module_type import ModuleType2Message, ModuleTypeMessage
58
59
  from velbusaio.messages.module_type_request import ModuleTypeRequestMessage
60
+ from velbusaio.messages.psu_load import PsuLoadMessage
61
+ from velbusaio.messages.psu_values import PsuValuesMessage
59
62
  from velbusaio.messages.push_button_status import PushButtonStatusMessage
60
63
  from velbusaio.messages.raw import MeteoRawMessage, SensorRawMessage
61
64
  from velbusaio.messages.read_data_block_from_memory import (
@@ -85,6 +85,7 @@ class ChannelNamePart1Message(Message):
85
85
  "VMB4LEDPWM-20",
86
86
  "VMB8DC-20",
87
87
  "VMB8IN-20",
88
+ "VMBPSUMNGR-20",
88
89
  ],
89
90
  )
90
91
  class ChannelNamePart1Message2(ChannelNamePart1Message):
@@ -85,6 +85,7 @@ class ChannelNamePart2Message(Message):
85
85
  "VMB8DC-20",
86
86
  "VMB8IN-20",
87
87
  "VMB4LEDPWM-20",
88
+ "VMBPSUMNGR-20",
88
89
  ],
89
90
  )
90
91
  class ChannelNamePart2Message2(ChannelNamePart2Message):
@@ -85,6 +85,7 @@ class ChannelNamePart3Message(Message):
85
85
  "VMB8DC-20",
86
86
  "VMB8IN-20",
87
87
  "VMB4LEDPWM-20",
88
+ "VMBPSUMNGR-20",
88
89
  ],
89
90
  )
90
91
  class ChannelNamePart3Message2(ChannelNamePart3Message):
@@ -0,0 +1,44 @@
1
+ """
2
+ :author: Maikel Punie <maikel.punie@gmail.com>
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ from velbusaio.command_registry import register
8
+ from velbusaio.message import Message
9
+
10
+ COMMAND_CODE = 0xA4
11
+
12
+
13
+ @register(COMMAND_CODE, ["VMB8IN-20"])
14
+ class CounterValueMessage(Message):
15
+
16
+ def __init__(self, address=None):
17
+ Message.__init__(self)
18
+ self.channel = 0
19
+ self.power = 0
20
+ self.energy = 0
21
+
22
+ def populate(self, priority, address, rtr, data):
23
+ """
24
+ -DB0 bit 0-4 = channel
25
+ -DB0 bit 5-7 = Highest nibble (bits 19…16) of Power
26
+ -DB1 = bits 15…8 of Power
27
+ -DB2 = bits 7…0 of Power
28
+ -DB3 bit 0-7 = energy counter
29
+ -DB4 bit 0-7 = energy counter
30
+ -DB5 bit 0-7 = energy counter
31
+ :return: None
32
+ """
33
+ self.needs_no_rtr(rtr)
34
+ self.needs_data(data, 7)
35
+ self.set_attributes(priority, address, rtr)
36
+ self.channel = (data[0] & 0x0F0) + 1
37
+ self.power = (data[0] << 16) + (data[1] << 8) + data[2]
38
+ self.energy = (data[3] << 16) + (data[4] << 8) + data[5]
39
+
40
+ def get_channels(self):
41
+ """
42
+ :return: list
43
+ """
44
+ return self.channel
@@ -22,7 +22,7 @@ LED_FAST_BLINKING = 1 << 5
22
22
  LED_VERY_FAST_BLINKING = 1 << 4
23
23
 
24
24
 
25
- @register(COMMAND_CODE, ["VMB4DC", "VMBDMI", "VMBDMI-R", "VMB8DC-20"])
25
+ @register(COMMAND_CODE, ["VMB4DC", "VMBDMI", "VMBDMI-R", "VMB8DC-20", "VMB4LEDPWM-20"])
26
26
  class DimmerChannelStatusMessage(Message):
27
27
  """
28
28
  sent by: VMB4DC
@@ -87,6 +87,7 @@ class ModuleStatusMessage(Message):
87
87
  "VMBGPO-20",
88
88
  "VMBEL4PIR-20",
89
89
  "VMBGP4PIR-20",
90
+ "VMBPSUMNGR-20",
90
91
  ],
91
92
  )
92
93
  class ModuleStatusMessage2(Message):
@@ -148,6 +148,9 @@ class ModuleTypeMessage(Message):
148
148
  "VMBGPO-20",
149
149
  "VMBEL4PIR-20",
150
150
  "VMBGP4PIR-20",
151
+ "VMB4LEDPWM-20",
152
+ "VMB8IN-20",
153
+ "VMB8DC-20",
151
154
  ],
152
155
  )
153
156
  class ModuleType2Message(Message):
@@ -0,0 +1,56 @@
1
+ """
2
+ :author: Maikel Punie
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ import struct
8
+
9
+ from velbusaio.command_registry import register
10
+ from velbusaio.message import Message
11
+
12
+ COMMAND_CODE = 0xA2
13
+ BALANCED = 0x01
14
+ BOOST = 0x02
15
+ BACKUP = 0x03
16
+
17
+
18
+ @register(COMMAND_CODE, ["VMBPSUMNGR-20"])
19
+ class PsuLoadMessage(Message):
20
+
21
+ def __init__(self, address=None):
22
+ Message.__init__(self)
23
+ self.mode = 0
24
+ self.load_1 = 0
25
+ self.load_2 = 0
26
+ self.out = 0
27
+
28
+ def populate(self, priority, address, rtr, data):
29
+ """
30
+ :return: None
31
+ """
32
+ self.needs_low_priority(priority)
33
+ self.needs_no_rtr(rtr)
34
+ self.needs_data(data, 3)
35
+ self.set_attributes(priority, address, rtr)
36
+ self.mode = data[0]
37
+ self.load_1 = data[1]
38
+ self.load_2 = data[2]
39
+ self.out = data[3]
40
+
41
+ def data_to_binary(self):
42
+ """
43
+ :return: bytes
44
+ """
45
+ return (
46
+ bytes(
47
+ [
48
+ COMMAND_CODE,
49
+ self.mode,
50
+ self.load_1,
51
+ self.load_2,
52
+ self.out,
53
+ ]
54
+ )
55
+ + struct.pack(">L", self.delay_time)[-3:]
56
+ )
@@ -0,0 +1,53 @@
1
+ """
2
+ :author: Maikel Punie
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ import struct
8
+
9
+ from velbusaio.command_registry import register
10
+ from velbusaio.message import Message
11
+
12
+ COMMAND_CODE = 0xA3
13
+
14
+
15
+ @register(COMMAND_CODE, ["VMBPSUMNGR-20"])
16
+ class PsuValuesMessage(Message):
17
+
18
+ def __init__(self, address=None):
19
+ Message.__init__(self)
20
+ self.channel = 0
21
+ self.watt = 0
22
+ self.volt = 0
23
+ self.amp = 0
24
+
25
+ def populate(self, priority, address, rtr, data):
26
+ """
27
+ :return: None
28
+ """
29
+ self.needs_low_priority(priority)
30
+ self.needs_no_rtr(rtr)
31
+ self.needs_data(data, 3)
32
+ self.set_attributes(priority, address, rtr)
33
+ self.channel = (data[0] & 0xF0) >> 4
34
+ self.watt = ((data[0] & 0x0F) << 16 | data[1] << 8 | data[2]) / 1000
35
+ self.volt = (data[3] << 8 | data[4]) / 1000
36
+ self.amp = (data[5] << 8 | data[6]) / 1000
37
+
38
+ def data_to_binary(self):
39
+ """
40
+ :return: bytes
41
+ """
42
+ return (
43
+ bytes(
44
+ [
45
+ COMMAND_CODE,
46
+ self.mode,
47
+ self.load_1,
48
+ self.load_2,
49
+ self.out,
50
+ ]
51
+ )
52
+ + struct.pack(">L", self.delay_time)[-3:]
53
+ )
@@ -12,7 +12,16 @@ COMMAND_CODE = 0x11
12
12
 
13
13
  @register(
14
14
  COMMAND_CODE,
15
- ["VMB1DM", "VMBDME", "VMBDMI-R", "VMBDMI", "VMB1LED", "VMB4DC", "VMB8DC-20"],
15
+ [
16
+ "VMB1DM",
17
+ "VMBDME",
18
+ "VMBDMI-R",
19
+ "VMBDMI",
20
+ "VMB1LED",
21
+ "VMB4DC",
22
+ "VMB8DC-20",
23
+ "VMB4LEDPWM-20",
24
+ ],
16
25
  )
17
26
  class RestoreDimmerMessage(Message):
18
27
  """
@@ -54,7 +54,10 @@ class SetDimmerMessage(Message):
54
54
  ) + self.dimmer_transitiontime.to_bytes(2, byteorder="big", signed=False)
55
55
 
56
56
 
57
- @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20", "VMBDMI", "VMBDMI-R", "VMB8DC-20"])
57
+ @register(
58
+ COMMAND_CODE,
59
+ ["VMBDALI", "VMBDALI-20", "VMBDMI", "VMBDMI-R", "VMB8DC-20", "VMB4LEDPWM-20"],
60
+ )
58
61
  class SetDimmerMessage2(SetDimmerMessage):
59
62
  """This with this message the channel numbering is an integer
60
63
  send by:
@@ -12,7 +12,16 @@ COMMAND_CODE = 0x0F
12
12
 
13
13
  @register(
14
14
  COMMAND_CODE,
15
- ["VMB1DM", "VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED", "VMB8DC-20"],
15
+ [
16
+ "VMB1DM",
17
+ "VMBDME",
18
+ "VMB4DC",
19
+ "VMBDMI",
20
+ "VMBDMI-R",
21
+ "VMB1LED",
22
+ "VMB8DC-20",
23
+ "VMB4LEDPWM-20",
24
+ ],
16
25
  )
17
26
  class SliderStatusMessage(Message):
18
27
  """
velbusaio/module.py CHANGED
@@ -69,6 +69,7 @@ from velbusaio.messages.channel_name_request import (
69
69
  from velbusaio.messages.clear_led import ClearLedMessage
70
70
  from velbusaio.messages.counter_status import CounterStatusMessage
71
71
  from velbusaio.messages.counter_status_request import CounterStatusRequestMessage
72
+ from velbusaio.messages.counter_value import CounterValueMessage
72
73
  from velbusaio.messages.dali_device_settings import DaliDeviceSettingMsg
73
74
  from velbusaio.messages.dali_device_settings import DeviceType as DaliDeviceType
74
75
  from velbusaio.messages.dali_device_settings import DeviceTypeMsg as DaliDeviceTypeMsg
@@ -545,6 +546,10 @@ class Module:
545
546
  await self._update_channel(
546
547
  message.sensor, {"cur": message.value, "unit": message.unit}
547
548
  )
549
+ elif isinstance(message, CounterValueMessage):
550
+ await self._update_channel(
551
+ message.channel, {"power": message.power, "energy": message.energy}
552
+ )
548
553
 
549
554
  async def _update_channel(self, channel: int, updates: dict):
550
555
  try:
@@ -785,6 +790,8 @@ class Module:
785
790
  "ThermostatAddr" in self._data and self._data["ThermostatAddr"] != 0
786
791
  ):
787
792
  await self._update_channel(int(chan), {"thermostat": True})
793
+ if chan_data["Type"] == "Dimmer" and "sliderScale" in self._data:
794
+ self._channels[int(chan)].slider_scale = self._data["sliderScale"]
788
795
 
789
796
 
790
797
  class VmbDali(Module):
@@ -0,0 +1,282 @@
1
+ {
2
+ "Channels": {
3
+ "01": {
4
+ "Editable": "yes",
5
+ "Name": "Alarm 1",
6
+ "Type": "Button"
7
+ },
8
+ "02": {
9
+ "Editable": "yes",
10
+ "Name": "Alarm 2",
11
+ "Type": "Button"
12
+ },
13
+ "03": {
14
+ "Editable": "yes",
15
+ "Name": "Alarm 3",
16
+ "Type": "Button"
17
+ },
18
+ "04": {
19
+ "Editable": "yes",
20
+ "Name": "Alarm 4",
21
+ "Type": "Button"
22
+ },
23
+ "05": {
24
+ "Editable": "yes",
25
+ "Name": "Alarm 5",
26
+ "Type": "Button"
27
+ },
28
+ "06": {
29
+ "Editable": "yes",
30
+ "Name": "Alarm 6",
31
+ "Type": "Button"
32
+ },
33
+ "07": {
34
+ "Editable": "yes",
35
+ "Name": "Alarm 7",
36
+ "Type": "Button"
37
+ },
38
+ "08": {
39
+ "Editable": "yes",
40
+ "Name": "Alarm 8",
41
+ "Type": "Button"
42
+ },
43
+ "09": {
44
+ "Editable": "yes",
45
+ "Name": "Alarm 9",
46
+ "Type": "Button"
47
+ },
48
+ "10": {
49
+ "Editable": "yes",
50
+ "Name": "Alarm 10",
51
+ "Type": "Button"
52
+ },
53
+ "11": {
54
+ "Editable": "yes",
55
+ "Name": "Alarm 11",
56
+ "Type": "Button"
57
+ },
58
+ "12": {
59
+ "Editable": "yes",
60
+ "Name": "Alarm 12",
61
+ "Type": "Button"
62
+ },
63
+ "13": {
64
+ "Editable": "yes",
65
+ "Name": "Alarm 13",
66
+ "Type": "Button"
67
+ },
68
+ "14": {
69
+ "Editable": "yes",
70
+ "Name": "Alarm 14",
71
+ "Type": "Button"
72
+ },
73
+ "15": {
74
+ "Editable": "yes",
75
+ "Name": "Alarm 15",
76
+ "Type": "Button"
77
+ },
78
+ "16": {
79
+ "Editable": "yes",
80
+ "Name": "Alarm 16",
81
+ "Type": "Button"
82
+ }
83
+ },
84
+ "Info": "PSU Manager",
85
+ "Memory": {
86
+ "Address": {
87
+ "07BC": {
88
+ "ModuleName": "0:Start"
89
+ },
90
+ "07BD": {
91
+ "ModuleName": "1"
92
+ },
93
+ "07BE": {
94
+ "ModuleName": "2"
95
+ },
96
+ "07BF": {
97
+ "ModuleName": "3"
98
+ },
99
+ "07C0": {
100
+ "ModuleName": "4"
101
+ },
102
+ "07C1": {
103
+ "ModuleName": "5"
104
+ },
105
+ "07C2": {
106
+ "ModuleName": "6"
107
+ },
108
+ "07C3": {
109
+ "ModuleName": "7"
110
+ },
111
+ "07C4": {
112
+ "ModuleName": "8"
113
+ },
114
+ "07C5": {
115
+ "ModuleName": "9"
116
+ },
117
+ "07C6": {
118
+ "ModuleName": "10"
119
+ },
120
+ "07C7": {
121
+ "ModuleName": "11"
122
+ },
123
+ "07C8": {
124
+ "ModuleName": "12"
125
+ },
126
+ "07C9": {
127
+ "ModuleName": "13"
128
+ },
129
+ "07CA": {
130
+ "ModuleName": "14"
131
+ },
132
+ "07CB": {
133
+ "ModuleName": "15"
134
+ },
135
+ "07CC": {
136
+ "ModuleName": "16"
137
+ },
138
+ "07CD": {
139
+ "ModuleName": "17"
140
+ },
141
+ "07CE": {
142
+ "ModuleName": "18"
143
+ },
144
+ "07CF": {
145
+ "ModuleName": "19"
146
+ },
147
+ "07D0": {
148
+ "ModuleName": "20"
149
+ },
150
+ "07D1": {
151
+ "ModuleName": "21"
152
+ },
153
+ "07D2": {
154
+ "ModuleName": "22"
155
+ },
156
+ "07D3": {
157
+ "ModuleName": "23"
158
+ },
159
+ "07D4": {
160
+ "ModuleName": "24"
161
+ },
162
+ "07D5": {
163
+ "ModuleName": "25"
164
+ },
165
+ "07D6": {
166
+ "ModuleName": "26"
167
+ },
168
+ "07D7": {
169
+ "ModuleName": "27"
170
+ },
171
+ "07D8": {
172
+ "ModuleName": "28"
173
+ },
174
+ "07D9": {
175
+ "ModuleName": "29"
176
+ },
177
+ "07DA": {
178
+ "ModuleName": "30"
179
+ },
180
+ "07DB": {
181
+ "ModuleName": "31"
182
+ },
183
+ "07DC": {
184
+ "ModuleName": "32"
185
+ },
186
+ "07DD": {
187
+ "ModuleName": "33"
188
+ },
189
+ "07DE": {
190
+ "ModuleName": "34"
191
+ },
192
+ "07DF": {
193
+ "ModuleName": "35"
194
+ },
195
+ "07E0": {
196
+ "ModuleName": "36"
197
+ },
198
+ "07E1": {
199
+ "ModuleName": "37"
200
+ },
201
+ "07E2": {
202
+ "ModuleName": "38"
203
+ },
204
+ "07E3": {
205
+ "ModuleName": "39"
206
+ },
207
+ "07E4": {
208
+ "ModuleName": "40"
209
+ },
210
+ "07E5": {
211
+ "ModuleName": "41"
212
+ },
213
+ "07E6": {
214
+ "ModuleName": "42"
215
+ },
216
+ "07E7": {
217
+ "ModuleName": "43"
218
+ },
219
+ "07E8": {
220
+ "ModuleName": "44"
221
+ },
222
+ "07E9": {
223
+ "ModuleName": "45"
224
+ },
225
+ "07EA": {
226
+ "ModuleName": "46"
227
+ },
228
+ "07EB": {
229
+ "ModuleName": "47"
230
+ },
231
+ "07EC": {
232
+ "ModuleName": "48"
233
+ },
234
+ "07ED": {
235
+ "ModuleName": "49"
236
+ },
237
+ "07EE": {
238
+ "ModuleName": "50"
239
+ },
240
+ "07EF": {
241
+ "ModuleName": "51"
242
+ },
243
+ "07F0": {
244
+ "ModuleName": "52"
245
+ },
246
+ "07F1": {
247
+ "ModuleName": "53"
248
+ },
249
+ "07F2": {
250
+ "ModuleName": "54"
251
+ },
252
+ "07F3": {
253
+ "ModuleName": "55"
254
+ },
255
+ "07F4": {
256
+ "ModuleName": "56"
257
+ },
258
+ "07F5": {
259
+ "ModuleName": "57"
260
+ },
261
+ "07F6": {
262
+ "ModuleName": "58"
263
+ },
264
+ "07F7": {
265
+ "ModuleName": "59"
266
+ },
267
+ "07F8": {
268
+ "ModuleName": "60"
269
+ },
270
+ "07F9": {
271
+ "ModuleName": "61"
272
+ },
273
+ "07FA": {
274
+ "ModuleName": "62"
275
+ },
276
+ "07FB": {
277
+ "ModuleName": "64:Save"
278
+ }
279
+ }
280
+ },
281
+ "Type": "VMBPSUMNGR-20"
282
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "sliderScale": 254,
2
3
  "Channels": {
3
4
  "01": {
4
5
  "Editable": "yes",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "sliderScale": 254,
2
3
  "Channels": {
3
4
  "01": {
4
5
  "Editable": "yes",
@@ -50,122 +50,122 @@
50
50
  },
51
51
  "09": {
52
52
  "Editable": "yes",
53
- "Name": "Alarm 9",
53
+ "Name": "Cntr alarm ch 9",
54
54
  "Type": "ThermostatChannel"
55
55
  },
56
56
  "10": {
57
57
  "Editable": "yes",
58
- "Name": "Alarm 10",
58
+ "Name": "Cntr alarm ch 10",
59
59
  "Type": "ThermostatChannel"
60
60
  },
61
61
  "11": {
62
62
  "Editable": "yes",
63
- "Name": "Alarm 11",
63
+ "Name": "Cntr alarm ch 11",
64
64
  "Type": "ThermostatChannel"
65
65
  },
66
66
  "12": {
67
67
  "Editable": "yes",
68
- "Name": "Alarm 12",
68
+ "Name": "Cntr alarm ch 12",
69
69
  "Type": "ThermostatChannel"
70
70
  },
71
71
  "13": {
72
72
  "Editable": "yes",
73
- "Name": "Alarm 13",
73
+ "Name": "Cntr alarm ch 13",
74
74
  "Type": "ThermostatChannel"
75
75
  },
76
76
  "14": {
77
77
  "Editable": "yes",
78
- "Name": "Alarm 14",
78
+ "Name": "Cntr alarm ch 14",
79
79
  "Type": "ThermostatChannel"
80
80
  },
81
81
  "15": {
82
82
  "Editable": "yes",
83
- "Name": "Alarm 15",
83
+ "Name": "Cntr alarm ch 15",
84
84
  "Type": "ThermostatChannel"
85
85
  },
86
86
  "16": {
87
87
  "Editable": "yes",
88
- "Name": "Alarm 16",
88
+ "Name": "Cntr alarm ch 16",
89
89
  "Type": "ThermostatChannel"
90
90
  },
91
91
  "17": {
92
92
  "Editable": "yes",
93
- "Name": "Alarm 17",
93
+ "Name": "Cntr alarm ch 17",
94
94
  "Type": "ThermostatChannel"
95
95
  },
96
96
  "18": {
97
97
  "Editable": "yes",
98
- "Name": "Alarm 18",
98
+ "Name": "Cntr alarm ch 18",
99
99
  "Type": "ThermostatChannel"
100
100
  },
101
101
  "19": {
102
102
  "Editable": "yes",
103
- "Name": "Alarm 19",
103
+ "Name": "Cntr alarm ch 19",
104
104
  "Type": "ThermostatChannel"
105
105
  },
106
106
  "20": {
107
107
  "Editable": "yes",
108
- "Name": "Alarm 20",
108
+ "Name": "Cntr alarm ch 20",
109
109
  "Type": "ThermostatChannel"
110
110
  },
111
111
  "21": {
112
112
  "Editable": "yes",
113
- "Name": "Alarm 21",
113
+ "Name": "Cntr alarm ch 21",
114
114
  "Type": "ThermostatChannel"
115
115
  },
116
116
  "22": {
117
117
  "Editable": "yes",
118
- "Name": "Alarm 22",
118
+ "Name": "Cntr alarm ch 22",
119
119
  "Type": "ThermostatChannel"
120
120
  },
121
121
  "23": {
122
122
  "Editable": "yes",
123
- "Name": "Alarm 23",
123
+ "Name": "Cntr alarm ch 23",
124
124
  "Type": "ThermostatChannel"
125
125
  },
126
126
  "24": {
127
127
  "Editable": "yes",
128
- "Name": "Alarm 24",
128
+ "Name": "Cntr alarm ch 24",
129
129
  "Type": "ThermostatChannel"
130
130
  },
131
131
  "25": {
132
132
  "Editable": "yes",
133
- "Name": "Alarm 25",
133
+ "Name": "Cntr alarm ch 25",
134
134
  "Type": "ThermostatChannel"
135
135
  },
136
136
  "26": {
137
137
  "Editable": "yes",
138
- "Name": "Alarm 26",
138
+ "Name": "Cntr alarm ch 26",
139
139
  "Type": "ThermostatChannel"
140
140
  },
141
141
  "27": {
142
142
  "Editable": "yes",
143
- "Name": "Alarm 27",
143
+ "Name": "Cntr alarm ch 27",
144
144
  "Type": "ThermostatChannel"
145
145
  },
146
146
  "28": {
147
147
  "Editable": "yes",
148
- "Name": "Alarm 28",
148
+ "Name": "Cntr alarm ch 28",
149
149
  "Type": "ThermostatChannel"
150
150
  },
151
151
  "29": {
152
152
  "Editable": "yes",
153
- "Name": "Alarm 29",
153
+ "Name": "Cntr alarm ch 29",
154
154
  "Type": "ThermostatChannel"
155
155
  },
156
156
  "30": {
157
157
  "Editable": "yes",
158
- "Name": "Alarm 30",
158
+ "Name": "Cntr alarm ch 30",
159
159
  "Type": "ThermostatChannel"
160
160
  },
161
161
  "31": {
162
162
  "Editable": "yes",
163
- "Name": "Alarm 31",
163
+ "Name": "Cntr alarm ch 31",
164
164
  "Type": "ThermostatChannel"
165
165
  },
166
166
  "32": {
167
167
  "Editable": "yes",
168
- "Name": "Alarm 32",
168
+ "Name": "Cntr alarm ch 32",
169
169
  "Type": "ThermostatChannel"
170
170
  },
171
171
  "96": {
@@ -371,78 +371,178 @@
371
371
  "02EA": {
372
372
  "Match": {
373
373
  "1": {
374
- "%......00": {
374
+ "%00000000": {
375
375
  "Value": "reserved"
376
376
  },
377
- "%......01": {
377
+ "%00000001": {
378
378
  "Value": "liter"
379
379
  },
380
- "%......10": {
380
+ "%00000010": {
381
381
  "Value": "m3"
382
382
  },
383
- "%......11": {
383
+ "%00000011": {
384
384
  "Value": "kWh"
385
385
  },
386
- "%......[01][01]": {
386
+ "%........": {
387
387
  "Channel": "01",
388
388
  "SubName": "Unit"
389
389
  }
390
- },
391
- "2": {
392
- "%....00..": {
390
+ }
391
+ }
392
+ },
393
+ "02EE": {
394
+ "Match": {
395
+ "1": {
396
+ "%00000000": {
393
397
  "Value": "reserved"
394
398
  },
395
- "%....01..": {
399
+ "%00000001": {
396
400
  "Value": "liter"
397
401
  },
398
- "%....10..": {
402
+ "%00000010": {
399
403
  "Value": "m3"
400
404
  },
401
- "%....11..": {
405
+ "%00000011": {
402
406
  "Value": "kWh"
403
407
  },
404
- "%....[01][01]..": {
408
+ "%........": {
405
409
  "Channel": "02",
406
410
  "SubName": "Unit"
407
411
  }
408
- },
409
- "3": {
410
- "%..00....": {
412
+ }
413
+ }
414
+ },
415
+ "02F2": {
416
+ "Match": {
417
+ "1": {
418
+ "%00000000": {
411
419
  "Value": "reserved"
412
420
  },
413
- "%..01....": {
421
+ "%00000001": {
414
422
  "Value": "liter"
415
423
  },
416
- "%..10....": {
424
+ "%00000010": {
417
425
  "Value": "m3"
418
426
  },
419
- "%..11....": {
427
+ "%00000011": {
420
428
  "Value": "kWh"
421
429
  },
422
- "%..[01][01]....": {
430
+ "%........": {
423
431
  "Channel": "03",
424
432
  "SubName": "Unit"
425
433
  }
426
- },
427
- "4": {
428
- "%00......": {
434
+ }
435
+ }
436
+ },
437
+ "02F6": {
438
+ "Match": {
439
+ "1": {
440
+ "%00000000": {
429
441
  "Value": "reserved"
430
442
  },
431
- "%01......": {
443
+ "%00000001": {
432
444
  "Value": "liter"
433
445
  },
434
- "%10......": {
446
+ "%00000010": {
435
447
  "Value": "m3"
436
448
  },
437
- "%11......": {
449
+ "%00000011": {
438
450
  "Value": "kWh"
439
451
  },
440
- "%[01][01]......": {
452
+ "%........": {
441
453
  "Channel": "04",
442
454
  "SubName": "Unit"
443
455
  }
444
456
  }
445
457
  }
458
+ },
459
+ "02FA": {
460
+ "Match": {
461
+ "1": {
462
+ "%00000000": {
463
+ "Value": "reserved"
464
+ },
465
+ "%00000001": {
466
+ "Value": "liter"
467
+ },
468
+ "%00000010": {
469
+ "Value": "m3"
470
+ },
471
+ "%00000011": {
472
+ "Value": "kWh"
473
+ },
474
+ "%........": {
475
+ "Channel": "05",
476
+ "SubName": "Unit"
477
+ }
478
+ }
479
+ }
480
+ },
481
+ "02FE": {
482
+ "Match": {
483
+ "1": {
484
+ "%00000000": {
485
+ "Value": "reserved"
486
+ },
487
+ "%00000001": {
488
+ "Value": "liter"
489
+ },
490
+ "%00000010": {
491
+ "Value": "m3"
492
+ },
493
+ "%00000011": {
494
+ "Value": "kWh"
495
+ },
496
+ "%........": {
497
+ "Channel": "06",
498
+ "SubName": "Unit"
499
+ }
500
+ }
501
+ }
502
+ },
503
+ "0302": {
504
+ "Match": {
505
+ "1": {
506
+ "%00000000": {
507
+ "Value": "reserved"
508
+ },
509
+ "%00000001": {
510
+ "Value": "liter"
511
+ },
512
+ "%00000010": {
513
+ "Value": "m3"
514
+ },
515
+ "%00000011": {
516
+ "Value": "kWh"
517
+ },
518
+ "%........": {
519
+ "Channel": "07",
520
+ "SubName": "Unit"
521
+ }
522
+ }
523
+ }
524
+ },
525
+ "0306": {
526
+ "Match": {
527
+ "1": {
528
+ "%00000000": {
529
+ "Value": "reserved"
530
+ },
531
+ "%00000001": {
532
+ "Value": "liter"
533
+ },
534
+ "%00000010": {
535
+ "Value": "m3"
536
+ },
537
+ "%00000011": {
538
+ "Value": "kWh"
539
+ },
540
+ "%........": {
541
+ "Channel": "08",
542
+ "SubName": "Unit"
543
+ }
544
+ }
545
+ }
446
546
  }
447
547
  },
448
548
  "ModuleName": "03AC-03EB"
@@ -0,0 +1,33 @@
1
+ from bs4 import BeautifulSoup
2
+
3
+
4
+ class vlpFile:
5
+
6
+ def __init__(self, file_path) -> None:
7
+ self._file_path = file_path
8
+ self._soup = None
9
+ self._modules = {}
10
+ self._read()
11
+ self._parse()
12
+ print(self._modules)
13
+
14
+ def _read(self) -> None:
15
+ with open(self._file_path) as file:
16
+ xml_content = file.read()
17
+ self._soup = BeautifulSoup(xml_content, "xml")
18
+
19
+ def _parse(self) -> None:
20
+ for module in self._soup.find_all("Module"):
21
+ self._parse_module(module)
22
+
23
+ def _parse_module(self, module) -> None:
24
+ mod_info = {}
25
+ mod_info["name"] = module.find("Caption").get_text()
26
+ mod_info["addresses"] = module["address"]
27
+ mod_info["build"] = module["build"]
28
+ mod_info["serial"] = module["serial"]
29
+ mod_info["build"] = module["build"]
30
+ mod_info["type"] = module["type"]
31
+ memory = module.find("Memory")
32
+ mod_info["memory"] = memory.get_text()
33
+ self._modules[mod_info["addresses"]] = mod_info