conson-xp 1.36.0__py3-none-any.whl → 1.38.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.
- {conson_xp-1.36.0.dist-info → conson_xp-1.38.0.dist-info}/METADATA +6 -1
- {conson_xp-1.36.0.dist-info → conson_xp-1.38.0.dist-info}/RECORD +51 -46
- xp/__init__.py +1 -1
- xp/cli/commands/__init__.py +2 -0
- xp/cli/commands/conbus/__init__.py +2 -0
- xp/cli/commands/conbus/conbus.py +26 -0
- xp/cli/commands/conbus/conbus_actiontable_commands.py +18 -9
- xp/cli/commands/conbus/conbus_autoreport_commands.py +5 -2
- xp/cli/commands/conbus/conbus_event_commands.py +1 -7
- xp/cli/commands/conbus/conbus_export_commands.py +7 -6
- xp/cli/commands/conbus/conbus_lightlevel_commands.py +2 -0
- xp/cli/commands/conbus/conbus_linknumber_commands.py +2 -0
- xp/cli/commands/conbus/conbus_modulenumber_commands.py +2 -0
- xp/cli/commands/conbus/conbus_msactiontable_commands.py +92 -9
- xp/cli/commands/conbus/conbus_output_commands.py +4 -0
- xp/models/actiontable/msactiontable.py +9 -0
- xp/models/actiontable/msactiontable_xp20.py +14 -14
- xp/models/actiontable/msactiontable_xp24.py +228 -11
- xp/models/actiontable/msactiontable_xp33.py +42 -14
- xp/models/conbus/conbus_export.py +6 -2
- xp/models/config/__init__.py +1 -0
- xp/models/{homekit/homekit_conson_config.py → config/conson_module_config.py} +3 -1
- xp/models/protocol/conbus_protocol.py +1 -1
- xp/models/telegram/datapoint_type.py +30 -0
- xp/services/actiontable/msactiontable_xp20_serializer.py +12 -0
- xp/services/actiontable/msactiontable_xp24_serializer.py +13 -1
- xp/services/actiontable/msactiontable_xp33_serializer.py +12 -0
- xp/services/conbus/actiontable/actiontable_download_service.py +8 -5
- xp/services/conbus/actiontable/actiontable_list_service.py +2 -1
- xp/services/conbus/actiontable/actiontable_show_service.py +2 -2
- xp/services/conbus/actiontable/actiontable_upload_service.py +1 -1
- xp/services/conbus/conbus_datapoint_service.py +1 -1
- xp/services/conbus/conbus_event_list_service.py +1 -1
- xp/services/conbus/conbus_export_service.py +1 -1
- xp/services/conbus/msactiontable/__init__.py +1 -0
- xp/services/conbus/{actiontable/msactiontable_service.py → msactiontable/msactiontable_download_service.py} +9 -6
- xp/services/conbus/msactiontable/msactiontable_list_service.py +92 -0
- xp/services/conbus/msactiontable/msactiontable_show_service.py +89 -0
- xp/services/homekit/homekit_config_validator.py +1 -1
- xp/services/homekit/homekit_conson_validator.py +1 -1
- xp/services/homekit/homekit_dimminglight.py +1 -1
- xp/services/homekit/homekit_lightbulb.py +1 -1
- xp/services/homekit/homekit_module_service.py +1 -1
- xp/services/homekit/homekit_outlet.py +1 -1
- xp/services/protocol/conbus_event_protocol.py +7 -3
- xp/services/server/server_service.py +1 -1
- xp/services/term/state_monitor_service.py +1 -1
- xp/utils/dependencies.py +36 -14
- {conson_xp-1.36.0.dist-info → conson_xp-1.38.0.dist-info}/WHEEL +0 -0
- {conson_xp-1.36.0.dist-info → conson_xp-1.38.0.dist-info}/entry_points.txt +0 -0
- {conson_xp-1.36.0.dist-info → conson_xp-1.38.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: conson-xp
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.38.0
|
|
4
4
|
Summary: XP Protocol Communication Tools
|
|
5
5
|
Author-Email: ldvchosal <ldvchosal@github.com>
|
|
6
6
|
License: MIT License
|
|
@@ -350,7 +350,10 @@ xp conbus event
|
|
|
350
350
|
xp conbus event list
|
|
351
351
|
xp conbus event raw
|
|
352
352
|
|
|
353
|
+
|
|
353
354
|
xp conbus export
|
|
355
|
+
xp conbus export config
|
|
356
|
+
|
|
354
357
|
|
|
355
358
|
xp conbus lightlevel
|
|
356
359
|
xp conbus lightlevel get
|
|
@@ -371,6 +374,8 @@ xp conbus modulenumber set
|
|
|
371
374
|
|
|
372
375
|
xp conbus msactiontable
|
|
373
376
|
xp conbus msactiontable download
|
|
377
|
+
xp conbus msactiontable list
|
|
378
|
+
xp conbus msactiontable show
|
|
374
379
|
|
|
375
380
|
|
|
376
381
|
xp conbus output
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
conson_xp-1.
|
|
2
|
-
conson_xp-1.
|
|
3
|
-
conson_xp-1.
|
|
4
|
-
conson_xp-1.
|
|
5
|
-
xp/__init__.py,sha256=
|
|
1
|
+
conson_xp-1.38.0.dist-info/METADATA,sha256=BaKGH6wo1T_TGXTUMPeRF-CSqfebxBULEpiM22sCi_w,11330
|
|
2
|
+
conson_xp-1.38.0.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
|
|
3
|
+
conson_xp-1.38.0.dist-info/entry_points.txt,sha256=1OcdIcDM1hz3ljCXgybaPUh1IOFEwkaTgLIW9u9zGeg,50
|
|
4
|
+
conson_xp-1.38.0.dist-info/licenses/LICENSE,sha256=rxj6woMM-r3YCyGq_UHFtbh7kHTAJgrccH6O-33IDE4,1419
|
|
5
|
+
xp/__init__.py,sha256=5fakKUk2esOx8vUfRq1ASPbUSI7FQDe4PEnmW5Z2KOw,181
|
|
6
6
|
xp/cli/__init__.py,sha256=QjnKB1KaI2aIyKlzrnvCwfbBuUj8HNgwNMvNJVQofbI,81
|
|
7
7
|
xp/cli/__main__.py,sha256=l2iKwMdat5rTGd3JWs-uGksnYYDDffp_Npz05QdKEeU,117
|
|
8
|
-
xp/cli/commands/__init__.py,sha256=
|
|
9
|
-
xp/cli/commands/conbus/__init__.py,sha256=
|
|
10
|
-
xp/cli/commands/conbus/conbus.py,sha256=
|
|
11
|
-
xp/cli/commands/conbus/conbus_actiontable_commands.py,sha256=
|
|
12
|
-
xp/cli/commands/conbus/conbus_autoreport_commands.py,sha256=
|
|
8
|
+
xp/cli/commands/__init__.py,sha256=G7A1KFRSV0CEeDTqr_khu-K9_sc01CTI2KSfkFcaBRM,4949
|
|
9
|
+
xp/cli/commands/conbus/__init__.py,sha256=HYaX2__XxwD3Xaw4CzflvL8CwoUa4yR6wOyH8wwyofM,535
|
|
10
|
+
xp/cli/commands/conbus/conbus.py,sha256=1j9-Nwnf6nqD4ztBZnZEbJOTlkYo4D-Ks2J7BGNF3MU,3575
|
|
11
|
+
xp/cli/commands/conbus/conbus_actiontable_commands.py,sha256=fIEe45iMWZ3Dbr0STzO8qbtWHR-R8qpGa_sLNeBm_og,7471
|
|
12
|
+
xp/cli/commands/conbus/conbus_autoreport_commands.py,sha256=TgXFVpoyFNiEatL6r78IghzyF0R2S3cgTrGZaiJPjwA,3934
|
|
13
13
|
xp/cli/commands/conbus/conbus_blink_commands.py,sha256=HRn4Lr_BO7_WynsaUnO_hKezOi3MVhkPYEOnh0rMMlg,5324
|
|
14
14
|
xp/cli/commands/conbus/conbus_config_commands.py,sha256=BugIbgNX6_s4MySGvI6tWZkwguciajHUX2Xz8XBux7k,716
|
|
15
15
|
xp/cli/commands/conbus/conbus_custom_commands.py,sha256=nQttCXzmuUVLy5u7mZaRqYXzy8MIHyHRJQBdkDLunYc,1735
|
|
16
16
|
xp/cli/commands/conbus/conbus_datapoint_commands.py,sha256=UZ_wTO0cdxjed0fGGZYylfJN9gaXwqLg3cn80JqqWt0,3751
|
|
17
17
|
xp/cli/commands/conbus/conbus_discover_commands.py,sha256=MnTCzvERO5xerfs0fuuIBoo1O9h_0IfoJ6snLGVl0lA,1899
|
|
18
|
-
xp/cli/commands/conbus/conbus_event_commands.py,sha256=
|
|
19
|
-
xp/cli/commands/conbus/conbus_export_commands.py,sha256=
|
|
20
|
-
xp/cli/commands/conbus/conbus_lightlevel_commands.py,sha256=
|
|
21
|
-
xp/cli/commands/conbus/conbus_linknumber_commands.py,sha256=
|
|
22
|
-
xp/cli/commands/conbus/conbus_modulenumber_commands.py,sha256=
|
|
23
|
-
xp/cli/commands/conbus/conbus_msactiontable_commands.py,sha256=
|
|
24
|
-
xp/cli/commands/conbus/conbus_output_commands.py,sha256=
|
|
18
|
+
xp/cli/commands/conbus/conbus_event_commands.py,sha256=Ps1hM0buhVQbYPgaap8HOS50aSHAIK2rk1SqKzny8rs,3075
|
|
19
|
+
xp/cli/commands/conbus/conbus_export_commands.py,sha256=KSeXZbD6tO0_BMgqmg20iVaEWOdTIHZr3heVy0GM6lQ,2986
|
|
20
|
+
xp/cli/commands/conbus/conbus_lightlevel_commands.py,sha256=AQhVneN5_rH6wd7D4KW80XIMh9MGjJv85gN57S206j4,7036
|
|
21
|
+
xp/cli/commands/conbus/conbus_linknumber_commands.py,sha256=hVr1g6nDTa4MezW8joHPjPuZcMp2ttd9PfZaT9sQED4,3528
|
|
22
|
+
xp/cli/commands/conbus/conbus_modulenumber_commands.py,sha256=FjFWnLU_aUoAXQ2tKKLC-ichNiIb90_9OWpSdIUyHvc,3600
|
|
23
|
+
xp/cli/commands/conbus/conbus_msactiontable_commands.py,sha256=Xs6TxwyzqMuUtvH1aQkQQToTR57Zzbs4IyeH28NKrtc,5616
|
|
24
|
+
xp/cli/commands/conbus/conbus_output_commands.py,sha256=rJx8pfsl_ZeCNXhEelsY7mfYnaj_DHdz4TC-e8d5QGs,5286
|
|
25
25
|
xp/cli/commands/conbus/conbus_raw_commands.py,sha256=892-S6wxp5xNPz6K86Le8KtQXNO4a0PQv20Hzx3vhiA,1996
|
|
26
26
|
xp/cli/commands/conbus/conbus_receive_commands.py,sha256=_PsC-3xidmJBuOWUS60iDzhSHYYn5ZFmORXap-ljVGM,1902
|
|
27
27
|
xp/cli/commands/conbus/conbus_scan_commands.py,sha256=L7YHNnDUWxT8UHkQoNgyKa6twoUrE126XBkT1G76xK0,1805
|
|
@@ -60,9 +60,10 @@ xp/connection/exceptions.py,sha256=7CcRUzkyay5zA6Z9-5dIDRzua806v5N7pCcJazP_1dE,3
|
|
|
60
60
|
xp/models/__init__.py,sha256=lROqr559DGd8WpJJUtfPT95VERCwMZHpBDEc96QSxQ0,1312
|
|
61
61
|
xp/models/actiontable/__init__.py,sha256=6kVq1rTOlpc24sZxGGVWkY48tqR42YWHLQHqakWqlPc,43
|
|
62
62
|
xp/models/actiontable/actiontable.py,sha256=bIeluZhMsvukkSwy2neaewavU8YR6Pso3PIvJ8ENlGg,1251
|
|
63
|
-
xp/models/actiontable/
|
|
64
|
-
xp/models/actiontable/
|
|
65
|
-
xp/models/actiontable/
|
|
63
|
+
xp/models/actiontable/msactiontable.py,sha256=42RdQB3rUzAP_UeH5PS6iADOnkev47rDR77_yttSkBg,192
|
|
64
|
+
xp/models/actiontable/msactiontable_xp20.py,sha256=iMNKrDpLcaynaG1pflfyoQjey-KUsoSjqy4J4XF-YGk,2031
|
|
65
|
+
xp/models/actiontable/msactiontable_xp24.py,sha256=hGi8Ah9LdL1w6bTLR8SUJVS_UA9PoB_Bzudv72A1AiU,9722
|
|
66
|
+
xp/models/actiontable/msactiontable_xp33.py,sha256=K1noQe5TNoTFLWE58r0-ZOB8lYM3oXFqoNL7z7Uob5A,2945
|
|
66
67
|
xp/models/conbus/__init__.py,sha256=VIusMWQdBtlwDgj7oSj06wQkklihTp4oWFShvP_JUgA,35
|
|
67
68
|
xp/models/conbus/conbus.py,sha256=mZQzKPfrdttT-qUnYUSyrEYyc_eHs8z301E5ejeiyvk,2689
|
|
68
69
|
xp/models/conbus/conbus_autoreport.py,sha256=lKotDfxRBb7h2Z1d4qI3KhhLJhFDwKqLbSdG5Makm8Y,2289
|
|
@@ -74,7 +75,7 @@ xp/models/conbus/conbus_datapoint.py,sha256=4ncR-vB2lRzRBAA30rYn8eguyTxsZoOKrrXt
|
|
|
74
75
|
xp/models/conbus/conbus_discover.py,sha256=nxxUEKfEsH1kd0BF8ovMs7zLujRhrq1oL9ZJtysPr5o,2238
|
|
75
76
|
xp/models/conbus/conbus_event_list.py,sha256=M8aHRHVB5VDIjqMzjO86xlERt7AMdfjIjt1b70RF52Y,958
|
|
76
77
|
xp/models/conbus/conbus_event_raw.py,sha256=i5gc7z-0yeunWOZ4rw3AiBt4MANezmhBQKjOOQk3oDc,1567
|
|
77
|
-
xp/models/conbus/conbus_export.py,sha256=
|
|
78
|
+
xp/models/conbus/conbus_export.py,sha256=esxd7phNCRCunn5YqOL4g9xk3QyZiOJYHide_oLKi34,1278
|
|
78
79
|
xp/models/conbus/conbus_lightlevel.py,sha256=GQGhzrCBEJROosNHInXIzBy6MD2AskEIMoFEGgZ60-0,1695
|
|
79
80
|
xp/models/conbus/conbus_linknumber.py,sha256=uFzKzfB06oIzZEKCb5X2JEI80JjMPFuYglsT1W1k8j4,1815
|
|
80
81
|
xp/models/conbus/conbus_logger_config.py,sha256=cFWjWn8tc_hPPI2kQAib_Akddar8O-3zkoj6wLBsdUo,3328
|
|
@@ -82,17 +83,18 @@ xp/models/conbus/conbus_output.py,sha256=q7QKsD_CWT7YOk-V3otKWD1VM7qThrSLIUOunnt
|
|
|
82
83
|
xp/models/conbus/conbus_raw.py,sha256=xqvYao6IE1SXum7JBgZpSuWXm9x_QZquS9N_3_r0Hjs,1460
|
|
83
84
|
xp/models/conbus/conbus_receive.py,sha256=-1u1qK-texfKCNZV-GYf_9KyLtJdIrx7HuZsKzu26Ow,1322
|
|
84
85
|
xp/models/conbus/conbus_writeconfig.py,sha256=z8fdJeFLyGJW7UMHcHxGrHIMS6gG1D3aXeYUkBuwnEg,2136
|
|
86
|
+
xp/models/config/__init__.py,sha256=gEZnX9eE3DjFtLtF32riEjJQLypqQRbyPauBI4Cowbs,36
|
|
87
|
+
xp/models/config/conson_module_config.py,sha256=KL9AYVUiet50SaVajIjicW6FNQ38Qm1vk1jZbZnMb00,2708
|
|
85
88
|
xp/models/homekit/__init__.py,sha256=5HDSOClCu0ArK3IICn3_LDMMLBAzLjBxUUSF73bxSSk,34
|
|
86
89
|
xp/models/homekit/homekit_accessory.py,sha256=NsHFhskuxIdJpF9-MvXHtjkLYvNHmSGFOy0GmQv3PY4,1038
|
|
87
90
|
xp/models/homekit/homekit_config.py,sha256=Y_k92PsKHFBnn3r1_RSZHJP5uLH27Gw8G7Bj5N8jvUE,2904
|
|
88
|
-
xp/models/homekit/homekit_conson_config.py,sha256=NML644Ij7abstMbud-TUPcxraGY4vQwKrkJOwftv2pM,2603
|
|
89
91
|
xp/models/log_entry.py,sha256=kPcYuAirCXugfL3YkOK9cQVlkNWxG_8a4AVuhsykHL0,4355
|
|
90
92
|
xp/models/protocol/__init__.py,sha256=TJ_CJKchA-xgQiv5vCo_ndBBZjrcaTmjT74bR0T-5Cw,38
|
|
91
|
-
xp/models/protocol/conbus_protocol.py,sha256=
|
|
93
|
+
xp/models/protocol/conbus_protocol.py,sha256=m8DnewIw4JSLG21hdqpcAjZVHfjSCYIUQ2imwfveggU,9139
|
|
92
94
|
xp/models/response.py,sha256=h6_B1k_v6IrWhgNWBohEGQGRCp5TcVhgQ3RJS8gTkhY,1230
|
|
93
95
|
xp/models/telegram/__init__.py,sha256=-_exhjlRLbBNuPxHC4tLA2SAgf8M0yHJMeyEoQIk9PI,53
|
|
94
96
|
xp/models/telegram/action_type.py,sha256=vkw_chTgmsadksGXvZ9D_qYGpjOwCw-OgbEi8Bml17g,783
|
|
95
|
-
xp/models/telegram/datapoint_type.py,sha256=
|
|
97
|
+
xp/models/telegram/datapoint_type.py,sha256=7aV-oUkqDiurT3b9mRF6M6yc5wu71AT3SXlgl6b9CDI,4067
|
|
96
98
|
xp/models/telegram/event_telegram.py,sha256=FCCfyZXQEUPB6Uo1m7B9nvFCJ0Ipv2CApmImAZo_Xa4,4689
|
|
97
99
|
xp/models/telegram/event_type.py,sha256=VZhaDpey7KYWnmwN-gstj-r4Vd5hiGdzQuRazUdixB8,333
|
|
98
100
|
xp/models/telegram/input_action_type.py,sha256=EDYtE4uxByUyGsZTkXxwN9rQxCAejWk08_kv-7COurM,1852
|
|
@@ -117,48 +119,51 @@ xp/services/__init__.py,sha256=W9YZyrkh7vm--ZHhAXNQiOYQs5yhhmUHXP5I0Lf1XBg,782
|
|
|
117
119
|
xp/services/actiontable/__init__.py,sha256=z6js4EuJ6xKHaseTEhuEvKo1tr9K1XyQiruReJtBiPY,26
|
|
118
120
|
xp/services/actiontable/actiontable_serializer.py,sha256=U7bhd8lYMUJAsFydCt_Y5uOJoUODhSjRlUQPD6jsqMo,8517
|
|
119
121
|
xp/services/actiontable/msactiontable_serializer.py,sha256=RRL6TZ1gpSQw81kAiw2BV3jTqm4fCJC0pWIcO26Cmos,174
|
|
120
|
-
xp/services/actiontable/msactiontable_xp20_serializer.py,sha256=
|
|
121
|
-
xp/services/actiontable/msactiontable_xp24_serializer.py,sha256=
|
|
122
|
-
xp/services/actiontable/msactiontable_xp33_serializer.py,sha256=
|
|
122
|
+
xp/services/actiontable/msactiontable_xp20_serializer.py,sha256=UP274qQfjFbAMojpeeqz72vJvNgAo_J5nyr4OFExsqE,6404
|
|
123
|
+
xp/services/actiontable/msactiontable_xp24_serializer.py,sha256=kgEKT-GSlye4ExjeXIAB1O-qi0cAm6POxoC2bKlwBi0,4601
|
|
124
|
+
xp/services/actiontable/msactiontable_xp33_serializer.py,sha256=XwBG-flfrSYxm0uy93gutZRj0LKGvOcJGnJpIFQQOuI,8747
|
|
123
125
|
xp/services/conbus/__init__.py,sha256=Hi35sMKu9o6LpYoi2tQDaQoMb8M5sOt_-LUTxxaCU_0,28
|
|
124
126
|
xp/services/conbus/actiontable/__init__.py,sha256=oD6vRk_Ye-eZ9s_hldAgtRJFu4mfAnODqpkJUGHHszk,40
|
|
125
|
-
xp/services/conbus/actiontable/actiontable_download_service.py,sha256=
|
|
126
|
-
xp/services/conbus/actiontable/actiontable_list_service.py,sha256=
|
|
127
|
-
xp/services/conbus/actiontable/actiontable_show_service.py,sha256=
|
|
128
|
-
xp/services/conbus/actiontable/actiontable_upload_service.py,sha256=
|
|
129
|
-
xp/services/conbus/actiontable/msactiontable_service.py,sha256=W44Uy2m2vM_yL57gwyyz59j9zRu5dyAG1g8PJcT7vE8,9777
|
|
127
|
+
xp/services/conbus/actiontable/actiontable_download_service.py,sha256=C6cjNRRsl7_jjn94I6ycCDvoqIpivNv0cMVkR-CQBXk,7608
|
|
128
|
+
xp/services/conbus/actiontable/actiontable_list_service.py,sha256=BYNpxdhdVvn5Z3XXvUYyiGGZ3fOoKR1F0boYDfAQ80c,2894
|
|
129
|
+
xp/services/conbus/actiontable/actiontable_show_service.py,sha256=Z11bVYstnIhahFKTL8WqgTmK8rMK6kvismdy7679ojY,3013
|
|
130
|
+
xp/services/conbus/actiontable/actiontable_upload_service.py,sha256=HTWJqJTIDFsp5v0SBx1Wt5gUeso6w03N6bKbtsbHtJY,9705
|
|
130
131
|
xp/services/conbus/conbus_blink_all_service.py,sha256=6XsqtgHUgPDPWG0Mx2W2gnG_1eiaHrt2DiPXGqGHS50,8472
|
|
131
132
|
xp/services/conbus/conbus_blink_service.py,sha256=wFCUbHYInbzfE4Ks_qjkav0FhtHXsxM9IY6tD5r0oAk,7898
|
|
132
133
|
xp/services/conbus/conbus_custom_service.py,sha256=uPsBkoVGr8I5JwpHiCM8Xf2DUYy6e34cQHmGSheY98Y,7766
|
|
133
134
|
xp/services/conbus/conbus_datapoint_queryall_service.py,sha256=K8a_aO5rXuOx9ZHTrN1rpQ6KIOAkhYx-HsqDf0HIo-E,8399
|
|
134
|
-
xp/services/conbus/conbus_datapoint_service.py,sha256=
|
|
135
|
+
xp/services/conbus/conbus_datapoint_service.py,sha256=MFyYv2TkP355S5phKLtfj05b5AtfwgQyCvklkR7AKT8,8026
|
|
135
136
|
xp/services/conbus/conbus_discover_service.py,sha256=ZwjYBlgP6FgpHBJk7pcKr4JHfH7WUHDxe4he4F_HblQ,12740
|
|
136
|
-
xp/services/conbus/conbus_event_list_service.py,sha256=
|
|
137
|
+
xp/services/conbus/conbus_event_list_service.py,sha256=og3medmu69CnEgzhgqihIV1yLNOQ_YTHr4zUtidGmIE,3616
|
|
137
138
|
xp/services/conbus/conbus_event_raw_service.py,sha256=FZFu-LNLInrTKTpiGLyootozvyIF5Si5FMrxNk2ALD0,7000
|
|
138
|
-
xp/services/conbus/conbus_export_service.py,sha256=
|
|
139
|
+
xp/services/conbus/conbus_export_service.py,sha256=aQz2cRMhTiUQgEaxeFRuOW8LEsfSqJzaivsHgGKEJtU,17298
|
|
139
140
|
xp/services/conbus/conbus_output_service.py,sha256=XHn_htcTt2TBSpuXr2DNsT8oOC2soctNFIojhYfd_v0,9297
|
|
140
141
|
xp/services/conbus/conbus_raw_service.py,sha256=FmUaF9o2nFZVP8LpabKIwkg0P8coLCkeJC4yYgsA6U0,5780
|
|
141
142
|
xp/services/conbus/conbus_receive_service.py,sha256=7wOaEDrdoXwZE9MeUM89eB3hobYpvtbYk_YLv3MVAtc,5352
|
|
142
143
|
xp/services/conbus/conbus_scan_service.py,sha256=QN7_x8BtNbHnqG7akcooAAcjz9Ex2y3VNDdhShKHUX8,6824
|
|
144
|
+
xp/services/conbus/msactiontable/__init__.py,sha256=rDYzumPSfcTjDADHxjE7bXQoeWtZTDGaYzFTYdVl_9g,42
|
|
145
|
+
xp/services/conbus/msactiontable/msactiontable_download_service.py,sha256=V3qa_DIPC2G2ihCNxPo0f17AY5v7mHQsZd9y3dOyekg,10077
|
|
146
|
+
xp/services/conbus/msactiontable/msactiontable_list_service.py,sha256=9mAybvJLoZOzJSEV0QRh5iYY_j0ArbyZvFZa8y9rpWE,2886
|
|
147
|
+
xp/services/conbus/msactiontable/msactiontable_show_service.py,sha256=pyoB5xN1bDh0E8kity4k0UnYpc7-YWhs8oIMvAeC9Xk,3023
|
|
143
148
|
xp/services/conbus/write_config_service.py,sha256=PQsN7rtTKHpwtAG8moLksUfRVqqE_0sxdE37meR1ZQ0,8935
|
|
144
149
|
xp/services/homekit/__init__.py,sha256=xAMKmln_AmEFdOOJGKWYi96seRlKDQpKx3-hm7XbdIo,36
|
|
145
150
|
xp/services/homekit/homekit_cache_service.py,sha256=NdijyH5_iyhsTHBb-OyT8Y2xnNDj8F5MP8neoVQ26hY,11010
|
|
146
151
|
xp/services/homekit/homekit_conbus_service.py,sha256=porvo4nZ4PE0R6bdaKwClDW2kevkW_8DOzw4NOO6DZQ,3348
|
|
147
|
-
xp/services/homekit/homekit_config_validator.py,sha256=
|
|
148
|
-
xp/services/homekit/homekit_conson_validator.py,sha256=
|
|
149
|
-
xp/services/homekit/homekit_dimminglight.py,sha256=
|
|
152
|
+
xp/services/homekit/homekit_config_validator.py,sha256=1m0FJddMyb5Yy73s6iMRZ7YTzLBu0wZwkLTACadmiL4,10730
|
|
153
|
+
xp/services/homekit/homekit_conson_validator.py,sha256=zRyCb0CIye8DO14bztEhx1kYazYZaPEMCBBLn9FZj2Q,3785
|
|
154
|
+
xp/services/homekit/homekit_dimminglight.py,sha256=3VP2vs_73yvPkr6trwKlvGMC_UHPj-iqgOhiqH2HQCE,5768
|
|
150
155
|
xp/services/homekit/homekit_dimminglight_service.py,sha256=lxFE2k8a8V9YQwpWPAAmbUvYD3zDlVa337xzDQl6tjM,5231
|
|
151
156
|
xp/services/homekit/homekit_hap_service.py,sha256=YrFe10XPBf6EC2SRnWmcCbjdVkrHjxSNPwYDPVvQiDQ,12527
|
|
152
|
-
xp/services/homekit/homekit_lightbulb.py,sha256=
|
|
157
|
+
xp/services/homekit/homekit_lightbulb.py,sha256=3-pbCEcw44Vk_HwHI0LCJmTO4A6cNndoA1-Fv1glWvU,3659
|
|
153
158
|
xp/services/homekit/homekit_lightbulb_service.py,sha256=G_ummBFiBurhQ2ZVwJ9l_aZ2MQgl5Uq-oi3KjIrdb-Y,2752
|
|
154
|
-
xp/services/homekit/homekit_module_service.py,sha256=
|
|
155
|
-
xp/services/homekit/homekit_outlet.py,sha256=
|
|
159
|
+
xp/services/homekit/homekit_module_service.py,sha256=hxJwbP7tV1K_zotMMP-Kyt2SQQT3DjSt50ty2ITIe_Y,1524
|
|
160
|
+
xp/services/homekit/homekit_outlet.py,sha256=ItWJMC-0xwX0k1JeMzPPmpE_ifKvYZ7n7_icBKLV5Lg,5207
|
|
156
161
|
xp/services/homekit/homekit_outlet_service.py,sha256=y7DbWbbvihWwF1Gyl0l9Hup1JHin6PTlDEHdoIqTfEQ,3798
|
|
157
162
|
xp/services/homekit/homekit_service.py,sha256=0lW-hg40ETco3gDBEYkR_sX-UIYsLSKCD4NWruLXUM8,14031
|
|
158
163
|
xp/services/log_file_service.py,sha256=fvPcZQj8XOKUA-4ep5R8n0PelvwvRlTLlVxvIWM5KR4,10506
|
|
159
164
|
xp/services/module_type_service.py,sha256=xWhr1EAZMykL5uNWHWdpa5T8yNruGKH43XRTOS8GwZg,7477
|
|
160
165
|
xp/services/protocol/__init__.py,sha256=qRufBmqRKGzpuzZ5bxBbmwf510TT00Ke8s5HcWGnqRY,818
|
|
161
|
-
xp/services/protocol/conbus_event_protocol.py,sha256=
|
|
166
|
+
xp/services/protocol/conbus_event_protocol.py,sha256=PpSr5sWcibN_xb2iMWAtWc0dTkUkFZelgYuPiejutkE,15155
|
|
162
167
|
xp/services/protocol/conbus_protocol.py,sha256=JO7yLkD_ohPT0ETjnAIx4CGpZyobf4LdbuozM_43btE,10276
|
|
163
168
|
xp/services/protocol/protocol_factory.py,sha256=PmjN9AtW9sxNo3voqUiNgQA-pTvX1RW4XXFlHKfFr5Q,2470
|
|
164
169
|
xp/services/protocol/telegram_protocol.py,sha256=Ki5DrXsKxiaqLcdP9WWUuhUI7cPu2DfwyZkh-Gv9Lb8,9496
|
|
@@ -168,7 +173,7 @@ xp/services/server/base_server_service.py,sha256=B-ntxp3swbwuri-9_2EuvBDi-4Uo9AH
|
|
|
168
173
|
xp/services/server/client_buffer_manager.py,sha256=1d_MqfzuUqBwaQUiC1n5K76WwSxrdngYAmNH7he6u3o,2235
|
|
169
174
|
xp/services/server/cp20_server_service.py,sha256=SXdI6Jt400T9sLdw86ovEqKRGeV3nYVaHEA9Gcj6W2A,2041
|
|
170
175
|
xp/services/server/device_service_factory.py,sha256=Y4TvSFALeq0zYzHfCwcbikSpmIyYbLcvm9756n5Jm7Q,3744
|
|
171
|
-
xp/services/server/server_service.py,sha256=
|
|
176
|
+
xp/services/server/server_service.py,sha256=YAkn3rxNYnxs3E1Dpwtt3ZzymFXZHKEz8Nitim-Xewg,16300
|
|
172
177
|
xp/services/server/xp130_server_service.py,sha256=YnvetDp72-QzkyDGB4qfZZIwFs03HuibUOz2zb9XR0c,2191
|
|
173
178
|
xp/services/server/xp20_server_service.py,sha256=1wJ7A-bRkN9O5Spu3q3LNDW31mNtNF2eNMQ5E6O2ltA,2928
|
|
174
179
|
xp/services/server/xp230_server_service.py,sha256=k9ftCY5tjLFP31mKVCspq283RVaPkGx-Yq61Urk8JLs,1815
|
|
@@ -185,7 +190,7 @@ xp/services/telegram/telegram_service.py,sha256=XrP1CPi0ckxoKBaNwLA6lo-TogWxXgmX
|
|
|
185
190
|
xp/services/telegram/telegram_version_service.py,sha256=M5HdOTsLdcwo122FP-jW6R740ktLrtKf2TiMDVz23h8,10528
|
|
186
191
|
xp/services/term/__init__.py,sha256=BIeOK042bMR-0l6MA80wdW5VuHlpWOXtRER9IG5ilQA,245
|
|
187
192
|
xp/services/term/protocol_monitor_service.py,sha256=PhEzLNzWf1XieQw94ua-hJu9ccwrAzhdxSZGe4kHghs,9945
|
|
188
|
-
xp/services/term/state_monitor_service.py,sha256=
|
|
193
|
+
xp/services/term/state_monitor_service.py,sha256=p6h5cv_3mjij4okp73chR7Z-kGVgHwMdEq8aW0JqIDE,16959
|
|
189
194
|
xp/term/__init__.py,sha256=Xg2DhBeI3xQJLfc7_BPWI1por-rUXemyer5OtOt9Cus,51
|
|
190
195
|
xp/term/protocol.py,sha256=oLJAExvIaOSpy75A5TaYB_7R9skTTtNtPx8hiJLdy_U,3425
|
|
191
196
|
xp/term/protocol.tcss,sha256=r_KfxrbpycGHLVXqZc6INBBcUJME0hLrAZkF1oqnab4,2126
|
|
@@ -198,10 +203,10 @@ xp/term/widgets/protocol_log.py,sha256=CJUpckWj7GC1kVqixDadteyGnI4aHyzd4kkH-pSbz
|
|
|
198
203
|
xp/term/widgets/status_footer.py,sha256=bxrcqKzJ9V0aPSn_WwraVpJz7NxBUh3yIjA3fwv5nVA,3256
|
|
199
204
|
xp/utils/__init__.py,sha256=_avMF_UOkfR3tNeDIPqQ5odmbq5raKkaq1rZ9Cn1CJs,332
|
|
200
205
|
xp/utils/checksum.py,sha256=HDpiQxmdIedbCbZ4o_Box0i_Zig417BtCV_46ZyhiTk,1711
|
|
201
|
-
xp/utils/dependencies.py,sha256=
|
|
206
|
+
xp/utils/dependencies.py,sha256=Z1vRSWr_dhmyNhD4dstJg-ZOlKVPPq_viGGNJ32GRNs,24584
|
|
202
207
|
xp/utils/event_helper.py,sha256=W-A_xmoXlpWZBbJH6qdaN50o3-XrwFsDgvAGMJDiAgo,1001
|
|
203
208
|
xp/utils/logging.py,sha256=rZDXwlBrYK8A6MPq5StsMNpgsRowzJXM6fvROPwJdGM,3750
|
|
204
209
|
xp/utils/serialization.py,sha256=RWHHk86feaB4ZP7rjE4qOWK0900yg2joUBDkP76gfOY,4618
|
|
205
210
|
xp/utils/state_machine.py,sha256=Oe2sLwCh9z_vr1tF6X0ZRGTeuckRQAGzmef7xc9CNdc,2413
|
|
206
211
|
xp/utils/time_utils.py,sha256=dEyViDlAG9GWU-J3D_YVa-sGma6yiyyMTgN4h2x3PY4,3781
|
|
207
|
-
conson_xp-1.
|
|
212
|
+
conson_xp-1.38.0.dist-info/RECORD,,
|
xp/__init__.py
CHANGED
xp/cli/commands/__init__.py
CHANGED
|
@@ -8,6 +8,7 @@ from xp.cli.commands.conbus.conbus import (
|
|
|
8
8
|
conbus_autoreport,
|
|
9
9
|
conbus_blink,
|
|
10
10
|
conbus_datapoint,
|
|
11
|
+
conbus_export,
|
|
11
12
|
conbus_lightlevel,
|
|
12
13
|
conbus_linknumber,
|
|
13
14
|
conbus_modulenumber,
|
|
@@ -101,6 +102,7 @@ __all__ = [
|
|
|
101
102
|
"conbus_msactiontable",
|
|
102
103
|
"conbus_actiontable",
|
|
103
104
|
"conbus_event",
|
|
105
|
+
"conbus_export",
|
|
104
106
|
"file",
|
|
105
107
|
"module",
|
|
106
108
|
"reverse_proxy",
|
|
@@ -6,6 +6,7 @@ from xp.cli.commands.conbus.conbus import (
|
|
|
6
6
|
conbus_autoreport,
|
|
7
7
|
conbus_blink,
|
|
8
8
|
conbus_datapoint,
|
|
9
|
+
conbus_export,
|
|
9
10
|
conbus_lightlevel,
|
|
10
11
|
conbus_linknumber,
|
|
11
12
|
conbus_msactiontable,
|
|
@@ -22,4 +23,5 @@ __all__ = [
|
|
|
22
23
|
"conbus_lightlevel",
|
|
23
24
|
"conbus_msactiontable",
|
|
24
25
|
"conbus_actiontable",
|
|
26
|
+
"conbus_export",
|
|
25
27
|
]
|
xp/cli/commands/conbus/conbus.py
CHANGED
|
@@ -117,6 +117,30 @@ def conbus_actiontable() -> None:
|
|
|
117
117
|
pass
|
|
118
118
|
|
|
119
119
|
|
|
120
|
+
@click.group(
|
|
121
|
+
"event",
|
|
122
|
+
cls=HelpColorsGroup,
|
|
123
|
+
help_headers_color="yellow",
|
|
124
|
+
help_options_color="green",
|
|
125
|
+
short_help="Export operations",
|
|
126
|
+
)
|
|
127
|
+
def conbus_event() -> None:
|
|
128
|
+
"""Event telegrams to Conbus modules."""
|
|
129
|
+
pass
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@click.group(
|
|
133
|
+
"export",
|
|
134
|
+
cls=HelpColorsGroup,
|
|
135
|
+
help_headers_color="yellow",
|
|
136
|
+
help_options_color="green",
|
|
137
|
+
short_help="Export operations",
|
|
138
|
+
)
|
|
139
|
+
def conbus_export() -> None:
|
|
140
|
+
"""Download ActionTable from Conbus modules."""
|
|
141
|
+
pass
|
|
142
|
+
|
|
143
|
+
|
|
120
144
|
conbus.add_command(conbus_blink)
|
|
121
145
|
conbus.add_command(conbus_output)
|
|
122
146
|
conbus.add_command(conbus_datapoint)
|
|
@@ -126,3 +150,5 @@ conbus.add_command(conbus_autoreport)
|
|
|
126
150
|
conbus.add_command(conbus_lightlevel)
|
|
127
151
|
conbus.add_command(conbus_msactiontable)
|
|
128
152
|
conbus.add_command(conbus_actiontable)
|
|
153
|
+
conbus.add_command(conbus_event)
|
|
154
|
+
conbus.add_command(conbus_export)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import json
|
|
4
4
|
from contextlib import suppress
|
|
5
5
|
from pathlib import Path
|
|
6
|
+
from typing import Any, Dict
|
|
6
7
|
|
|
7
8
|
import click
|
|
8
9
|
from click import Context
|
|
@@ -12,12 +13,13 @@ from xp.cli.utils.decorators import (
|
|
|
12
13
|
connection_command,
|
|
13
14
|
)
|
|
14
15
|
from xp.cli.utils.serial_number_type import SERIAL
|
|
15
|
-
from xp.models.
|
|
16
|
+
from xp.models.actiontable.actiontable import ActionTable
|
|
17
|
+
from xp.models.config.conson_module_config import (
|
|
16
18
|
ConsonModuleConfig,
|
|
17
19
|
ConsonModuleListConfig,
|
|
18
20
|
)
|
|
19
21
|
from xp.services.conbus.actiontable.actiontable_download_service import (
|
|
20
|
-
|
|
22
|
+
ActionTableDownloadService,
|
|
21
23
|
)
|
|
22
24
|
from xp.services.conbus.actiontable.actiontable_list_service import (
|
|
23
25
|
ActionTableListService,
|
|
@@ -47,8 +49,8 @@ def conbus_download_actiontable(ctx: Context, serial_number: str) -> None:
|
|
|
47
49
|
ctx: Click context object.
|
|
48
50
|
serial_number: 10-digit module serial number.
|
|
49
51
|
"""
|
|
50
|
-
service:
|
|
51
|
-
ctx.obj.get("container").get_container().resolve(
|
|
52
|
+
service: ActionTableDownloadService = (
|
|
53
|
+
ctx.obj.get("container").get_container().resolve(ActionTableDownloadService)
|
|
52
54
|
)
|
|
53
55
|
|
|
54
56
|
def on_progress(progress: str) -> None:
|
|
@@ -57,15 +59,20 @@ def conbus_download_actiontable(ctx: Context, serial_number: str) -> None:
|
|
|
57
59
|
Args:
|
|
58
60
|
progress: Progress message string.
|
|
59
61
|
"""
|
|
60
|
-
click.echo(progress)
|
|
62
|
+
click.echo(progress, nl=False)
|
|
61
63
|
|
|
62
|
-
def on_finish(
|
|
64
|
+
def on_finish(
|
|
65
|
+
_actiontable: ActionTable,
|
|
66
|
+
actiontable_dict: Dict[str, Any],
|
|
67
|
+
actiontable_short: list[str],
|
|
68
|
+
) -> None:
|
|
63
69
|
"""Handle successful completion of action table download.
|
|
64
70
|
|
|
65
71
|
Args:
|
|
66
|
-
|
|
72
|
+
_actiontable: a list of ActionTableEntries.
|
|
73
|
+
actiontable_dict: action table in a dictionary.
|
|
74
|
+
actiontable_short: short representation of action table.
|
|
67
75
|
"""
|
|
68
|
-
_actiontable, actiontable_dict, actiontable_short = result
|
|
69
76
|
output = {
|
|
70
77
|
"serial_number": serial_number,
|
|
71
78
|
"actiontable_short": actiontable_short,
|
|
@@ -214,7 +221,9 @@ def conbus_show_actiontable(ctx: Context, serial_number: str) -> None:
|
|
|
214
221
|
Args:
|
|
215
222
|
module: Dictionary containing module configuration.
|
|
216
223
|
"""
|
|
217
|
-
|
|
224
|
+
module_data = module.model_dump()
|
|
225
|
+
module_data.pop("msactiontable", None)
|
|
226
|
+
click.echo(json.dumps(module_data, indent=2, default=str))
|
|
218
227
|
|
|
219
228
|
def error_callback(error: str) -> None:
|
|
220
229
|
"""Handle errors during action table show.
|
|
@@ -57,8 +57,11 @@ def get_autoreport_command(ctx: Context, serial_number: str) -> None:
|
|
|
57
57
|
with service:
|
|
58
58
|
service.on_finish.connect(on_finish)
|
|
59
59
|
service.query_datapoint(
|
|
60
|
-
serial_number=serial_number,
|
|
60
|
+
serial_number=serial_number,
|
|
61
|
+
datapoint_type=DataPointType.AUTO_REPORT_STATUS,
|
|
62
|
+
timeout_seconds=1.0,
|
|
61
63
|
)
|
|
64
|
+
service.start_reactor()
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
@conbus_autoreport.command("set", short_help="Set auto report status for a module")
|
|
@@ -104,6 +107,6 @@ def set_autoreport_command(ctx: Context, serial_number: str, status: str) -> Non
|
|
|
104
107
|
serial_number=serial_number,
|
|
105
108
|
datapoint_type=DataPointType.AUTO_REPORT_STATUS,
|
|
106
109
|
data_value=data_value,
|
|
107
|
-
timeout_seconds=0
|
|
110
|
+
timeout_seconds=1.0,
|
|
108
111
|
)
|
|
109
112
|
service.start_reactor()
|
|
@@ -4,7 +4,7 @@ import json
|
|
|
4
4
|
|
|
5
5
|
import click
|
|
6
6
|
|
|
7
|
-
from xp.cli.commands.conbus.conbus import conbus
|
|
7
|
+
from xp.cli.commands.conbus.conbus import conbus, conbus_event
|
|
8
8
|
from xp.cli.utils.decorators import connection_command
|
|
9
9
|
from xp.cli.utils.module_type_choice import MODULE_TYPE
|
|
10
10
|
from xp.models import ConbusEventRawResponse
|
|
@@ -12,12 +12,6 @@ from xp.services.conbus.conbus_event_list_service import ConbusEventListService
|
|
|
12
12
|
from xp.services.conbus.conbus_event_raw_service import ConbusEventRawService
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@click.group(name="event")
|
|
16
|
-
def conbus_event() -> None:
|
|
17
|
-
"""Send event telegrams to Conbus modules."""
|
|
18
|
-
pass
|
|
19
|
-
|
|
20
|
-
|
|
21
15
|
@conbus_event.command("list")
|
|
22
16
|
@click.pass_context
|
|
23
17
|
def list_events(ctx: click.Context) -> None:
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"""Conbus export CLI
|
|
1
|
+
"""Conbus export CLI commands."""
|
|
2
2
|
|
|
3
3
|
from contextlib import suppress
|
|
4
4
|
|
|
5
5
|
import click
|
|
6
6
|
|
|
7
|
-
from xp.cli.commands.conbus.conbus import
|
|
7
|
+
from xp.cli.commands.conbus.conbus import conbus_export
|
|
8
8
|
from xp.cli.utils.decorators import connection_command
|
|
9
9
|
from xp.models.conbus.conbus_export import ConbusExportResponse
|
|
10
|
-
from xp.models.
|
|
10
|
+
from xp.models.config.conson_module_config import ConsonModuleConfig
|
|
11
11
|
from xp.services.conbus.conbus_export_service import ConbusExportService
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@
|
|
14
|
+
@conbus_export.command("config")
|
|
15
15
|
@click.pass_context
|
|
16
16
|
@connection_command()
|
|
17
17
|
def export_conbus_config(ctx: click.Context) -> None:
|
|
18
|
-
r"""Export Conbus device
|
|
18
|
+
r"""Export Conbus device metadata to YAML file.
|
|
19
19
|
|
|
20
20
|
Discovers all devices on the Conbus network and queries their configuration
|
|
21
21
|
datapoints to generate a complete export.yml file in conson.yml format.
|
|
@@ -25,8 +25,9 @@ def export_conbus_config(ctx: click.Context) -> None:
|
|
|
25
25
|
|
|
26
26
|
Examples:
|
|
27
27
|
\b
|
|
28
|
-
# Export to export.yml
|
|
28
|
+
# Export device metadata to export.yml
|
|
29
29
|
xp conbus export
|
|
30
|
+
xp conbus export config
|
|
30
31
|
"""
|
|
31
32
|
|
|
32
33
|
def on_progress(serial_number: str, current: int, total: int) -> None:
|
|
@@ -200,6 +200,7 @@ def xp_lightlevel_get(
|
|
|
200
200
|
result["output_number"] = output_number
|
|
201
201
|
result["lightlevel_level"] = lightlevel_level
|
|
202
202
|
click.echo(json.dumps(result, indent=2))
|
|
203
|
+
service.stop_reactor()
|
|
203
204
|
|
|
204
205
|
with service:
|
|
205
206
|
service.on_finish.connect(on_finish)
|
|
@@ -208,3 +209,4 @@ def xp_lightlevel_get(
|
|
|
208
209
|
datapoint_type=DataPointType.MODULE_LIGHT_LEVEL,
|
|
209
210
|
timeout_seconds=0.5,
|
|
210
211
|
)
|
|
212
|
+
service.start_reactor()
|
|
@@ -93,6 +93,7 @@ def get_linknumber_command(ctx: click.Context, serial_number: str) -> None:
|
|
|
93
93
|
result = service_response.to_dict()
|
|
94
94
|
result["linknumber_value"] = linknumber_value
|
|
95
95
|
click.echo(json.dumps(result, indent=2))
|
|
96
|
+
service.stop_reactor()
|
|
96
97
|
|
|
97
98
|
with service:
|
|
98
99
|
service.on_finish.connect(on_finish)
|
|
@@ -101,3 +102,4 @@ def get_linknumber_command(ctx: click.Context, serial_number: str) -> None:
|
|
|
101
102
|
datapoint_type=DataPointType.LINK_NUMBER,
|
|
102
103
|
timeout_seconds=0.5,
|
|
103
104
|
)
|
|
105
|
+
service.start_reactor()
|
|
@@ -95,6 +95,7 @@ def get_modulenumber_command(ctx: click.Context, serial_number: str) -> None:
|
|
|
95
95
|
result = service_response.to_dict()
|
|
96
96
|
result["modulenumber_value"] = modulenumber_value
|
|
97
97
|
click.echo(json.dumps(result, indent=2))
|
|
98
|
+
service.stop_reactor()
|
|
98
99
|
|
|
99
100
|
with service:
|
|
100
101
|
service.on_finish.connect(on_finish)
|
|
@@ -103,3 +104,4 @@ def get_modulenumber_command(ctx: click.Context, serial_number: str) -> None:
|
|
|
103
104
|
datapoint_type=DataPointType.MODULE_NUMBER,
|
|
104
105
|
timeout_seconds=0.5,
|
|
105
106
|
)
|
|
107
|
+
service.start_reactor()
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""XP24 Action Table CLI commands."""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
-
from dataclasses import asdict
|
|
5
4
|
from typing import Union
|
|
6
5
|
|
|
7
6
|
import click
|
|
@@ -16,8 +15,15 @@ from xp.cli.utils.xp_module_type import XP_MODULE_TYPE
|
|
|
16
15
|
from xp.models.actiontable.msactiontable_xp20 import Xp20MsActionTable
|
|
17
16
|
from xp.models.actiontable.msactiontable_xp24 import Xp24MsActionTable
|
|
18
17
|
from xp.models.actiontable.msactiontable_xp33 import Xp33MsActionTable
|
|
19
|
-
from xp.
|
|
20
|
-
|
|
18
|
+
from xp.models.config.conson_module_config import ConsonModuleConfig
|
|
19
|
+
from xp.services.conbus.msactiontable.msactiontable_download_service import (
|
|
20
|
+
MsActionTableDownloadService,
|
|
21
|
+
)
|
|
22
|
+
from xp.services.conbus.msactiontable.msactiontable_list_service import (
|
|
23
|
+
MsActionTableListService,
|
|
24
|
+
)
|
|
25
|
+
from xp.services.conbus.msactiontable.msactiontable_show_service import (
|
|
26
|
+
MsActionTableShowService,
|
|
21
27
|
)
|
|
22
28
|
|
|
23
29
|
|
|
@@ -36,8 +42,8 @@ def conbus_download_msactiontable(
|
|
|
36
42
|
serial_number: 10-digit module serial number.
|
|
37
43
|
xpmoduletype: XP module type.
|
|
38
44
|
"""
|
|
39
|
-
service:
|
|
40
|
-
ctx.obj.get("container").get_container().resolve(
|
|
45
|
+
service: MsActionTableDownloadService = (
|
|
46
|
+
ctx.obj.get("container").get_container().resolve(MsActionTableDownloadService)
|
|
41
47
|
)
|
|
42
48
|
|
|
43
49
|
def on_progress(progress: str) -> None:
|
|
@@ -49,27 +55,30 @@ def conbus_download_msactiontable(
|
|
|
49
55
|
click.echo(progress, nl=False)
|
|
50
56
|
|
|
51
57
|
def on_finish(
|
|
52
|
-
|
|
58
|
+
msaction_table: Union[
|
|
53
59
|
Xp20MsActionTable, Xp24MsActionTable, Xp33MsActionTable, None
|
|
54
60
|
],
|
|
61
|
+
msaction_table_short: str,
|
|
55
62
|
) -> None:
|
|
56
63
|
"""Handle successful completion of MS action table download.
|
|
57
64
|
|
|
58
65
|
Args:
|
|
59
|
-
|
|
66
|
+
msaction_table: Downloaded MS action table object or None if failed.
|
|
67
|
+
msaction_table_short: Short version of MS action table object or None if failed.
|
|
60
68
|
|
|
61
69
|
Raises:
|
|
62
70
|
Abort: If action table download failed.
|
|
63
71
|
"""
|
|
64
72
|
service.stop_reactor()
|
|
65
|
-
if
|
|
73
|
+
if msaction_table is None:
|
|
66
74
|
click.echo("Error: Failed to download MS action table")
|
|
67
75
|
raise click.Abort()
|
|
68
76
|
|
|
69
77
|
output = {
|
|
70
78
|
"serial_number": serial_number,
|
|
71
79
|
"xpmoduletype": xpmoduletype,
|
|
72
|
-
"
|
|
80
|
+
"msaction_table_short": msaction_table_short,
|
|
81
|
+
"msaction_table": msaction_table.model_dump(),
|
|
73
82
|
}
|
|
74
83
|
click.echo(json.dumps(output, indent=2, default=str))
|
|
75
84
|
|
|
@@ -90,3 +99,77 @@ def conbus_download_msactiontable(
|
|
|
90
99
|
xpmoduletype=xpmoduletype,
|
|
91
100
|
)
|
|
92
101
|
service.start_reactor()
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@conbus_msactiontable.command("list", short_help="List modules with MsActionTable")
|
|
105
|
+
@click.pass_context
|
|
106
|
+
def conbus_list_msactiontable(ctx: Context) -> None:
|
|
107
|
+
"""List all modules with action table configurations from conson.yml.
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
ctx: Click context object.
|
|
111
|
+
"""
|
|
112
|
+
service: MsActionTableListService = (
|
|
113
|
+
ctx.obj.get("container").get_container().resolve(MsActionTableListService)
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
def on_finish(module_list: dict) -> None:
|
|
117
|
+
"""Handle successful completion of action table list.
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
module_list: Dictionary containing modules and total count.
|
|
121
|
+
"""
|
|
122
|
+
click.echo(json.dumps(module_list, indent=2, default=str))
|
|
123
|
+
|
|
124
|
+
def on_error(error: str) -> None:
|
|
125
|
+
"""Handle errors during action table list.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
error: Error message string.
|
|
129
|
+
"""
|
|
130
|
+
click.echo(error)
|
|
131
|
+
|
|
132
|
+
with service:
|
|
133
|
+
service.on_finish.connect(on_finish)
|
|
134
|
+
service.on_error.connect(on_error)
|
|
135
|
+
service.start()
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
@conbus_msactiontable.command("show", short_help="Show MsActionTable configuration")
|
|
139
|
+
@click.argument("serial_number", type=SERIAL)
|
|
140
|
+
@click.pass_context
|
|
141
|
+
def conbus_show_msactiontable(ctx: Context, serial_number: str) -> None:
|
|
142
|
+
"""Show ms action table configuration for a specific module from conson.yml.
|
|
143
|
+
|
|
144
|
+
Args:
|
|
145
|
+
ctx: Click context object.
|
|
146
|
+
serial_number: 10-digit module serial number.
|
|
147
|
+
"""
|
|
148
|
+
service: MsActionTableShowService = (
|
|
149
|
+
ctx.obj.get("container").get_container().resolve(MsActionTableShowService)
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
def on_finish(module: ConsonModuleConfig) -> None:
|
|
153
|
+
"""Handle successful completion of action table show.
|
|
154
|
+
|
|
155
|
+
Args:
|
|
156
|
+
module: Dictionary containing module configuration.
|
|
157
|
+
"""
|
|
158
|
+
module_data = module.model_dump()
|
|
159
|
+
module_data.pop("action_table", None)
|
|
160
|
+
click.echo(json.dumps(module_data, indent=2, default=str))
|
|
161
|
+
|
|
162
|
+
def error_callback(error: str) -> None:
|
|
163
|
+
"""Handle errors during action table show.
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
error: Error message string.
|
|
167
|
+
"""
|
|
168
|
+
click.echo(error)
|
|
169
|
+
|
|
170
|
+
with service:
|
|
171
|
+
service.start(
|
|
172
|
+
serial_number=serial_number,
|
|
173
|
+
finish_callback=on_finish,
|
|
174
|
+
error_callback=error_callback,
|
|
175
|
+
)
|