conson-xp 1.8.0__tar.gz → 1.14.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. {conson_xp-1.8.0 → conson_xp-1.14.0}/PKG-INFO +9 -1
  2. {conson_xp-1.8.0 → conson_xp-1.14.0}/README.md +8 -0
  3. {conson_xp-1.8.0 → conson_xp-1.14.0}/pyproject.toml +1 -1
  4. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/__init__.py +1 -1
  5. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/__init__.py +8 -0
  6. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus.py +13 -0
  7. conson_xp-1.14.0/src/xp/cli/commands/conbus/conbus_actiontable_commands.py +233 -0
  8. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_linknumber_commands.py +1 -1
  9. conson_xp-1.14.0/src/xp/cli/commands/conbus/conbus_modulenumber_commands.py +104 -0
  10. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/actiontable/actiontable.py +1 -1
  11. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/actiontable/msactiontable_xp24.py +1 -1
  12. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/homekit/homekit_conson_config.py +18 -0
  13. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/input_action_type.py +4 -4
  14. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/system_function.py +49 -19
  15. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/actiontable/actiontable_serializer.py +114 -10
  16. conson_xp-1.8.0/src/xp/services/conbus/actiontable/actiontable_service.py → conson_xp-1.14.0/src/xp/services/conbus/actiontable/actiontable_download_service.py +13 -8
  17. conson_xp-1.14.0/src/xp/services/conbus/actiontable/actiontable_list_service.py +91 -0
  18. conson_xp-1.14.0/src/xp/services/conbus/actiontable/actiontable_show_service.py +89 -0
  19. conson_xp-1.14.0/src/xp/services/conbus/actiontable/actiontable_upload_service.py +211 -0
  20. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/write_config_service.py +1 -0
  21. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_datapoint_service.py +12 -0
  22. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/utils/dependencies.py +38 -1
  23. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_actiontable_integration.py +18 -13
  24. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_xp24_action_table_integration.py +2 -2
  25. conson_xp-1.14.0/tests/unit/test_cli/test_conbus_actiontable_commands.py +643 -0
  26. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_xp24_action_table.py +7 -7
  27. conson_xp-1.14.0/tests/unit/test_services/test_actiontable_serializer.py +411 -0
  28. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_actiontable_service.py +17 -5
  29. conson_xp-1.14.0/tests/unit/test_services/test_actiontable_upload_service.py +591 -0
  30. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_xp24_action_table_serializer.py +2 -2
  31. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_xp24_action_table_service.py +1 -1
  32. conson_xp-1.8.0/src/xp/cli/commands/conbus/conbus_actiontable_commands.py +0 -69
  33. conson_xp-1.8.0/tests/unit/test_cli/test_conbus_actiontable_commands.py +0 -229
  34. {conson_xp-1.8.0 → conson_xp-1.14.0}/LICENSE +0 -0
  35. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/__init__.py +0 -0
  36. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/__main__.py +0 -0
  37. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/__init__.py +0 -0
  38. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_autoreport_commands.py +0 -0
  39. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_blink_commands.py +0 -0
  40. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_config_commands.py +0 -0
  41. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_custom_commands.py +0 -0
  42. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_datapoint_commands.py +0 -0
  43. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_discover_commands.py +0 -0
  44. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_lightlevel_commands.py +0 -0
  45. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_msactiontable_commands.py +0 -0
  46. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_output_commands.py +0 -0
  47. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_raw_commands.py +0 -0
  48. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_receive_commands.py +0 -0
  49. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/conbus/conbus_scan_commands.py +0 -0
  50. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/file_commands.py +0 -0
  51. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/homekit/__init__.py +0 -0
  52. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/homekit/homekit.py +0 -0
  53. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/homekit/homekit_start_commands.py +0 -0
  54. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/module_commands.py +0 -0
  55. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/reverse_proxy_commands.py +0 -0
  56. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/server/__init__.py +0 -0
  57. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/server/server_commands.py +0 -0
  58. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/__init__.py +0 -0
  59. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram.py +0 -0
  60. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram_blink_commands.py +0 -0
  61. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram_checksum_commands.py +0 -0
  62. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram_discover_commands.py +0 -0
  63. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram_linknumber_commands.py +0 -0
  64. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram_parse_commands.py +0 -0
  65. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/commands/telegram/telegram_version_commands.py +0 -0
  66. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/main.py +0 -0
  67. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/__init__.py +0 -0
  68. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/click_tree.py +0 -0
  69. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/datapoint_type_choice.py +0 -0
  70. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/decorators.py +0 -0
  71. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/error_handlers.py +0 -0
  72. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/formatters.py +0 -0
  73. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/serial_number_type.py +0 -0
  74. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/system_function_choice.py +0 -0
  75. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/cli/utils/xp_module_type.py +0 -0
  76. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/connection/__init__.py +0 -0
  77. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/connection/exceptions.py +0 -0
  78. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/__init__.py +0 -0
  79. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/actiontable/__init__.py +0 -0
  80. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/actiontable/msactiontable_xp20.py +0 -0
  81. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/actiontable/msactiontable_xp33.py +0 -0
  82. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/__init__.py +0 -0
  83. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus.py +0 -0
  84. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_autoreport.py +0 -0
  85. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_blink.py +0 -0
  86. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_client_config.py +0 -0
  87. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_connection_status.py +0 -0
  88. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_custom.py +0 -0
  89. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_datapoint.py +0 -0
  90. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_discover.py +0 -0
  91. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_lightlevel.py +0 -0
  92. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_linknumber.py +0 -0
  93. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_output.py +0 -0
  94. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_raw.py +0 -0
  95. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_receive.py +0 -0
  96. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/conbus/conbus_writeconfig.py +0 -0
  97. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/homekit/__init__.py +0 -0
  98. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/homekit/homekit_accessory.py +0 -0
  99. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/homekit/homekit_config.py +0 -0
  100. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/log_entry.py +0 -0
  101. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/protocol/__init__.py +0 -0
  102. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/protocol/conbus_protocol.py +0 -0
  103. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/response.py +0 -0
  104. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/__init__.py +0 -0
  105. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/action_type.py +0 -0
  106. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/datapoint_type.py +0 -0
  107. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/event_telegram.py +0 -0
  108. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/event_type.py +0 -0
  109. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/input_type.py +0 -0
  110. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/module_type.py +0 -0
  111. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/module_type_code.py +0 -0
  112. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/output_telegram.py +0 -0
  113. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/reply_telegram.py +0 -0
  114. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/system_telegram.py +0 -0
  115. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/telegram.py +0 -0
  116. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/telegram_type.py +0 -0
  117. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/telegram/timeparam_type.py +0 -0
  118. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/models/write_config_type.py +0 -0
  119. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/__init__.py +0 -0
  120. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/actiontable/__init__.py +0 -0
  121. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/actiontable/msactiontable_serializer.py +0 -0
  122. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/actiontable/msactiontable_xp20_serializer.py +0 -0
  123. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/actiontable/msactiontable_xp24_serializer.py +0 -0
  124. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/actiontable/msactiontable_xp33_serializer.py +0 -0
  125. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/__init__.py +0 -0
  126. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/actiontable/__init__.py +0 -0
  127. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/actiontable/msactiontable_service.py +0 -0
  128. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_blink_all_service.py +0 -0
  129. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_blink_service.py +0 -0
  130. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_custom_service.py +0 -0
  131. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_datapoint_queryall_service.py +0 -0
  132. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_datapoint_service.py +0 -0
  133. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_discover_service.py +0 -0
  134. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_output_service.py +0 -0
  135. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_raw_service.py +0 -0
  136. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_receive_service.py +0 -0
  137. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/conbus/conbus_scan_service.py +0 -0
  138. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/__init__.py +0 -0
  139. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_cache_service.py +0 -0
  140. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_conbus_service.py +0 -0
  141. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_config_validator.py +0 -0
  142. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_conson_validator.py +0 -0
  143. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_dimminglight.py +0 -0
  144. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_dimminglight_service.py +0 -0
  145. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_hap_service.py +0 -0
  146. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_lightbulb.py +0 -0
  147. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_lightbulb_service.py +0 -0
  148. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_module_service.py +0 -0
  149. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_outlet.py +0 -0
  150. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_outlet_service.py +0 -0
  151. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/homekit/homekit_service.py +0 -0
  152. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/log_file_service.py +0 -0
  153. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/module_type_service.py +0 -0
  154. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/protocol/__init__.py +0 -0
  155. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/protocol/conbus_protocol.py +0 -0
  156. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/protocol/protocol_factory.py +0 -0
  157. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/protocol/telegram_protocol.py +0 -0
  158. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/reverse_proxy_service.py +0 -0
  159. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/__init__.py +0 -0
  160. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/base_server_service.py +0 -0
  161. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/cp20_server_service.py +0 -0
  162. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/device_service_factory.py +0 -0
  163. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/server_service.py +0 -0
  164. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/xp130_server_service.py +0 -0
  165. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/xp20_server_service.py +0 -0
  166. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/xp230_server_service.py +0 -0
  167. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/xp24_server_service.py +0 -0
  168. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/server/xp33_server_service.py +0 -0
  169. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/__init__.py +0 -0
  170. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_blink_service.py +0 -0
  171. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_checksum_service.py +0 -0
  172. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_discover_service.py +0 -0
  173. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_link_number_service.py +0 -0
  174. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_output_service.py +0 -0
  175. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_service.py +0 -0
  176. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/services/telegram/telegram_version_service.py +0 -0
  177. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/utils/__init__.py +0 -0
  178. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/utils/checksum.py +0 -0
  179. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/utils/event_helper.py +0 -0
  180. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/utils/serialization.py +0 -0
  181. {conson_xp-1.8.0 → conson_xp-1.14.0}/src/xp/utils/time_utils.py +0 -0
  182. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/.coverage +0 -0
  183. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/__init__.py +0 -0
  184. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/conftest.py +0 -0
  185. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/.coverage +0 -0
  186. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/__init__.py +0 -0
  187. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/telegram_test_data.py +0 -0
  188. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_api/.coverage +0 -0
  189. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_api/__init__.py +0 -0
  190. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_blink_integration.py +0 -0
  191. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_checksum_integration.py +0 -0
  192. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_conbus_blink_integration.py +0 -0
  193. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_conbus_datapoint_integration.py +0 -0
  194. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_conbus_raw_integration.py +0 -0
  195. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_conbus_receive_integration.py +0 -0
  196. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_discovery_integration.py +0 -0
  197. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_event_telegram_integration.py +0 -0
  198. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_homekit_config_integration.py +0 -0
  199. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_link_number_integration.py +0 -0
  200. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_module_integration.py +0 -0
  201. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_output_integration.py +0 -0
  202. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_reverse_proxy_integration.py +0 -0
  203. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_system_reply_telegram_integration.py +0 -0
  204. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_version_integration.py +0 -0
  205. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/integration/test_xp20_action_table_integration.py +0 -0
  206. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/__init__.py +0 -0
  207. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_api/__init__.py +0 -0
  208. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/__init__.py +0 -0
  209. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_click_tree.py +0 -0
  210. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_conbus_blink_commands.py +0 -0
  211. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_datapoint_type_choice.py +0 -0
  212. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_decorators.py +0 -0
  213. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_error_handlers.py +0 -0
  214. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_formatters.py +0 -0
  215. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_serial_number_type.py +0 -0
  216. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_cli/test_system_function_choice.py +0 -0
  217. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_connection/__init__.py +0 -0
  218. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_connection/test_connection_init.py +0 -0
  219. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_connection/test_exceptions.py +0 -0
  220. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_encoding/__init__.py +0 -0
  221. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_encoding/test_latin1_edge_cases.py +0 -0
  222. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/__init__.py +0 -0
  223. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_conbus.py +0 -0
  224. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_conbus_client_send.py +0 -0
  225. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_conbus_discover.py +0 -0
  226. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_conbus_linknumber.py +0 -0
  227. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_event_telegram.py +0 -0
  228. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_log_entry.py +0 -0
  229. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_module_type.py +0 -0
  230. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_reply_telegram.py +0 -0
  231. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_system_telegram.py +0 -0
  232. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_system_telegram_enhancements.py +0 -0
  233. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_version_telegram.py +0 -0
  234. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_write_config_type.py +0 -0
  235. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_xp20_action_table.py +0 -0
  236. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_models/test_xp24_action_telegram.py +0 -0
  237. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/__init__.py +0 -0
  238. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_base_server_service.py +0 -0
  239. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_blink_service.py +0 -0
  240. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_checksum_service.py +0 -0
  241. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_conbus_blink_service.py +0 -0
  242. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_conbus_raw_service.py +0 -0
  243. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_conbus_reverse_proxy_service.py +0 -0
  244. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_device_service_factory.py +0 -0
  245. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_discovery_service.py +0 -0
  246. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_homekit_cache_service.py +0 -0
  247. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_homekit_config_validator.py +0 -0
  248. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_homekit_conson_service.py +0 -0
  249. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_homekit_services.py +0 -0
  250. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_log_file_service.py +0 -0
  251. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_module_type_service.py +0 -0
  252. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_protocol.py +0 -0
  253. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_server_service.py +0 -0
  254. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_telegram_input_service.py +0 -0
  255. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_telegram_protocol.py +0 -0
  256. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_telegram_service.py +0 -0
  257. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_version_service.py +0 -0
  258. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_xp20_action_table_serializer.py +0 -0
  259. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_xp24_action_service.py +0 -0
  260. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_xp33_action_table_serializer.py +0 -0
  261. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_services/test_xp_server_services.py +0 -0
  262. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_utils/__init__.py +0 -0
  263. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_utils/test_checksum.py +0 -0
  264. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_utils/test_event_helper.py +0 -0
  265. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_utils/test_serialization.py +0 -0
  266. {conson_xp-1.8.0 → conson_xp-1.14.0}/tests/unit/test_utils/test_time_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: conson-xp
3
- Version: 1.8.0
3
+ Version: 1.14.0
4
4
  Summary: XP Protocol Communication Tools
5
5
  Author-Email: ldvchosal <ldvchosal@github.com>
6
6
  License: MIT License
@@ -276,6 +276,9 @@ xp conbus
276
276
 
277
277
  xp conbus actiontable
278
278
  xp conbus actiontable download
279
+ xp conbus actiontable list
280
+ xp conbus actiontable show
281
+ xp conbus actiontable upload
279
282
 
280
283
 
281
284
  xp conbus autoreport
@@ -313,6 +316,11 @@ xp conbus linknumber get
313
316
  xp conbus linknumber set
314
317
 
315
318
 
319
+ xp conbus modulenumber
320
+ xp conbus modulenumber get
321
+ xp conbus modulenumber set
322
+
323
+
316
324
  xp conbus msactiontable
317
325
  xp conbus msactiontable download
318
326
 
@@ -225,6 +225,9 @@ xp conbus
225
225
 
226
226
  xp conbus actiontable
227
227
  xp conbus actiontable download
228
+ xp conbus actiontable list
229
+ xp conbus actiontable show
230
+ xp conbus actiontable upload
228
231
 
229
232
 
230
233
  xp conbus autoreport
@@ -262,6 +265,11 @@ xp conbus linknumber get
262
265
  xp conbus linknumber set
263
266
 
264
267
 
268
+ xp conbus modulenumber
269
+ xp conbus modulenumber get
270
+ xp conbus modulenumber set
271
+
272
+
265
273
  xp conbus msactiontable
266
274
  xp conbus msactiontable download
267
275
 
@@ -20,7 +20,7 @@ dependencies = [
20
20
  ]
21
21
  requires-python = ">=3.11"
22
22
  readme = "README.md"
23
- version = "1.8.0"
23
+ version = "1.14.0"
24
24
 
25
25
  [project.license]
26
26
  file = "LICENSE"
@@ -3,7 +3,7 @@
3
3
  conson-xp package.
4
4
  """
5
5
 
6
- __version__ = "1.8.0"
6
+ __version__ = "1.14.0"
7
7
  __manufacturer__ = "salchichon"
8
8
  __model__ = "xp.cli"
9
9
  __serial__ = "2025.09.23.000"
@@ -10,6 +10,7 @@ from xp.cli.commands.conbus.conbus import (
10
10
  conbus_datapoint,
11
11
  conbus_lightlevel,
12
12
  conbus_linknumber,
13
+ conbus_modulenumber,
13
14
  conbus_msactiontable,
14
15
  conbus_output,
15
16
  )
@@ -46,6 +47,10 @@ from xp.cli.commands.conbus.conbus_linknumber_commands import (
46
47
  get_linknumber_command,
47
48
  set_linknumber_command,
48
49
  )
50
+ from xp.cli.commands.conbus.conbus_modulenumber_commands import (
51
+ get_modulenumber_command,
52
+ set_modulenumber_command,
53
+ )
49
54
  from xp.cli.commands.conbus.conbus_msactiontable_commands import (
50
55
  conbus_download_msactiontable,
51
56
  )
@@ -87,6 +92,7 @@ __all__ = [
87
92
  "conbus_output",
88
93
  "conbus_datapoint",
89
94
  "conbus_linknumber",
95
+ "conbus_modulenumber",
90
96
  "conbus_autoreport",
91
97
  "conbus_lightlevel",
92
98
  "conbus_msactiontable",
@@ -123,6 +129,8 @@ __all__ = [
123
129
  "receive_telegrams",
124
130
  "set_linknumber_command",
125
131
  "get_linknumber_command",
132
+ "set_modulenumber_command",
133
+ "get_modulenumber_command",
126
134
  "get_autoreport_command",
127
135
  "set_autoreport_command",
128
136
  "xp_lightlevel_set",
@@ -57,6 +57,18 @@ def conbus_linknumber() -> None:
57
57
  pass
58
58
 
59
59
 
60
+ @click.group(
61
+ "modulenumber",
62
+ cls=HelpColorsGroup,
63
+ help_headers_color="yellow",
64
+ help_options_color="green",
65
+ short_help="Module number operations",
66
+ )
67
+ def conbus_modulenumber() -> None:
68
+ """Set or get the module number for specific modules."""
69
+ pass
70
+
71
+
60
72
  @click.group(
61
73
  "autoreport",
62
74
  cls=HelpColorsGroup,
@@ -109,6 +121,7 @@ conbus.add_command(conbus_blink)
109
121
  conbus.add_command(conbus_output)
110
122
  conbus.add_command(conbus_datapoint)
111
123
  conbus.add_command(conbus_linknumber)
124
+ conbus.add_command(conbus_modulenumber)
112
125
  conbus.add_command(conbus_autoreport)
113
126
  conbus.add_command(conbus_lightlevel)
114
127
  conbus.add_command(conbus_msactiontable)
@@ -0,0 +1,233 @@
1
+ """ActionTable CLI commands."""
2
+
3
+ import json
4
+ from contextlib import suppress
5
+ from pathlib import Path
6
+ from typing import Any
7
+
8
+ import click
9
+ from click import Context
10
+
11
+ from xp.cli.commands.conbus.conbus import conbus_actiontable
12
+ from xp.cli.utils.decorators import (
13
+ connection_command,
14
+ )
15
+ from xp.cli.utils.serial_number_type import SERIAL
16
+ from xp.models.actiontable.actiontable import ActionTable
17
+ from xp.models.homekit.homekit_conson_config import (
18
+ ConsonModuleConfig,
19
+ ConsonModuleListConfig,
20
+ )
21
+ from xp.services.conbus.actiontable.actiontable_download_service import (
22
+ ActionTableService,
23
+ )
24
+ from xp.services.conbus.actiontable.actiontable_list_service import (
25
+ ActionTableListService,
26
+ )
27
+ from xp.services.conbus.actiontable.actiontable_show_service import (
28
+ ActionTableShowService,
29
+ )
30
+ from xp.services.conbus.actiontable.actiontable_upload_service import (
31
+ ActionTableUploadService,
32
+ )
33
+
34
+
35
+ class ActionTableError(Exception):
36
+ """Raised when ActionTable operations fail."""
37
+
38
+ pass
39
+
40
+
41
+ @conbus_actiontable.command("download", short_help="Download ActionTable")
42
+ @click.argument("serial_number", type=SERIAL)
43
+ @click.pass_context
44
+ @connection_command()
45
+ def conbus_download_actiontable(ctx: Context, serial_number: str) -> None:
46
+ """Download action table from XP module.
47
+
48
+ Args:
49
+ ctx: Click context object.
50
+ serial_number: 10-digit module serial number.
51
+ """
52
+ service: ActionTableService = (
53
+ ctx.obj.get("container").get_container().resolve(ActionTableService)
54
+ )
55
+
56
+ def progress_callback(progress: str) -> None:
57
+ """Handle progress updates during action table download.
58
+
59
+ Args:
60
+ progress: Progress message string.
61
+ """
62
+ click.echo(progress)
63
+
64
+ def on_finish(
65
+ _actiontable: ActionTable,
66
+ actiontable_dict: dict[str, Any],
67
+ actiontable_short: list[str],
68
+ ) -> None:
69
+ """Handle successful completion of action table download.
70
+
71
+ Args:
72
+ _actiontable: Downloaded action table object.
73
+ actiontable_dict: Dictionary representation of action table.
74
+ actiontable_short: List of textual format strings.
75
+ """
76
+ output = {
77
+ "serial_number": serial_number,
78
+ "actiontable_short": actiontable_short,
79
+ "actiontable": actiontable_dict,
80
+ }
81
+ click.echo(json.dumps(output, indent=2, default=str))
82
+
83
+ def error_callback(error: str) -> None:
84
+ """Handle errors during action table download.
85
+
86
+ Args:
87
+ error: Error message string.
88
+ """
89
+ click.echo(error)
90
+
91
+ with service:
92
+ service.start(
93
+ serial_number=serial_number,
94
+ progress_callback=progress_callback,
95
+ finish_callback=on_finish,
96
+ error_callback=error_callback,
97
+ )
98
+
99
+
100
+ @conbus_actiontable.command("upload", short_help="Upload ActionTable")
101
+ @click.argument("serial_number", type=SERIAL)
102
+ @click.pass_context
103
+ @connection_command()
104
+ def conbus_upload_actiontable(ctx: Context, serial_number: str) -> None:
105
+ """Upload action table from conson.yml to XP module.
106
+
107
+ Args:
108
+ ctx: Click context object.
109
+ serial_number: 10-digit module serial number.
110
+ """
111
+ service: ActionTableUploadService = (
112
+ ctx.obj.get("container").get_container().resolve(ActionTableUploadService)
113
+ )
114
+
115
+ click.echo(f"Uploading action table to {serial_number}...")
116
+
117
+ # Track number of entries for success message
118
+ entries_count = 0
119
+
120
+ def progress_callback(progress: str) -> None:
121
+ """Handle progress updates during action table upload.
122
+
123
+ Args:
124
+ progress: Progress message string.
125
+ """
126
+ click.echo(progress, nl=False)
127
+
128
+ def success_callback() -> None:
129
+ """Handle successful completion of action table upload."""
130
+ click.echo("\nAction table uploaded successfully")
131
+ if entries_count > 0:
132
+ click.echo(f"{entries_count} entries written")
133
+
134
+ def error_callback(error: str) -> None:
135
+ """Handle errors during action table upload.
136
+
137
+ Args:
138
+ error: Error message string.
139
+
140
+ Raises:
141
+ ActionTableError: Always raised with upload failure message.
142
+ """
143
+ raise ActionTableError(f"Upload failed: {error}")
144
+
145
+ with service:
146
+ # Load config to get entry count for success message
147
+ config_path = Path.cwd() / "conson.yml"
148
+ if config_path.exists():
149
+ with suppress(Exception):
150
+ config = ConsonModuleListConfig.from_yaml(str(config_path))
151
+ module = config.find_module(serial_number)
152
+ if module and module.action_table:
153
+ entries_count = len(module.action_table)
154
+
155
+ service.start(
156
+ serial_number=serial_number,
157
+ progress_callback=progress_callback,
158
+ success_callback=success_callback,
159
+ error_callback=error_callback,
160
+ )
161
+
162
+
163
+ @conbus_actiontable.command("list", short_help="List modules with ActionTable")
164
+ @click.pass_context
165
+ def conbus_list_actiontable(ctx: Context) -> None:
166
+ """List all modules with action table configurations from conson.yml.
167
+
168
+ Args:
169
+ ctx: Click context object.
170
+ """
171
+ service: ActionTableListService = (
172
+ ctx.obj.get("container").get_container().resolve(ActionTableListService)
173
+ )
174
+
175
+ def on_finish(module_list: dict) -> None:
176
+ """Handle successful completion of action table list.
177
+
178
+ Args:
179
+ module_list: Dictionary containing modules and total count.
180
+ """
181
+ click.echo(json.dumps(module_list, indent=2, default=str))
182
+
183
+ def error_callback(error: str) -> None:
184
+ """Handle errors during action table list.
185
+
186
+ Args:
187
+ error: Error message string.
188
+ """
189
+ click.echo(error)
190
+
191
+ with service:
192
+ service.start(
193
+ finish_callback=on_finish,
194
+ error_callback=error_callback,
195
+ )
196
+
197
+
198
+ @conbus_actiontable.command("show", short_help="Show ActionTable configuration")
199
+ @click.argument("serial_number", type=SERIAL)
200
+ @click.pass_context
201
+ def conbus_show_actiontable(ctx: Context, serial_number: str) -> None:
202
+ """Show action table configuration for a specific module from conson.yml.
203
+
204
+ Args:
205
+ ctx: Click context object.
206
+ serial_number: 10-digit module serial number.
207
+ """
208
+ service: ActionTableShowService = (
209
+ ctx.obj.get("container").get_container().resolve(ActionTableShowService)
210
+ )
211
+
212
+ def on_finish(module: ConsonModuleConfig) -> None:
213
+ """Handle successful completion of action table show.
214
+
215
+ Args:
216
+ module: Dictionary containing module configuration.
217
+ """
218
+ click.echo(json.dumps(module.model_dump(), indent=2, default=str))
219
+
220
+ def error_callback(error: str) -> None:
221
+ """Handle errors during action table show.
222
+
223
+ Args:
224
+ error: Error message string.
225
+ """
226
+ click.echo(error)
227
+
228
+ with service:
229
+ service.start(
230
+ serial_number=serial_number,
231
+ finish_callback=on_finish,
232
+ error_callback=error_callback,
233
+ )
@@ -49,7 +49,7 @@ def set_linknumber_command(
49
49
  ctx.obj.get("container").get_container().resolve(WriteConfigService)
50
50
  )
51
51
 
52
- data_value = f"{link_number: 02d}"
52
+ data_value = f"{link_number:02d}"
53
53
  with service:
54
54
  service.write_config(
55
55
  serial_number=serial_number,
@@ -0,0 +1,104 @@
1
+ """Conbus module number CLI commands."""
2
+
3
+ import json
4
+
5
+ import click
6
+
7
+ from xp.cli.commands.conbus.conbus import conbus_modulenumber
8
+ from xp.cli.utils.decorators import (
9
+ connection_command,
10
+ )
11
+ from xp.cli.utils.serial_number_type import SERIAL
12
+ from xp.models import ConbusDatapointResponse
13
+ from xp.models.conbus.conbus_writeconfig import ConbusWriteConfigResponse
14
+ from xp.models.telegram.datapoint_type import DataPointType
15
+ from xp.services.conbus.conbus_datapoint_service import ConbusDatapointService
16
+ from xp.services.conbus.write_config_service import WriteConfigService
17
+ from xp.services.telegram.telegram_datapoint_service import TelegramDatapointService
18
+
19
+
20
+ @conbus_modulenumber.command("set", short_help="Set module number for a module")
21
+ @click.argument("serial_number", type=SERIAL)
22
+ @click.argument("module_number", type=click.IntRange(0, 99))
23
+ @click.pass_context
24
+ @connection_command()
25
+ def set_modulenumber_command(
26
+ ctx: click.Context, serial_number: str, module_number: int
27
+ ) -> None:
28
+ r"""Set the module number for a specific module.
29
+
30
+ Args:
31
+ ctx: Click context object.
32
+ serial_number: 10-digit module serial number.
33
+ module_number: Module number to set (0-99).
34
+
35
+ Examples:
36
+ \b
37
+ xp conbus modulenumber set 0123450001 25
38
+ """
39
+
40
+ def on_finish(response: "ConbusWriteConfigResponse") -> None:
41
+ """Handle successful completion of light level on command.
42
+
43
+ Args:
44
+ response: Light level response object.
45
+ """
46
+ click.echo(json.dumps(response.to_dict(), indent=2))
47
+
48
+ service: WriteConfigService = (
49
+ ctx.obj.get("container").get_container().resolve(WriteConfigService)
50
+ )
51
+
52
+ data_value = f"{module_number:02d}"
53
+ with service:
54
+ service.write_config(
55
+ serial_number=serial_number,
56
+ datapoint_type=DataPointType.MODULE_NUMBER,
57
+ data_value=data_value,
58
+ finish_callback=on_finish,
59
+ timeout_seconds=0.5,
60
+ )
61
+
62
+
63
+ @conbus_modulenumber.command("get", short_help="Get module number for a module")
64
+ @click.argument("serial_number", type=SERIAL)
65
+ @click.pass_context
66
+ @connection_command()
67
+ def get_modulenumber_command(ctx: click.Context, serial_number: str) -> None:
68
+ r"""Get the current module number for a specific module.
69
+
70
+ Args:
71
+ ctx: Click context object.
72
+ serial_number: 10-digit module serial number.
73
+
74
+ Examples:
75
+ \b
76
+ xp conbus modulenumber get 0123450001
77
+ """
78
+ service: ConbusDatapointService = (
79
+ ctx.obj.get("container").get_container().resolve(ConbusDatapointService)
80
+ )
81
+ telegram_service: TelegramDatapointService = (
82
+ ctx.obj.get("container").get_container().resolve(TelegramDatapointService)
83
+ )
84
+
85
+ def on_finish(service_response: ConbusDatapointResponse) -> None:
86
+ """Handle successful completion of module number get command.
87
+
88
+ Args:
89
+ service_response: Module number response object.
90
+ """
91
+ modulenumber_value = telegram_service.get_modulenumber(
92
+ service_response.data_value
93
+ )
94
+ result = service_response.to_dict()
95
+ result["modulenumber_value"] = modulenumber_value
96
+ click.echo(json.dumps(result, indent=2))
97
+
98
+ with service:
99
+ service.query_datapoint(
100
+ serial_number=serial_number,
101
+ datapoint_type=DataPointType.MODULE_NUMBER,
102
+ finish_callback=on_finish,
103
+ timeout_seconds=0.5,
104
+ )
@@ -27,7 +27,7 @@ class ActionTableEntry:
27
27
  link_number: int = 0
28
28
  module_input: int = 0
29
29
  module_output: int = 1
30
- command: InputActionType = InputActionType.TURNOFF
30
+ command: InputActionType = InputActionType.OFF
31
31
  parameter: TimeParam = TimeParam.NONE
32
32
  inverted: bool = False
33
33
 
@@ -23,7 +23,7 @@ class InputAction:
23
23
  class Xp24MsActionTable:
24
24
  """XP24 Action Table for managing input actions and settings.
25
25
 
26
- Each input has an action type (TOGGLE, TURNON, LEVELSET, etc.)
26
+ Each input has an action type (TOGGLE, ON, LEVELSET, etc.)
27
27
  with an optional parameter string.
28
28
 
29
29
  Attributes:
@@ -22,6 +22,8 @@ class ConsonModuleConfig(BaseModel):
22
22
  conbus_port: Optional Conbus port number.
23
23
  sw_version: Optional software version.
24
24
  hw_version: Optional hardware version.
25
+ action_table: Optional action table configuration.
26
+ auto_report_status: Optional auto report status.
25
27
  """
26
28
 
27
29
  name: str
@@ -35,6 +37,8 @@ class ConsonModuleConfig(BaseModel):
35
37
  conbus_port: Optional[int] = None
36
38
  sw_version: Optional[str] = None
37
39
  hw_version: Optional[str] = None
40
+ action_table: Optional[List[str]] = None
41
+ auto_report_status: Optional[str] = None
38
42
 
39
43
 
40
44
  class ConsonModuleListConfig(BaseModel):
@@ -66,3 +70,17 @@ class ConsonModuleListConfig(BaseModel):
66
70
  with Path(file_path).open("r") as file:
67
71
  data = yaml.safe_load(file)
68
72
  return cls(root=data)
73
+
74
+ def find_module(self, serial_number: str) -> Optional[ConsonModuleConfig]:
75
+ """Find a module by serial number.
76
+
77
+ Args:
78
+ serial_number: Module serial number to search for.
79
+
80
+ Returns:
81
+ ConsonModuleConfig if found, None otherwise.
82
+ """
83
+ for module in self.root:
84
+ if module.serial_number == serial_number:
85
+ return module
86
+ return None
@@ -8,8 +8,8 @@ class InputActionType(Enum):
8
8
 
9
9
  Attributes:
10
10
  VOID: No action.
11
- TURNON: Turn on action.
12
- TURNOFF: Turn off action.
11
+ ON: Turn on action.
12
+ OFF: Turn off action.
13
13
  TOGGLE: Toggle action.
14
14
  BLOCK: Block action.
15
15
  AUXRELAY: Auxiliary relay action.
@@ -39,8 +39,8 @@ class InputActionType(Enum):
39
39
  """
40
40
 
41
41
  VOID = 0
42
- TURNON = 1
43
- TURNOFF = 2
42
+ ON = 1
43
+ OFF = 2
44
44
  TOGGLE = 3
45
45
  BLOCK = 4
46
46
  AUXRELAY = 5
@@ -15,35 +15,65 @@ class SystemFunction(str, Enum):
15
15
  WRITE_CONFIG: Write configuration.
16
16
  BLINK: Blink LED function.
17
17
  UNBLINK: Unblink LED function.
18
- DOWNLOAD_MSACTIONTABLE: Download module specific action table.
18
+ UPLOAD_FIRMWARE_START: Start upload firmware.
19
+ UPLOAD_FIRMWARE_STOP: Stop upload firmware.
20
+ UPLOAD_FIRMWARE: Upload firmware.
21
+ UPLOAD_ACTIONTABLE: Upload ActionTable to module.
19
22
  DOWNLOAD_ACTIONTABLE: Download ActionTable.
23
+ UPLOAD_MSACTIONTABLE: Upload module specific action table to module.
24
+ DOWNLOAD_MSACTIONTABLE: Download module specific action table.
25
+ TELEGRAM_WRITE_START: Start writing telegram.
26
+ TELEGRAM_READ_START: Start reading telegram.
20
27
  EOF: End of msactiontable response.
28
+ TELEGRAM: Module specific telegram response.
21
29
  MSACTIONTABLE: Module specific action table response.
22
30
  ACTIONTABLE: Module specific action table response.
23
31
  ACK: Acknowledge response.
24
32
  NAK: Not acknowledge response.
33
+ UPLOAD_TOP_FIRMWARE_START: Start upload firmware (TOP).
34
+ UPLOAD_TOP_FIRMWARE_STOP: Stop upload firmware (TOP).
35
+ UPLOAD_TOP_FIRMWARE: Upload firmware (TOP).
36
+ ROTATE_ENABLE: Enable rotate.
37
+ ROTATE_DISABLE: Disable rotate.
25
38
  UNKNOWN_26: Used after discover, unknown purpose.
26
39
  ACTION: Action function.
27
40
  """
28
41
 
29
- NONE = "00" # Undefined
30
- DISCOVERY = "01" # Discover function
31
- READ_DATAPOINT = "02" # Read datapoint
32
- READ_CONFIG = "03" # Read configuration
33
- WRITE_CONFIG = "04" # Write configuration
34
- BLINK = "05" # Blink LED function
35
- UNBLINK = "06" # Unblink LED function
36
- DOWNLOAD_MSACTIONTABLE = (
37
- "13" # Download the module specific action table (MsActionTable)
38
- )
39
- DOWNLOAD_ACTIONTABLE = "11D" # Download ActionTable
40
- EOF = "16" # End of msactiontable response
41
- MSACTIONTABLE = "17" # module specific action table (MsActionTable) response
42
- ACTIONTABLE = "17" # module specific action table (MsActionTable) response
43
- ACK = "18" # Acknowledge response
44
- NAK = "19" # Not acknowledge response
45
- UNKNOWN_26 = "26" # Used after discover, but don't know what it is
46
- ACTION = "27" # Action function
42
+ NONE = "00" # F00D Undefined
43
+ DISCOVERY = "01" # F01D Discover function
44
+ READ_DATAPOINT = "02" # F02D Read datapoint
45
+ READ_CONFIG = "03" # F03D Read configuration
46
+ WRITE_CONFIG = "04" # F04D Write configuration
47
+ BLINK = "05" # F05D Blink LED function
48
+ UNBLINK = "06" # F06D Unblink LED function
49
+
50
+ UPLOAD_FIRMWARE_START = "07" # F07D Start Upload firmware
51
+ UPLOAD_FIRMWARE_STOP = "08" # F08D Stop Upload firmware
52
+ UPLOAD_FIRMWARE = "09" # F09D Upload firmware
53
+
54
+ UPLOAD_ACTIONTABLE = "10" # F10D Upload ActionTable
55
+ DOWNLOAD_ACTIONTABLE = "11" # F11D Download ActionTable
56
+ UPLOAD_MSACTIONTABLE = "12" # F12D Upload MsActionTable to module
57
+ DOWNLOAD_MSACTIONTABLE = "13" # F13D Download MsActionTable
58
+
59
+ TELEGRAM_WRITE_START = "14" # F14D Start writing telegram
60
+ TELEGRAM_READ_START = "15" # F15D Start reading telegram
61
+ EOF = "16" # F16D End of msactiontable response
62
+ TELEGRAM = "17" # F17D module specific Telegram response
63
+ MSACTIONTABLE = "17" # F17D module specific ms action table (Telegram) response
64
+ ACTIONTABLE = "17" # F17D module specific action table (Telegram) response
65
+ ACK = "18" # F18D Acknowledge / continue response
66
+ NAK = "19" # F19D Not acknowledge response
67
+
68
+ UPLOAD_TOP_FIRMWARE_START = "20" # F20D Start Upload firmware (TOP)
69
+ UPLOAD_TOP_FIRMWARE_STOP = "21" # F21D Stop Upload firmware (TOP)
70
+ UPLOAD_TOP_FIRMWARE = "22" # F22D Upload firmware (TOP)
71
+
72
+ ROTATE_ENABLE = "23" # F23D Enable rotate
73
+ ROTATE_DISABLE = "24" # F24D Disable rotate
74
+
75
+ UNKNOWN_26 = "26" # F26D Used after discover, but don't know what it is
76
+ ACTION = "27" # F27D Action function
47
77
 
48
78
  def get_description(self) -> str:
49
79
  """Get the description of the SystemFunction.