conson-xp 1.2.0__tar.gz → 1.3.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 (280) hide show
  1. {conson_xp-1.2.0 → conson_xp-1.3.0}/PKG-INFO +1 -5
  2. {conson_xp-1.2.0 → conson_xp-1.3.0}/README.md +0 -4
  3. {conson_xp-1.2.0 → conson_xp-1.3.0}/pyproject.toml +1 -1
  4. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/__init__.py +1 -1
  5. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/__init__.py +0 -2
  6. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_actiontable_commands.py +5 -3
  7. conson_xp-1.3.0/src/xp/cli/commands/conbus/conbus_autoreport_commands.py +108 -0
  8. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_blink_commands.py +8 -8
  9. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_config_commands.py +3 -1
  10. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_custom_commands.py +3 -1
  11. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_datapoint_commands.py +4 -2
  12. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_discover_commands.py +5 -3
  13. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_lightlevel_commands.py +68 -32
  14. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_linknumber_commands.py +32 -17
  15. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_msactiontable_commands.py +11 -4
  16. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_output_commands.py +6 -2
  17. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_receive_commands.py +5 -3
  18. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/file_commands.py +9 -3
  19. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/homekit/homekit_start_commands.py +3 -1
  20. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/module_commands.py +12 -4
  21. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/reverse_proxy_commands.py +3 -1
  22. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/main.py +0 -2
  23. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_datapoint.py +3 -0
  24. conson_xp-1.3.0/src/xp/models/conbus/conbus_writeconfig.py +60 -0
  25. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_datapoint_service.py +9 -6
  26. conson_xp-1.2.0/src/xp/services/conbus/conbus_linknumber_set_service.py → conson_xp-1.3.0/src/xp/services/conbus/write_config_service.py +78 -66
  27. conson_xp-1.3.0/src/xp/services/telegram/telegram_datapoint_service.py +70 -0
  28. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/utils/dependencies.py +4 -46
  29. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_conbus_datapoint_integration.py +1 -1
  30. conson_xp-1.2.0/src/xp/api/__init__.py +0 -1
  31. conson_xp-1.2.0/src/xp/api/main.py +0 -125
  32. conson_xp-1.2.0/src/xp/api/models/__init__.py +0 -1
  33. conson_xp-1.2.0/src/xp/api/models/api.py +0 -31
  34. conson_xp-1.2.0/src/xp/api/models/discover.py +0 -31
  35. conson_xp-1.2.0/src/xp/api/routers/__init__.py +0 -17
  36. conson_xp-1.2.0/src/xp/api/routers/conbus.py +0 -5
  37. conson_xp-1.2.0/src/xp/api/routers/conbus_blink.py +0 -117
  38. conson_xp-1.2.0/src/xp/api/routers/conbus_custom.py +0 -71
  39. conson_xp-1.2.0/src/xp/api/routers/conbus_datapoint.py +0 -74
  40. conson_xp-1.2.0/src/xp/api/routers/conbus_output.py +0 -167
  41. conson_xp-1.2.0/src/xp/api/routers/errors.py +0 -38
  42. conson_xp-1.2.0/src/xp/cli/commands/api.py +0 -12
  43. conson_xp-1.2.0/src/xp/cli/commands/api_start_commands.py +0 -132
  44. conson_xp-1.2.0/src/xp/cli/commands/conbus/conbus_autoreport_commands.py +0 -90
  45. conson_xp-1.2.0/src/xp/services/conbus/conbus_autoreport_get_service.py +0 -94
  46. conson_xp-1.2.0/src/xp/services/conbus/conbus_autoreport_set_service.py +0 -141
  47. conson_xp-1.2.0/src/xp/services/conbus/conbus_lightlevel_get_service.py +0 -109
  48. conson_xp-1.2.0/src/xp/services/conbus/conbus_lightlevel_set_service.py +0 -225
  49. conson_xp-1.2.0/src/xp/services/conbus/conbus_linknumber_get_service.py +0 -94
  50. conson_xp-1.2.0/tests/integration/test_conbus_autoreport_integration.py +0 -359
  51. conson_xp-1.2.0/tests/integration/test_conbus_lightlevel_integration.py +0 -258
  52. conson_xp-1.2.0/tests/integration/test_conbus_linknumber_integration.py +0 -394
  53. conson_xp-1.2.0/tests/unit/test_services/test_conbus_lightlevel_service.py +0 -187
  54. conson_xp-1.2.0/tests/unit/test_services/test_conbus_linknumber_service.py +0 -392
  55. conson_xp-1.2.0/tests/unit/test_services/test_link_number_service.py +0 -229
  56. {conson_xp-1.2.0 → conson_xp-1.3.0}/LICENSE +0 -0
  57. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/__init__.py +0 -0
  58. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/__main__.py +0 -0
  59. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/__init__.py +0 -0
  60. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus.py +0 -0
  61. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_raw_commands.py +0 -0
  62. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/conbus/conbus_scan_commands.py +0 -0
  63. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/homekit/__init__.py +0 -0
  64. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/homekit/homekit.py +0 -0
  65. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/server/__init__.py +0 -0
  66. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/server/server_commands.py +0 -0
  67. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/__init__.py +0 -0
  68. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram.py +0 -0
  69. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram_blink_commands.py +0 -0
  70. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram_checksum_commands.py +0 -0
  71. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram_discover_commands.py +0 -0
  72. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram_linknumber_commands.py +0 -0
  73. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram_parse_commands.py +0 -0
  74. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/commands/telegram/telegram_version_commands.py +0 -0
  75. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/__init__.py +0 -0
  76. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/click_tree.py +0 -0
  77. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/datapoint_type_choice.py +0 -0
  78. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/decorators.py +0 -0
  79. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/error_handlers.py +0 -0
  80. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/formatters.py +0 -0
  81. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/serial_number_type.py +0 -0
  82. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/system_function_choice.py +0 -0
  83. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/cli/utils/xp_module_type.py +0 -0
  84. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/connection/__init__.py +0 -0
  85. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/connection/exceptions.py +0 -0
  86. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/__init__.py +0 -0
  87. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/actiontable/__init__.py +0 -0
  88. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/actiontable/actiontable.py +0 -0
  89. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/actiontable/msactiontable_xp20.py +0 -0
  90. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/actiontable/msactiontable_xp24.py +0 -0
  91. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/actiontable/msactiontable_xp33.py +0 -0
  92. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/__init__.py +0 -0
  93. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus.py +0 -0
  94. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_autoreport.py +0 -0
  95. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_blink.py +0 -0
  96. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_client_config.py +0 -0
  97. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_connection_status.py +0 -0
  98. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_custom.py +0 -0
  99. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_discover.py +0 -0
  100. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_lightlevel.py +0 -0
  101. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_linknumber.py +0 -0
  102. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_output.py +0 -0
  103. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_raw.py +0 -0
  104. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/conbus/conbus_receive.py +0 -0
  105. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/homekit/__init__.py +0 -0
  106. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/homekit/homekit_accessory.py +0 -0
  107. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/homekit/homekit_config.py +0 -0
  108. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/homekit/homekit_conson_config.py +0 -0
  109. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/log_entry.py +0 -0
  110. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/protocol/__init__.py +0 -0
  111. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/protocol/conbus_protocol.py +0 -0
  112. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/response.py +0 -0
  113. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/__init__.py +0 -0
  114. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/action_type.py +0 -0
  115. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/datapoint_type.py +0 -0
  116. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/event_telegram.py +0 -0
  117. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/event_type.py +0 -0
  118. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/input_action_type.py +0 -0
  119. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/input_type.py +0 -0
  120. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/module_type.py +0 -0
  121. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/module_type_code.py +0 -0
  122. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/output_telegram.py +0 -0
  123. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/reply_telegram.py +0 -0
  124. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/system_function.py +0 -0
  125. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/system_telegram.py +0 -0
  126. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/telegram.py +0 -0
  127. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/telegram_type.py +0 -0
  128. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/telegram/timeparam_type.py +0 -0
  129. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/models/write_config_type.py +0 -0
  130. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/__init__.py +0 -0
  131. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/__init__.py +0 -0
  132. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/__init__.py +0 -0
  133. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/actiontable_serializer.py +0 -0
  134. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/actiontable_service.py +0 -0
  135. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/msactiontable_service.py +0 -0
  136. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/msactiontable_xp20_serializer.py +0 -0
  137. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/msactiontable_xp24_serializer.py +0 -0
  138. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/actiontable/msactiontable_xp33_serializer.py +0 -0
  139. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_blink_all_service.py +0 -0
  140. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_blink_service.py +0 -0
  141. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_custom_service.py +0 -0
  142. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_datapoint_queryall_service.py +0 -0
  143. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_discover_service.py +0 -0
  144. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_output_service.py +0 -0
  145. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_raw_service.py +0 -0
  146. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_receive_service.py +0 -0
  147. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/conbus/conbus_scan_service.py +0 -0
  148. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/__init__.py +0 -0
  149. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_cache_service.py +0 -0
  150. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_conbus_service.py +0 -0
  151. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_config_validator.py +0 -0
  152. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_conson_validator.py +0 -0
  153. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_dimminglight.py +0 -0
  154. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_dimminglight_service.py +0 -0
  155. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_hap_service.py +0 -0
  156. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_lightbulb.py +0 -0
  157. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_lightbulb_service.py +0 -0
  158. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_module_service.py +0 -0
  159. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_outlet.py +0 -0
  160. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_outlet_service.py +0 -0
  161. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/homekit/homekit_service.py +0 -0
  162. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/log_file_service.py +0 -0
  163. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/module_type_service.py +0 -0
  164. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/protocol/__init__.py +0 -0
  165. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/protocol/conbus_protocol.py +0 -0
  166. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/protocol/protocol_factory.py +0 -0
  167. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/protocol/telegram_protocol.py +0 -0
  168. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/reverse_proxy_service.py +0 -0
  169. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/__init__.py +0 -0
  170. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/base_server_service.py +0 -0
  171. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/cp20_server_service.py +0 -0
  172. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/server_service.py +0 -0
  173. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/xp130_server_service.py +0 -0
  174. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/xp20_server_service.py +0 -0
  175. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/xp230_server_service.py +0 -0
  176. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/xp24_server_service.py +0 -0
  177. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/server/xp33_server_service.py +0 -0
  178. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/__init__.py +0 -0
  179. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_blink_service.py +0 -0
  180. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_checksum_service.py +0 -0
  181. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_discover_service.py +0 -0
  182. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_link_number_service.py +0 -0
  183. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_output_service.py +0 -0
  184. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_service.py +0 -0
  185. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/services/telegram/telegram_version_service.py +0 -0
  186. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/utils/__init__.py +0 -0
  187. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/utils/checksum.py +0 -0
  188. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/utils/event_helper.py +0 -0
  189. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/utils/serialization.py +0 -0
  190. {conson_xp-1.2.0 → conson_xp-1.3.0}/src/xp/utils/time_utils.py +0 -0
  191. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/.coverage +0 -0
  192. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/__init__.py +0 -0
  193. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/conftest.py +0 -0
  194. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/.coverage +0 -0
  195. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/__init__.py +0 -0
  196. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/telegram_test_data.py +0 -0
  197. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_actiontable_integration.py +0 -0
  198. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_api/.coverage +0 -0
  199. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_api/__init__.py +0 -0
  200. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_blink_integration.py +0 -0
  201. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_checksum_integration.py +0 -0
  202. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_conbus_blink_integration.py +0 -0
  203. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_conbus_raw_integration.py +0 -0
  204. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_conbus_receive_integration.py +0 -0
  205. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_discovery_integration.py +0 -0
  206. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_event_telegram_integration.py +0 -0
  207. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_homekit_config_integration.py +0 -0
  208. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_link_number_integration.py +0 -0
  209. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_module_integration.py +0 -0
  210. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_output_integration.py +0 -0
  211. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_reverse_proxy_integration.py +0 -0
  212. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_system_reply_telegram_integration.py +0 -0
  213. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_version_integration.py +0 -0
  214. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_xp20_action_table_integration.py +0 -0
  215. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/integration/test_xp24_action_table_integration.py +0 -0
  216. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/__init__.py +0 -0
  217. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_api/__init__.py +0 -0
  218. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/__init__.py +0 -0
  219. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_click_tree.py +0 -0
  220. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_conbus_actiontable_commands.py +0 -0
  221. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_conbus_blink_commands.py +0 -0
  222. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_datapoint_type_choice.py +0 -0
  223. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_decorators.py +0 -0
  224. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_error_handlers.py +0 -0
  225. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_formatters.py +0 -0
  226. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_serial_number_type.py +0 -0
  227. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_cli/test_system_function_choice.py +0 -0
  228. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_connection/__init__.py +0 -0
  229. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_connection/test_connection_init.py +0 -0
  230. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_connection/test_exceptions.py +0 -0
  231. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_encoding/__init__.py +0 -0
  232. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_encoding/test_latin1_edge_cases.py +0 -0
  233. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/__init__.py +0 -0
  234. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_conbus.py +0 -0
  235. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_conbus_client_send.py +0 -0
  236. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_conbus_discover.py +0 -0
  237. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_conbus_linknumber.py +0 -0
  238. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_event_telegram.py +0 -0
  239. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_log_entry.py +0 -0
  240. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_module_type.py +0 -0
  241. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_reply_telegram.py +0 -0
  242. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_system_telegram.py +0 -0
  243. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_system_telegram_enhancements.py +0 -0
  244. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_version_telegram.py +0 -0
  245. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_write_config_type.py +0 -0
  246. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_xp20_action_table.py +0 -0
  247. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_xp24_action_table.py +0 -0
  248. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_models/test_xp24_action_telegram.py +0 -0
  249. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/__init__.py +0 -0
  250. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_actiontable_service.py +0 -0
  251. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_base_server_service.py +0 -0
  252. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_blink_service.py +0 -0
  253. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_checksum_service.py +0 -0
  254. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_conbus_blink_service.py +0 -0
  255. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_conbus_raw_service.py +0 -0
  256. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_conbus_reverse_proxy_service.py +0 -0
  257. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_discovery_service.py +0 -0
  258. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_homekit_cache_service.py +0 -0
  259. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_homekit_config_validator.py +0 -0
  260. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_homekit_conson_service.py +0 -0
  261. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_homekit_services.py +0 -0
  262. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_log_file_service.py +0 -0
  263. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_module_type_service.py +0 -0
  264. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_protocol.py +0 -0
  265. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_server_service.py +0 -0
  266. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_telegram_input_service.py +0 -0
  267. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_telegram_protocol.py +0 -0
  268. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_telegram_service.py +0 -0
  269. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_version_service.py +0 -0
  270. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_xp20_action_table_serializer.py +0 -0
  271. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_xp24_action_service.py +0 -0
  272. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_xp24_action_table_serializer.py +0 -0
  273. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_xp24_action_table_service.py +0 -0
  274. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_xp33_action_table_serializer.py +0 -0
  275. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_services/test_xp_server_services.py +0 -0
  276. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_utils/__init__.py +0 -0
  277. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_utils/test_checksum.py +0 -0
  278. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_utils/test_event_helper.py +0 -0
  279. {conson_xp-1.2.0 → conson_xp-1.3.0}/tests/unit/test_utils/test_serialization.py +0 -0
  280. {conson_xp-1.2.0 → conson_xp-1.3.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.2.0
3
+ Version: 1.3.0
4
4
  Summary: XP Protocol Communication Tools
5
5
  Author-Email: ldvchosal <ldvchosal@github.com>
6
6
  License: MIT License
@@ -272,10 +272,6 @@ src/xp/
272
272
 
273
273
  xp
274
274
 
275
- xp api
276
- xp api start
277
-
278
-
279
275
  xp conbus
280
276
 
281
277
  xp conbus actiontable
@@ -221,10 +221,6 @@ src/xp/
221
221
 
222
222
  xp
223
223
 
224
- xp api
225
- xp api start
226
-
227
-
228
224
  xp conbus
229
225
 
230
226
  xp conbus actiontable
@@ -20,7 +20,7 @@ dependencies = [
20
20
  ]
21
21
  requires-python = ">=3.11"
22
22
  readme = "README.md"
23
- version = "1.2.0"
23
+ version = "1.3.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.2.0"
6
+ __version__ = "1.3.0"
7
7
  __manufacturer__ = "salchichon"
8
8
  __model__ = "xp.cli"
9
9
  __serial__ = "2025.09.23.000"
@@ -1,7 +1,6 @@
1
1
  """Command modules for XP CLI."""
2
2
 
3
3
  # Main command groups
4
- from xp.cli.commands.api_start_commands import start_api_server
5
4
 
6
5
  # Import conbus command groups (but not 'conbus' itself to avoid module shadowing in Python 3.10)
7
6
  from xp.cli.commands.conbus.conbus import (
@@ -100,7 +99,6 @@ __all__ = [
100
99
  "linknumber",
101
100
  "blink",
102
101
  "checksum",
103
- "start_api_server",
104
102
  "homekit",
105
103
  "homekit_start",
106
104
  # Individual command functions
@@ -28,7 +28,9 @@ def conbus_download_actiontable(ctx: Context, serial_number: str) -> None:
28
28
  ctx: Click context object.
29
29
  serial_number: 10-digit module serial number.
30
30
  """
31
- service = ctx.obj.get("container").get_container().resolve(ActionTableService)
31
+ service: ActionTableService = (
32
+ ctx.obj.get("container").get_container().resolve(ActionTableService)
33
+ )
32
34
 
33
35
  def progress_callback(progress: str) -> None:
34
36
  """Handle progress updates during action table download.
@@ -38,7 +40,7 @@ def conbus_download_actiontable(ctx: Context, serial_number: str) -> None:
38
40
  """
39
41
  click.echo(progress)
40
42
 
41
- def finish_callback(actiontable: ActionTable) -> None:
43
+ def on_finish(actiontable: ActionTable) -> None:
42
44
  """Handle successful completion of action table download.
43
45
 
44
46
  Args:
@@ -62,6 +64,6 @@ def conbus_download_actiontable(ctx: Context, serial_number: str) -> None:
62
64
  service.start(
63
65
  serial_number=serial_number,
64
66
  progress_callback=progress_callback,
65
- finish_callback=finish_callback,
67
+ finish_callback=on_finish,
66
68
  error_callback=error_callback,
67
69
  )
@@ -0,0 +1,108 @@
1
+ """Conbus auto report CLI commands."""
2
+
3
+ import json
4
+
5
+ import click
6
+ from click import Context
7
+
8
+ from xp.cli.commands.conbus.conbus import conbus_autoreport
9
+ from xp.cli.utils.decorators import (
10
+ connection_command,
11
+ )
12
+ from xp.cli.utils.serial_number_type import SERIAL
13
+ from xp.models import ConbusDatapointResponse
14
+ from xp.models.conbus.conbus_writeconfig import ConbusWriteConfigResponse
15
+ from xp.models.telegram.datapoint_type import DataPointType
16
+ from xp.services.conbus.conbus_datapoint_service import ConbusDatapointService
17
+ from xp.services.conbus.write_config_service import WriteConfigService
18
+ from xp.services.telegram.telegram_datapoint_service import TelegramDatapointService
19
+
20
+
21
+ @conbus_autoreport.command("get", short_help="Get auto report status for a module")
22
+ @click.argument("serial_number", type=SERIAL)
23
+ @connection_command()
24
+ @click.pass_context
25
+ def get_autoreport_command(ctx: Context, serial_number: str) -> None:
26
+ r"""Get the current auto report status for a specific module.
27
+
28
+ Args:
29
+ ctx: Click context object.
30
+ serial_number: 10-digit module serial number.
31
+
32
+ Examples:
33
+ \b
34
+ xp conbus autoreport get 0123450001
35
+ """
36
+ # Get service from container
37
+ service: ConbusDatapointService = (
38
+ ctx.obj.get("container").get_container().resolve(ConbusDatapointService)
39
+ )
40
+ telegram_service: TelegramDatapointService = (
41
+ ctx.obj.get("container").get_container().resolve(TelegramDatapointService)
42
+ )
43
+
44
+ def on_finish(service_response: ConbusDatapointResponse) -> None:
45
+ """Handle successful completion of auto report status retrieval.
46
+
47
+ Args:
48
+ service_response: Auto report response object.
49
+ """
50
+ auto_report_status = telegram_service.get_autoreport_status(
51
+ service_response.data_value
52
+ )
53
+ result = service_response.to_dict()
54
+ result["auto_report_status"] = auto_report_status
55
+ click.echo(json.dumps(result, indent=2))
56
+
57
+ with service:
58
+ service.query_datapoint(
59
+ serial_number=serial_number,
60
+ datapoint_type=DataPointType.AUTO_REPORT_STATUS,
61
+ finish_callback=on_finish,
62
+ )
63
+
64
+
65
+ @conbus_autoreport.command("set", short_help="Set auto report status for a module")
66
+ @click.argument("serial_number", type=SERIAL)
67
+ @click.argument("status", type=click.Choice(["on", "off"], case_sensitive=False))
68
+ @connection_command()
69
+ @click.pass_context
70
+ def set_autoreport_command(ctx: Context, serial_number: str, status: str) -> None:
71
+ r"""Set the auto report status for a specific module.
72
+
73
+ Args:
74
+ ctx: Click context object.
75
+ serial_number: 10-digit module serial number.
76
+ status: Auto report status - either 'on' or 'off'.
77
+
78
+ Examples:
79
+ \b
80
+ xp conbus autoreport set 0123450001 on
81
+ xp conbus autoreport set 0123450001 off
82
+ """
83
+
84
+ def on_finish(response: "ConbusWriteConfigResponse") -> None:
85
+ """Handle successful completion of light level on command.
86
+
87
+ Args:
88
+ response: Light level response object.
89
+ """
90
+ click.echo(json.dumps(response.to_dict(), indent=2))
91
+
92
+ service: WriteConfigService = (
93
+ ctx.obj.get("container").get_container().resolve(WriteConfigService)
94
+ )
95
+ telegram_service: TelegramDatapointService = (
96
+ ctx.obj.get("container").get_container().resolve(TelegramDatapointService)
97
+ )
98
+ status_value = True if status == "on" else False
99
+ data_value = telegram_service.get_autoreport_status_data_value(status_value)
100
+
101
+ with service:
102
+ service.write_config(
103
+ serial_number=serial_number,
104
+ datapoint_type=DataPointType.AUTO_REPORT_STATUS,
105
+ data_value=data_value,
106
+ finish_callback=on_finish,
107
+ timeout_seconds=0.5,
108
+ )
@@ -34,7 +34,7 @@ def send_blink_on_telegram(ctx: Context, serial_number: str) -> None:
34
34
  xp conbus blink on 0012345008
35
35
  """
36
36
 
37
- def finish(service_response: ConbusBlinkResponse) -> None:
37
+ def on_finish(service_response: ConbusBlinkResponse) -> None:
38
38
  """Handle successful completion of blink on command.
39
39
 
40
40
  Args:
@@ -46,7 +46,7 @@ def send_blink_on_telegram(ctx: Context, serial_number: str) -> None:
46
46
  ctx.obj.get("container").get_container().resolve(ConbusBlinkService)
47
47
  )
48
48
  with service:
49
- service.send_blink_telegram(serial_number, "on", finish, 0.5)
49
+ service.send_blink_telegram(serial_number, "on", on_finish, 0.5)
50
50
 
51
51
 
52
52
  @conbus_blink.command("off")
@@ -66,7 +66,7 @@ def send_blink_off_telegram(ctx: Context, serial_number: str) -> None:
66
66
  xp conbus blink off 0012345008
67
67
  """
68
68
 
69
- def finish(service_response: ConbusBlinkResponse) -> None:
69
+ def on_finish(service_response: ConbusBlinkResponse) -> None:
70
70
  """Handle successful completion of blink off command.
71
71
 
72
72
  Args:
@@ -78,7 +78,7 @@ def send_blink_off_telegram(ctx: Context, serial_number: str) -> None:
78
78
  ctx.obj.get("container").get_container().resolve(ConbusBlinkService)
79
79
  )
80
80
  with service:
81
- service.send_blink_telegram(serial_number, "off", finish, 0.5)
81
+ service.send_blink_telegram(serial_number, "off", on_finish, 0.5)
82
82
 
83
83
 
84
84
  @conbus_blink.group("all", short_help="Control blink state for all devices")
@@ -102,7 +102,7 @@ def blink_all_off(ctx: Context) -> None:
102
102
  xp conbus blink all off
103
103
  """
104
104
 
105
- def finish(discovered_devices: ConbusBlinkResponse) -> None:
105
+ def on_finish(discovered_devices: ConbusBlinkResponse) -> None:
106
106
  """Handle successful completion of blink all off command.
107
107
 
108
108
  Args:
@@ -122,7 +122,7 @@ def blink_all_off(ctx: Context) -> None:
122
122
  ctx.obj.get("container").get_container().resolve(ConbusBlinkAllService)
123
123
  )
124
124
  with service:
125
- service.send_blink_all_telegram("off", progress, finish, 0.5)
125
+ service.send_blink_all_telegram("off", progress, on_finish, 0.5)
126
126
 
127
127
 
128
128
  @conbus_blink_all.command("on", short_help="Turn on blinking for all devices")
@@ -140,7 +140,7 @@ def blink_all_on(ctx: Context) -> None:
140
140
  xp conbus blink all on
141
141
  """
142
142
 
143
- def finish(discovered_devices: ConbusBlinkResponse) -> None:
143
+ def on_finish(discovered_devices: ConbusBlinkResponse) -> None:
144
144
  """Handle successful completion of blink all on command.
145
145
 
146
146
  Args:
@@ -160,4 +160,4 @@ def blink_all_on(ctx: Context) -> None:
160
160
  ctx.obj.get("container").get_container().resolve(ConbusBlinkAllService)
161
161
  )
162
162
  with service:
163
- service.send_blink_all_telegram("on", progress, finish, 0.5)
163
+ service.send_blink_all_telegram("on", progress, on_finish, 0.5)
@@ -23,5 +23,7 @@ def show_config(ctx: Context) -> None:
23
23
  \b
24
24
  xp conbus config
25
25
  """
26
- config = ctx.obj.get("container").get_container().resolve(ConbusClientConfig)
26
+ config: ConbusClientConfig = (
27
+ ctx.obj.get("container").get_container().resolve(ConbusClientConfig)
28
+ )
27
29
  click.echo(json.dumps(config.conbus.model_dump(mode="json"), indent=2))
@@ -36,7 +36,9 @@ def send_custom_telegram(
36
36
  xp conbus custom 0012345011 02 E2
37
37
  xp conbus custom 0012345011 17 AA
38
38
  """
39
- service = ctx.obj.get("container").get_container().resolve(ConbusCustomService)
39
+ service: ConbusCustomService = (
40
+ ctx.obj.get("container").get_container().resolve(ConbusCustomService)
41
+ )
40
42
 
41
43
  def on_finish(service_response: "ConbusCustomResponse") -> None:
42
44
  """Handle successful completion of custom telegram.
@@ -45,7 +45,9 @@ def query_datapoint(ctx: Context, serial_number: str, datapoint: DataPointType)
45
45
  xp conbus datapoint query current 0012345011
46
46
  xp conbus datapoint query humidity 0012345011
47
47
  """
48
- service = ctx.obj.get("container").get_container().resolve(ConbusDatapointService)
48
+ service: ConbusDatapointService = (
49
+ ctx.obj.get("container").get_container().resolve(ConbusDatapointService)
50
+ )
49
51
 
50
52
  def on_finish(service_response: ConbusDatapointResponse) -> None:
51
53
  """Handle successful completion of datapoint query.
@@ -83,7 +85,7 @@ def query_all_datapoints(ctx: Context, serial_number: str) -> None:
83
85
  \b
84
86
  xp conbus datapoint all 0123450001
85
87
  """
86
- service = (
88
+ service: ConbusDatapointQueryAllService = (
87
89
  ctx.obj.get("container").get_container().resolve(ConbusDatapointQueryAllService)
88
90
  )
89
91
 
@@ -28,7 +28,7 @@ def send_discover_telegram(ctx: click.Context) -> None:
28
28
  xp conbus discover
29
29
  """
30
30
 
31
- def finish(discovered_devices: ConbusDiscoverResponse) -> None:
31
+ def on_finish(discovered_devices: ConbusDiscoverResponse) -> None:
32
32
  """Handle successful completion of device discovery.
33
33
 
34
34
  Args:
@@ -45,6 +45,8 @@ def send_discover_telegram(ctx: click.Context) -> None:
45
45
  # click.echo(f"Discovered : {serial_number}")
46
46
  pass
47
47
 
48
- service = ctx.obj.get("container").get_container().resolve(ConbusDiscoverService)
48
+ service: ConbusDiscoverService = (
49
+ ctx.obj.get("container").get_container().resolve(ConbusDiscoverService)
50
+ )
49
51
  with service:
50
- service.start(progress, finish, 0.5)
52
+ service.start(progress, on_finish, 0.5)
@@ -7,14 +7,14 @@ import click
7
7
  from xp.cli.commands.conbus.conbus import conbus_lightlevel
8
8
  from xp.cli.utils.decorators import (
9
9
  connection_command,
10
- handle_service_errors,
11
10
  )
12
11
  from xp.cli.utils.serial_number_type import SERIAL
13
- from xp.models.conbus.conbus_lightlevel import ConbusLightlevelResponse
14
- from xp.services.conbus.conbus_lightlevel_set_service import (
15
- ConbusLightlevelError,
16
- ConbusLightlevelSetService,
17
- )
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
18
 
19
19
 
20
20
  @conbus_lightlevel.command("set")
@@ -23,7 +23,6 @@ from xp.services.conbus.conbus_lightlevel_set_service import (
23
23
  @click.argument("level", type=click.IntRange(0, 100))
24
24
  @click.pass_context
25
25
  @connection_command()
26
- @handle_service_errors(ConbusLightlevelError)
27
26
  def xp_lightlevel_set(
28
27
  ctx: click.Context, serial_number: str, output_number: int, level: int
29
28
  ) -> None:
@@ -41,20 +40,28 @@ def xp_lightlevel_set(
41
40
  xp conbus lightlevel set 0011223344 0 100 # Set output 0 to 100%
42
41
  """
43
42
 
44
- def finish(response: "ConbusLightlevelResponse") -> None:
45
- """Handle successful completion of light level set command.
43
+ def on_finish(response: "ConbusWriteConfigResponse") -> None:
44
+ """Handle successful completion of light level on command.
46
45
 
47
46
  Args:
48
47
  response: Light level response object.
49
48
  """
50
49
  click.echo(json.dumps(response.to_dict(), indent=2))
51
50
 
52
- service = (
53
- ctx.obj.get("container").get_container().resolve(ConbusLightlevelSetService)
51
+ service: WriteConfigService = (
52
+ ctx.obj.get("container").get_container().resolve(WriteConfigService)
54
53
  )
55
54
 
55
+ data_value = f"{output_number:02d}:{level:03d}"
56
+
56
57
  with service:
57
- service.set_lightlevel(serial_number, output_number, level, finish, 0.5)
58
+ service.write_config(
59
+ serial_number=serial_number,
60
+ datapoint_type=DataPointType.MODULE_LIGHT_LEVEL,
61
+ data_value=data_value,
62
+ finish_callback=on_finish,
63
+ timeout_seconds=0.5,
64
+ )
58
65
 
59
66
 
60
67
  @conbus_lightlevel.command("off")
@@ -62,7 +69,6 @@ def xp_lightlevel_set(
62
69
  @click.argument("output_number", type=click.IntRange(0, 8))
63
70
  @click.pass_context
64
71
  @connection_command()
65
- @handle_service_errors(ConbusLightlevelError)
66
72
  def xp_lightlevel_off(
67
73
  ctx: click.Context, serial_number: str, output_number: int
68
74
  ) -> None:
@@ -79,20 +85,29 @@ def xp_lightlevel_off(
79
85
  xp conbus lightlevel off 0011223344 0 # Turn off output 0
80
86
  """
81
87
 
82
- def finish(response: "ConbusLightlevelResponse") -> None:
83
- """Handle successful completion of light level off command.
88
+ def on_finish(response: "ConbusWriteConfigResponse") -> None:
89
+ """Handle successful completion of light level on command.
84
90
 
85
91
  Args:
86
92
  response: Light level response object.
87
93
  """
88
94
  click.echo(json.dumps(response.to_dict(), indent=2))
89
95
 
90
- service = (
91
- ctx.obj.get("container").get_container().resolve(ConbusLightlevelSetService)
96
+ service: WriteConfigService = (
97
+ ctx.obj.get("container").get_container().resolve(WriteConfigService)
92
98
  )
93
99
 
100
+ level = 0
101
+ data_value = f"{output_number:02d}:{level:03d}"
102
+
94
103
  with service:
95
- service.turn_off(serial_number, output_number, finish, 0.5)
104
+ service.write_config(
105
+ serial_number=serial_number,
106
+ datapoint_type=DataPointType.MODULE_LIGHT_LEVEL,
107
+ data_value=data_value,
108
+ finish_callback=on_finish,
109
+ timeout_seconds=0.5,
110
+ )
96
111
 
97
112
 
98
113
  @conbus_lightlevel.command("on")
@@ -100,7 +115,6 @@ def xp_lightlevel_off(
100
115
  @click.argument("output_number", type=click.IntRange(0, 8))
101
116
  @click.pass_context
102
117
  @connection_command()
103
- @handle_service_errors(ConbusLightlevelError)
104
118
  def xp_lightlevel_on(
105
119
  ctx: click.Context, serial_number: str, output_number: int
106
120
  ) -> None:
@@ -117,7 +131,7 @@ def xp_lightlevel_on(
117
131
  xp conbus lightlevel on 0011223344 0 # Turn on output 0 (80%)
118
132
  """
119
133
 
120
- def finish(response: "ConbusLightlevelResponse") -> None:
134
+ def on_finish(response: "ConbusWriteConfigResponse") -> None:
121
135
  """Handle successful completion of light level on command.
122
136
 
123
137
  Args:
@@ -125,12 +139,21 @@ def xp_lightlevel_on(
125
139
  """
126
140
  click.echo(json.dumps(response.to_dict(), indent=2))
127
141
 
128
- service = (
129
- ctx.obj.get("container").get_container().resolve(ConbusLightlevelSetService)
142
+ service: WriteConfigService = (
143
+ ctx.obj.get("container").get_container().resolve(WriteConfigService)
130
144
  )
131
145
 
146
+ level = 60
147
+ data_value = f"{output_number:02d}:{level:03d}"
148
+
132
149
  with service:
133
- service.turn_on(serial_number, output_number, finish, 0.5)
150
+ service.write_config(
151
+ serial_number=serial_number,
152
+ datapoint_type=DataPointType.MODULE_LIGHT_LEVEL,
153
+ data_value=data_value,
154
+ finish_callback=on_finish,
155
+ timeout_seconds=0.5,
156
+ )
134
157
 
135
158
 
136
159
  @conbus_lightlevel.command("get")
@@ -138,7 +161,6 @@ def xp_lightlevel_on(
138
161
  @click.argument("output_number", type=click.IntRange(0, 8))
139
162
  @click.pass_context
140
163
  @connection_command()
141
- @handle_service_errors(ConbusLightlevelError)
142
164
  def xp_lightlevel_get(
143
165
  ctx: click.Context, serial_number: str, output_number: int
144
166
  ) -> None:
@@ -154,18 +176,32 @@ def xp_lightlevel_get(
154
176
  xp conbus lightlevel get 0123450001 2 # Get light level for output 2
155
177
  xp conbus lightlevel get 0011223344 0 # Get light level for output 0
156
178
  """
179
+ # Get service from container
180
+ service: ConbusDatapointService = (
181
+ ctx.obj.get("container").get_container().resolve(ConbusDatapointService)
182
+ )
183
+ telegram_service: TelegramDatapointService = (
184
+ ctx.obj.get("container").get_container().resolve(TelegramDatapointService)
185
+ )
157
186
 
158
- def finish(response: "ConbusLightlevelResponse") -> None:
187
+ def on_finish(service_response: "ConbusDatapointResponse") -> None:
159
188
  """Handle successful completion of light level get command.
160
189
 
161
190
  Args:
162
- response: Light level response object.
191
+ service_response: Light level response object.
163
192
  """
164
- click.echo(json.dumps(response.to_dict(), indent=2))
165
-
166
- service = (
167
- ctx.obj.get("container").get_container().resolve(ConbusLightlevelSetService)
168
- )
193
+ lightlevel_level = telegram_service.get_lightlevel(
194
+ service_response.data_value, output_number
195
+ )
196
+ result = service_response.to_dict()
197
+ result["output_number"] = output_number
198
+ result["lightlevel_level"] = lightlevel_level
199
+ click.echo(json.dumps(result, indent=2))
169
200
 
170
201
  with service:
171
- service.get_lightlevel(serial_number, output_number, finish, 0.5)
202
+ service.query_datapoint(
203
+ serial_number=serial_number,
204
+ datapoint_type=DataPointType.MODULE_LIGHT_LEVEL,
205
+ finish_callback=on_finish,
206
+ timeout_seconds=0.5,
207
+ )
@@ -9,9 +9,12 @@ from xp.cli.utils.decorators import (
9
9
  connection_command,
10
10
  )
11
11
  from xp.cli.utils.serial_number_type import SERIAL
12
- from xp.models.conbus.conbus_linknumber import ConbusLinknumberResponse
13
- from xp.services.conbus.conbus_linknumber_get_service import ConbusLinknumberGetService
14
- from xp.services.conbus.conbus_linknumber_set_service import ConbusLinknumberSetService
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
15
18
 
16
19
 
17
20
  @conbus_linknumber.command("set", short_help="Set link number for a module")
@@ -33,23 +36,27 @@ def set_linknumber_command(
33
36
  \b
34
37
  xp conbus linknumber set 0123450001 25
35
38
  """
36
- service = (
37
- ctx.obj.get("container").get_container().resolve(ConbusLinknumberSetService)
38
- )
39
39
 
40
- def on_finish(response: ConbusLinknumberResponse) -> None:
41
- """Handle successful completion of link number set command.
40
+ def on_finish(response: "ConbusWriteConfigResponse") -> None:
41
+ """Handle successful completion of light level on command.
42
42
 
43
43
  Args:
44
- response: Link number response object.
44
+ response: Light level response object.
45
45
  """
46
46
  click.echo(json.dumps(response.to_dict(), indent=2))
47
47
 
48
+ service: WriteConfigService = (
49
+ ctx.obj.get("container").get_container().resolve(WriteConfigService)
50
+ )
51
+
52
+ data_value = f"{link_number: 02d}"
48
53
  with service:
49
- service.set_linknumber(
54
+ service.write_config(
50
55
  serial_number=serial_number,
51
- link_number=link_number,
56
+ datapoint_type=DataPointType.LINK_NUMBER,
57
+ data_value=data_value,
52
58
  finish_callback=on_finish,
59
+ timeout_seconds=0.5,
53
60
  )
54
61
 
55
62
 
@@ -68,20 +75,28 @@ def get_linknumber_command(ctx: click.Context, serial_number: str) -> None:
68
75
  \b
69
76
  xp conbus linknumber get 0123450001
70
77
  """
71
- service = (
72
- ctx.obj.get("container").get_container().resolve(ConbusLinknumberGetService)
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)
73
83
  )
74
84
 
75
- def on_finish(response: ConbusLinknumberResponse) -> None:
85
+ def on_finish(service_response: ConbusDatapointResponse) -> None:
76
86
  """Handle successful completion of link number get command.
77
87
 
78
88
  Args:
79
- response: Link number response object.
89
+ service_response: Link number response object.
80
90
  """
81
- click.echo(json.dumps(response.to_dict(), indent=2))
91
+ linknumber_value = telegram_service.get_linknumber(service_response.data_value)
92
+ result = service_response.to_dict()
93
+ result["linknumber_value"] = linknumber_value
94
+ click.echo(json.dumps(result, indent=2))
82
95
 
83
96
  with service:
84
- service.get_linknumber(
97
+ service.query_datapoint(
85
98
  serial_number=serial_number,
99
+ datapoint_type=DataPointType.LINK_NUMBER,
86
100
  finish_callback=on_finish,
101
+ timeout_seconds=0.5,
87
102
  )
@@ -2,6 +2,7 @@
2
2
 
3
3
  import json
4
4
  from dataclasses import asdict
5
+ from typing import Union
5
6
 
6
7
  import click
7
8
  from click import Context
@@ -12,7 +13,9 @@ from xp.cli.utils.decorators import (
12
13
  )
13
14
  from xp.cli.utils.serial_number_type import SERIAL
14
15
  from xp.cli.utils.xp_module_type import XP_MODULE_TYPE
15
- from xp.models.actiontable.actiontable import ActionTable
16
+ from xp.models.actiontable.msactiontable_xp20 import Xp20MsActionTable
17
+ from xp.models.actiontable.msactiontable_xp24 import Xp24MsActionTable
18
+ from xp.models.actiontable.msactiontable_xp33 import Xp33MsActionTable
16
19
  from xp.services.conbus.actiontable.msactiontable_service import (
17
20
  MsActionTableService,
18
21
  )
@@ -33,7 +36,9 @@ def conbus_download_msactiontable(
33
36
  serial_number: 10-digit module serial number.
34
37
  xpmoduletype: XP module type.
35
38
  """
36
- service = ctx.obj.get("container").get_container().resolve(MsActionTableService)
39
+ service: MsActionTableService = (
40
+ ctx.obj.get("container").get_container().resolve(MsActionTableService)
41
+ )
37
42
 
38
43
  def progress_callback(progress: str) -> None:
39
44
  """Handle progress updates during MS action table download.
@@ -43,7 +48,9 @@ def conbus_download_msactiontable(
43
48
  """
44
49
  click.echo(progress, nl=False)
45
50
 
46
- def finish_callback(action_table: ActionTable) -> None:
51
+ def on_finish(
52
+ action_table: Union[Xp20MsActionTable | Xp24MsActionTable | Xp33MsActionTable],
53
+ ) -> None:
47
54
  """Handle successful completion of MS action table download.
48
55
 
49
56
  Args:
@@ -73,6 +80,6 @@ def conbus_download_msactiontable(
73
80
  serial_number=serial_number,
74
81
  xpmoduletype=xpmoduletype,
75
82
  progress_callback=progress_callback,
76
- finish_callback=finish_callback,
83
+ finish_callback=on_finish,
77
84
  error_callback=error_callback,
78
85
  )