conson-xp 1.32.0__tar.gz → 1.34.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 (314) hide show
  1. {conson_xp-1.32.0 → conson_xp-1.34.0}/PKG-INFO +26 -1
  2. {conson_xp-1.32.0 → conson_xp-1.34.0}/README.md +25 -0
  3. {conson_xp-1.32.0 → conson_xp-1.34.0}/pyproject.toml +1 -1
  4. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/__init__.py +1 -1
  5. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_blink_commands.py +20 -6
  6. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_blink_all_service.py +89 -35
  7. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_blink_service.py +82 -24
  8. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_export_service.py +62 -70
  9. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/dependencies.py +2 -4
  10. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_conbus_blink_integration.py +27 -33
  11. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_blink_service.py +104 -49
  12. {conson_xp-1.32.0 → conson_xp-1.34.0}/LICENSE +0 -0
  13. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/__init__.py +0 -0
  14. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/__main__.py +0 -0
  15. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/__init__.py +0 -0
  16. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/__init__.py +0 -0
  17. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus.py +0 -0
  18. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_actiontable_commands.py +0 -0
  19. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_autoreport_commands.py +0 -0
  20. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_config_commands.py +0 -0
  21. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_custom_commands.py +0 -0
  22. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_datapoint_commands.py +0 -0
  23. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_discover_commands.py +0 -0
  24. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_event_commands.py +0 -0
  25. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_export_commands.py +0 -0
  26. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_lightlevel_commands.py +0 -0
  27. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_linknumber_commands.py +0 -0
  28. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_modulenumber_commands.py +0 -0
  29. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_msactiontable_commands.py +0 -0
  30. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_output_commands.py +0 -0
  31. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_raw_commands.py +0 -0
  32. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_receive_commands.py +0 -0
  33. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/conbus/conbus_scan_commands.py +0 -0
  34. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/file_commands.py +0 -0
  35. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/homekit/__init__.py +0 -0
  36. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/homekit/homekit.py +0 -0
  37. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/homekit/homekit_start_commands.py +0 -0
  38. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/module_commands.py +0 -0
  39. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/reverse_proxy_commands.py +0 -0
  40. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/server/__init__.py +0 -0
  41. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/server/server_commands.py +0 -0
  42. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/__init__.py +0 -0
  43. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram.py +0 -0
  44. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram_blink_commands.py +0 -0
  45. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram_checksum_commands.py +0 -0
  46. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram_discover_commands.py +0 -0
  47. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram_linknumber_commands.py +0 -0
  48. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram_parse_commands.py +0 -0
  49. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/telegram/telegram_version_commands.py +0 -0
  50. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/term/__init__.py +0 -0
  51. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/term/term.py +0 -0
  52. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/commands/term/term_commands.py +0 -0
  53. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/main.py +0 -0
  54. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/__init__.py +0 -0
  55. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/click_tree.py +0 -0
  56. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/datapoint_type_choice.py +0 -0
  57. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/decorators.py +0 -0
  58. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/error_handlers.py +0 -0
  59. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/formatters.py +0 -0
  60. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/module_type_choice.py +0 -0
  61. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/serial_number_type.py +0 -0
  62. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/system_function_choice.py +0 -0
  63. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/cli/utils/xp_module_type.py +0 -0
  64. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/connection/__init__.py +0 -0
  65. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/connection/exceptions.py +0 -0
  66. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/__init__.py +0 -0
  67. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/actiontable/__init__.py +0 -0
  68. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/actiontable/actiontable.py +0 -0
  69. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/actiontable/msactiontable_xp20.py +0 -0
  70. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/actiontable/msactiontable_xp24.py +0 -0
  71. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/actiontable/msactiontable_xp33.py +0 -0
  72. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/__init__.py +0 -0
  73. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus.py +0 -0
  74. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_autoreport.py +0 -0
  75. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_blink.py +0 -0
  76. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_client_config.py +0 -0
  77. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_connection_status.py +0 -0
  78. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_custom.py +0 -0
  79. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_datapoint.py +0 -0
  80. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_discover.py +0 -0
  81. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_event_list.py +0 -0
  82. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_event_raw.py +0 -0
  83. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_export.py +0 -0
  84. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_lightlevel.py +0 -0
  85. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_linknumber.py +0 -0
  86. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_logger_config.py +0 -0
  87. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_output.py +0 -0
  88. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_raw.py +0 -0
  89. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_receive.py +0 -0
  90. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/conbus/conbus_writeconfig.py +0 -0
  91. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/homekit/__init__.py +0 -0
  92. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/homekit/homekit_accessory.py +0 -0
  93. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/homekit/homekit_config.py +0 -0
  94. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/homekit/homekit_conson_config.py +0 -0
  95. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/log_entry.py +0 -0
  96. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/protocol/__init__.py +0 -0
  97. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/protocol/conbus_protocol.py +0 -0
  98. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/response.py +0 -0
  99. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/__init__.py +0 -0
  100. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/action_type.py +0 -0
  101. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/datapoint_type.py +0 -0
  102. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/event_telegram.py +0 -0
  103. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/event_type.py +0 -0
  104. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/input_action_type.py +0 -0
  105. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/input_type.py +0 -0
  106. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/module_type.py +0 -0
  107. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/module_type_code.py +0 -0
  108. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/output_telegram.py +0 -0
  109. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/reply_telegram.py +0 -0
  110. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/system_function.py +0 -0
  111. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/system_telegram.py +0 -0
  112. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/telegram.py +0 -0
  113. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/telegram_type.py +0 -0
  114. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/telegram/timeparam_type.py +0 -0
  115. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/term/__init__.py +0 -0
  116. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/term/connection_state.py +0 -0
  117. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/term/module_state.py +0 -0
  118. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/term/protocol_keys_config.py +0 -0
  119. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/term/status_message.py +0 -0
  120. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/term/telegram_display.py +0 -0
  121. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/models/write_config_type.py +0 -0
  122. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/__init__.py +0 -0
  123. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/actiontable/__init__.py +0 -0
  124. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/actiontable/actiontable_serializer.py +0 -0
  125. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/actiontable/msactiontable_serializer.py +0 -0
  126. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/actiontable/msactiontable_xp20_serializer.py +0 -0
  127. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/actiontable/msactiontable_xp24_serializer.py +0 -0
  128. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/actiontable/msactiontable_xp33_serializer.py +0 -0
  129. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/__init__.py +0 -0
  130. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/actiontable/__init__.py +0 -0
  131. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/actiontable/actiontable_download_service.py +0 -0
  132. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/actiontable/actiontable_list_service.py +0 -0
  133. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/actiontable/actiontable_show_service.py +0 -0
  134. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/actiontable/actiontable_upload_service.py +0 -0
  135. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/actiontable/msactiontable_service.py +0 -0
  136. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_custom_service.py +0 -0
  137. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_datapoint_queryall_service.py +0 -0
  138. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_datapoint_service.py +0 -0
  139. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_discover_service.py +0 -0
  140. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_event_list_service.py +0 -0
  141. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_event_raw_service.py +0 -0
  142. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_output_service.py +0 -0
  143. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_raw_service.py +0 -0
  144. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_receive_service.py +0 -0
  145. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/conbus_scan_service.py +0 -0
  146. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/conbus/write_config_service.py +0 -0
  147. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/__init__.py +0 -0
  148. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_cache_service.py +0 -0
  149. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_conbus_service.py +0 -0
  150. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_config_validator.py +0 -0
  151. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_conson_validator.py +0 -0
  152. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_dimminglight.py +0 -0
  153. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_dimminglight_service.py +0 -0
  154. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_hap_service.py +0 -0
  155. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_lightbulb.py +0 -0
  156. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_lightbulb_service.py +0 -0
  157. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_module_service.py +0 -0
  158. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_outlet.py +0 -0
  159. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_outlet_service.py +0 -0
  160. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/homekit/homekit_service.py +0 -0
  161. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/log_file_service.py +0 -0
  162. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/module_type_service.py +0 -0
  163. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/protocol/__init__.py +0 -0
  164. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/protocol/conbus_event_protocol.py +0 -0
  165. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/protocol/conbus_protocol.py +0 -0
  166. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/protocol/protocol_factory.py +0 -0
  167. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/protocol/telegram_protocol.py +0 -0
  168. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/reverse_proxy_service.py +0 -0
  169. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/__init__.py +0 -0
  170. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/base_server_service.py +0 -0
  171. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/client_buffer_manager.py +0 -0
  172. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/cp20_server_service.py +0 -0
  173. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/device_service_factory.py +0 -0
  174. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/server_service.py +0 -0
  175. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/xp130_server_service.py +0 -0
  176. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/xp20_server_service.py +0 -0
  177. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/xp230_server_service.py +0 -0
  178. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/xp24_server_service.py +0 -0
  179. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/server/xp33_server_service.py +0 -0
  180. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/__init__.py +0 -0
  181. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_blink_service.py +0 -0
  182. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_checksum_service.py +0 -0
  183. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_datapoint_service.py +0 -0
  184. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_discover_service.py +0 -0
  185. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_link_number_service.py +0 -0
  186. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_output_service.py +0 -0
  187. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_service.py +0 -0
  188. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/telegram/telegram_version_service.py +0 -0
  189. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/term/__init__.py +0 -0
  190. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/term/protocol_monitor_service.py +0 -0
  191. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/services/term/state_monitor_service.py +0 -0
  192. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/__init__.py +0 -0
  193. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/protocol.py +0 -0
  194. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/protocol.tcss +0 -0
  195. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/state.py +0 -0
  196. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/state.tcss +0 -0
  197. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/widgets/__init__.py +0 -0
  198. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/widgets/help_menu.py +0 -0
  199. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/widgets/modules_list.py +0 -0
  200. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/widgets/protocol_log.py +0 -0
  201. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/term/widgets/status_footer.py +0 -0
  202. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/__init__.py +0 -0
  203. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/checksum.py +0 -0
  204. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/event_helper.py +0 -0
  205. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/logging.py +0 -0
  206. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/serialization.py +0 -0
  207. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/state_machine.py +0 -0
  208. {conson_xp-1.32.0 → conson_xp-1.34.0}/src/xp/utils/time_utils.py +0 -0
  209. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/.coverage +0 -0
  210. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/__init__.py +0 -0
  211. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/conftest.py +0 -0
  212. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/.coverage +0 -0
  213. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/__init__.py +0 -0
  214. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/telegram_test_data.py +0 -0
  215. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_actiontable_integration.py +0 -0
  216. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_api/.coverage +0 -0
  217. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_api/__init__.py +0 -0
  218. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_blink_integration.py +0 -0
  219. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_checksum_integration.py +0 -0
  220. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_conbus_datapoint_integration.py +0 -0
  221. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_conbus_raw_integration.py +0 -0
  222. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_conbus_receive_integration.py +0 -0
  223. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_discovery_integration.py +0 -0
  224. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_event_telegram_integration.py +0 -0
  225. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_homekit_config_integration.py +0 -0
  226. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_link_number_integration.py +0 -0
  227. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_module_integration.py +0 -0
  228. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_output_integration.py +0 -0
  229. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_reverse_proxy_integration.py +0 -0
  230. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_system_reply_telegram_integration.py +0 -0
  231. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_term_logging_integration.py +0 -0
  232. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_version_integration.py +0 -0
  233. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_xp20_action_table_integration.py +0 -0
  234. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/integration/test_xp24_action_table_integration.py +0 -0
  235. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/__init__.py +0 -0
  236. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_api/__init__.py +0 -0
  237. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/__init__.py +0 -0
  238. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_click_tree.py +0 -0
  239. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_conbus_actiontable_commands.py +0 -0
  240. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_conbus_blink_commands.py +0 -0
  241. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_datapoint_type_choice.py +0 -0
  242. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_decorators.py +0 -0
  243. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_error_handlers.py +0 -0
  244. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_formatters.py +0 -0
  245. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_serial_number_type.py +0 -0
  246. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_system_function_choice.py +0 -0
  247. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_cli/test_term_commands.py +0 -0
  248. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_connection/__init__.py +0 -0
  249. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_connection/test_connection_init.py +0 -0
  250. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_connection/test_exceptions.py +0 -0
  251. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_encoding/__init__.py +0 -0
  252. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_encoding/test_latin1_edge_cases.py +0 -0
  253. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/__init__.py +0 -0
  254. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_conbus.py +0 -0
  255. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_conbus_client_send.py +0 -0
  256. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_conbus_discover.py +0 -0
  257. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_conbus_linknumber.py +0 -0
  258. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_event_telegram.py +0 -0
  259. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_log_entry.py +0 -0
  260. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_logger_config.py +0 -0
  261. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_module_type.py +0 -0
  262. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_reply_telegram.py +0 -0
  263. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_system_telegram.py +0 -0
  264. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_system_telegram_enhancements.py +0 -0
  265. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_version_telegram.py +0 -0
  266. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_write_config_type.py +0 -0
  267. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_xp20_action_table.py +0 -0
  268. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_xp24_action_table.py +0 -0
  269. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_models/test_xp24_action_telegram.py +0 -0
  270. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/__init__.py +0 -0
  271. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_actiontable_serializer.py +0 -0
  272. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_actiontable_service.py +0 -0
  273. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_actiontable_upload_service.py +0 -0
  274. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_base_server_service.py +0 -0
  275. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_blink_service.py +0 -0
  276. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_checksum_service.py +0 -0
  277. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_client_buffer_manager.py +0 -0
  278. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_event_list_service.py +0 -0
  279. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_event_protocol.py +0 -0
  280. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_event_raw_service.py +0 -0
  281. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_raw_service.py +0 -0
  282. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_receive_service.py +0 -0
  283. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_conbus_reverse_proxy_service.py +0 -0
  284. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_device_service_factory.py +0 -0
  285. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_discovery_service.py +0 -0
  286. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_homekit_cache_service.py +0 -0
  287. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_homekit_config_validator.py +0 -0
  288. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_homekit_conson_service.py +0 -0
  289. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_homekit_services.py +0 -0
  290. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_log_file_service.py +0 -0
  291. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_module_type_service.py +0 -0
  292. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_protocol.py +0 -0
  293. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_protocol_monitor_service.py +0 -0
  294. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_server_service.py +0 -0
  295. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_state_monitor_service.py +0 -0
  296. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_telegram_input_service.py +0 -0
  297. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_telegram_output_service.py +0 -0
  298. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_telegram_protocol.py +0 -0
  299. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_telegram_service.py +0 -0
  300. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_version_service.py +0 -0
  301. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_xp20_action_table_serializer.py +0 -0
  302. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_xp24_action_service.py +0 -0
  303. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_xp24_action_table_serializer.py +0 -0
  304. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_xp24_action_table_service.py +0 -0
  305. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_xp33_action_table_serializer.py +0 -0
  306. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_services/test_xp_server_services.py +0 -0
  307. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_tui/__init__.py +0 -0
  308. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_tui/test_protocol_log.py +0 -0
  309. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_utils/__init__.py +0 -0
  310. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_utils/test_checksum.py +0 -0
  311. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_utils/test_event_helper.py +0 -0
  312. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_utils/test_logging.py +0 -0
  313. {conson_xp-1.32.0 → conson_xp-1.34.0}/tests/unit/test_utils/test_serialization.py +0 -0
  314. {conson_xp-1.32.0 → conson_xp-1.34.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.32.0
3
+ Version: 1.34.0
4
4
  Summary: XP Protocol Communication Tools
5
5
  Author-Email: ldvchosal <ldvchosal@github.com>
6
6
  License: MIT License
@@ -91,6 +91,9 @@ Comprehensive type safety and robust error handling
91
91
  # Install with PIP (recommended)
92
92
  pip install conson-xp
93
93
 
94
+ # Export your Conbus device configuration (recommended first step)
95
+ xp conbus export
96
+
94
97
  # Parse a telegram
95
98
  xp telegram parse "<E14L00I02MAK>"
96
99
 
@@ -133,7 +136,29 @@ xp telegram validate "<E14L00I02MAK>"
133
136
  ```
134
137
 
135
138
  **Device Communication**
139
+
140
+ > **⚠️ Important**: Bridge modules (XP130, XP230) accept **only one TCP connection at a time**.
141
+ > Close any existing connections (including the official app) before using xp commands.
142
+
136
143
  ```bash
144
+ # Export device configuration (RECOMMENDED - run this first!)
145
+ # Discovers all devices and exports complete configuration to export.yml
146
+ xp conbus export
147
+
148
+ # What it does:
149
+ # - Automatically discovers all devices on the Conbus network
150
+ # - Queries 7 datapoints per device (type, version, link number, etc.)
151
+ # - Generates export.yml in conson.yml format
152
+ # - Shows real-time progress for each device
153
+ # - Handles timeouts gracefully with partial exports
154
+ #
155
+ # Example output:
156
+ # Querying device 1/12: 0020041013...
157
+ # ✓ Module type: X130 (1)
158
+ # ✓ Link number: 1
159
+ # ✓ Software version: V2.3
160
+ # Export complete: export.yml (12 devices)
161
+
137
162
  # Discover XP servers on your network
138
163
  xp conbus discover
139
164
 
@@ -38,6 +38,9 @@ Comprehensive type safety and robust error handling
38
38
  # Install with PIP (recommended)
39
39
  pip install conson-xp
40
40
 
41
+ # Export your Conbus device configuration (recommended first step)
42
+ xp conbus export
43
+
41
44
  # Parse a telegram
42
45
  xp telegram parse "<E14L00I02MAK>"
43
46
 
@@ -80,7 +83,29 @@ xp telegram validate "<E14L00I02MAK>"
80
83
  ```
81
84
 
82
85
  **Device Communication**
86
+
87
+ > **⚠️ Important**: Bridge modules (XP130, XP230) accept **only one TCP connection at a time**.
88
+ > Close any existing connections (including the official app) before using xp commands.
89
+
83
90
  ```bash
91
+ # Export device configuration (RECOMMENDED - run this first!)
92
+ # Discovers all devices and exports complete configuration to export.yml
93
+ xp conbus export
94
+
95
+ # What it does:
96
+ # - Automatically discovers all devices on the Conbus network
97
+ # - Queries 7 datapoints per device (type, version, link number, etc.)
98
+ # - Generates export.yml in conson.yml format
99
+ # - Shows real-time progress for each device
100
+ # - Handles timeouts gracefully with partial exports
101
+ #
102
+ # Example output:
103
+ # Querying device 1/12: 0020041013...
104
+ # ✓ Module type: X130 (1)
105
+ # ✓ Link number: 1
106
+ # ✓ Software version: V2.3
107
+ # Export complete: export.yml (12 devices)
108
+
84
109
  # Discover XP servers on your network
85
110
  xp conbus discover
86
111
 
@@ -22,7 +22,7 @@ dependencies = [
22
22
  ]
23
23
  requires-python = ">=3.11"
24
24
  readme = "README.md"
25
- version = "1.32.0"
25
+ version = "1.34.0"
26
26
 
27
27
  [project.license]
28
28
  file = "LICENSE"
@@ -3,7 +3,7 @@
3
3
  conson-xp package.
4
4
  """
5
5
 
6
- __version__ = "1.32.0"
6
+ __version__ = "1.34.0"
7
7
  __manufacturer__ = "salchichon"
8
8
  __model__ = "xp.cli"
9
9
  __serial__ = "2025.09.23.000"
@@ -41,12 +41,15 @@ def send_blink_on_telegram(ctx: Context, serial_number: str) -> None:
41
41
  service_response: Blink response object.
42
42
  """
43
43
  click.echo(json.dumps(service_response.to_dict(), indent=2))
44
+ service.stop_reactor()
44
45
 
45
46
  service: ConbusBlinkService = (
46
47
  ctx.obj.get("container").get_container().resolve(ConbusBlinkService)
47
48
  )
48
49
  with service:
49
- service.send_blink_telegram(serial_number, "on", on_finish, 0.5)
50
+ service.on_finish.connect(on_finish)
51
+ service.send_blink_telegram(serial_number, "on", 0.5)
52
+ service.start_reactor()
50
53
 
51
54
 
52
55
  @conbus_blink.command("off")
@@ -73,12 +76,15 @@ def send_blink_off_telegram(ctx: Context, serial_number: str) -> None:
73
76
  service_response: Blink response object.
74
77
  """
75
78
  click.echo(json.dumps(service_response.to_dict(), indent=2))
79
+ service.stop_reactor()
76
80
 
77
81
  service: ConbusBlinkService = (
78
82
  ctx.obj.get("container").get_container().resolve(ConbusBlinkService)
79
83
  )
80
84
  with service:
81
- service.send_blink_telegram(serial_number, "off", on_finish, 0.5)
85
+ service.on_finish.connect(on_finish)
86
+ service.send_blink_telegram(serial_number, "off", 0.5)
87
+ service.start_reactor()
82
88
 
83
89
 
84
90
  @conbus_blink.group("all", short_help="Control blink state for all devices")
@@ -109,6 +115,7 @@ def blink_all_off(ctx: Context) -> None:
109
115
  discovered_devices: Blink response with all devices.
110
116
  """
111
117
  click.echo(json.dumps(discovered_devices.to_dict(), indent=2))
118
+ service.stop_reactor()
112
119
 
113
120
  def progress(message: str) -> None:
114
121
  """Handle progress updates during blink all off operation.
@@ -116,13 +123,16 @@ def blink_all_off(ctx: Context) -> None:
116
123
  Args:
117
124
  message: Progress message string.
118
125
  """
119
- click.echo(message)
126
+ click.echo(message, nl=False)
120
127
 
121
128
  service: ConbusBlinkAllService = (
122
129
  ctx.obj.get("container").get_container().resolve(ConbusBlinkAllService)
123
130
  )
124
131
  with service:
125
- service.send_blink_all_telegram("off", progress, on_finish, 0.5)
132
+ service.on_progress.connect(progress)
133
+ service.on_finish.connect(on_finish)
134
+ service.send_blink_all_telegram("off", 5)
135
+ service.start_reactor()
126
136
 
127
137
 
128
138
  @conbus_blink_all.command("on", short_help="Turn on blinking for all devices")
@@ -147,6 +157,7 @@ def blink_all_on(ctx: Context) -> None:
147
157
  discovered_devices: Blink response with all devices.
148
158
  """
149
159
  click.echo(json.dumps(discovered_devices.to_dict(), indent=2))
160
+ service.stop_reactor()
150
161
 
151
162
  def progress(message: str) -> None:
152
163
  """Handle progress updates during blink all on operation.
@@ -154,10 +165,13 @@ def blink_all_on(ctx: Context) -> None:
154
165
  Args:
155
166
  message: Progress message string.
156
167
  """
157
- click.echo(message)
168
+ click.echo(message, nl=False)
158
169
 
159
170
  service: ConbusBlinkAllService = (
160
171
  ctx.obj.get("container").get_container().resolve(ConbusBlinkAllService)
161
172
  )
162
173
  with service:
163
- service.send_blink_all_telegram("on", progress, on_finish, 0.5)
174
+ service.on_progress.connect(progress)
175
+ service.on_finish.connect(on_finish)
176
+ service.send_blink_all_telegram("on", 5)
177
+ service.start_reactor()
@@ -6,46 +6,48 @@ blink/unblink telegrams to all discovered modules on the network.
6
6
 
7
7
  import logging
8
8
  from datetime import datetime
9
- from typing import Callable, Optional
9
+ from typing import Any, Optional
10
10
 
11
- from twisted.internet.posixbase import PosixReactorBase
11
+ from psygnal import Signal
12
12
 
13
- from xp.models import ConbusClientConfig
14
13
  from xp.models.conbus.conbus_blink import ConbusBlinkResponse
15
14
  from xp.models.protocol.conbus_protocol import TelegramReceivedEvent
16
15
  from xp.models.telegram.system_function import SystemFunction
17
16
  from xp.models.telegram.telegram_type import TelegramType
18
- from xp.services.protocol import ConbusProtocol
17
+ from xp.services.protocol.conbus_event_protocol import ConbusEventProtocol
19
18
  from xp.services.telegram.telegram_service import TelegramService
20
19
 
21
20
 
22
- class ConbusBlinkAllService(ConbusProtocol):
21
+ class ConbusBlinkAllService:
23
22
  """
24
23
  Service for blinking all modules on Conbus servers.
25
24
 
26
- Uses ConbusProtocol to provide blink/unblink functionality
25
+ Uses ConbusEventProtocol to provide blink/unblink functionality
27
26
  for all discovered modules on the network.
27
+
28
+ Attributes:
29
+ on_progress: Signal emitted during blink operation progress (with message).
30
+ on_finish: Signal emitted when blink operation completes (with response).
28
31
  """
29
32
 
33
+ on_progress: Signal = Signal(str)
34
+ on_finish: Signal = Signal(ConbusBlinkResponse)
35
+
30
36
  def __init__(
31
37
  self,
38
+ conbus_protocol: ConbusEventProtocol,
32
39
  telegram_service: TelegramService,
33
- cli_config: ConbusClientConfig,
34
- reactor: PosixReactorBase,
35
40
  ) -> None:
36
41
  """Initialize the Conbus blink all service.
37
42
 
38
43
  Args:
44
+ conbus_protocol: ConbusEventProtocol instance for communication.
39
45
  telegram_service: Service for parsing telegrams.
40
- cli_config: Configuration for Conbus client connection.
41
- reactor: Twisted reactor for event loop.
42
46
  """
43
- super().__init__(cli_config, reactor)
47
+ self.conbus_protocol = conbus_protocol
44
48
  self.telegram_service = telegram_service
45
49
  self.serial_number: str = ""
46
50
  self.on_or_off = "none"
47
- self.progress_callback: Optional[Callable[[str], None]] = None
48
- self.finish_callback: Optional[Callable[[ConbusBlinkResponse], None]] = None
49
51
  self.service_response: ConbusBlinkResponse = ConbusBlinkResponse(
50
52
  success=False,
51
53
  serial_number=self.serial_number,
@@ -56,17 +58,23 @@ class ConbusBlinkAllService(ConbusProtocol):
56
58
  # Set up logging
57
59
  self.logger = logging.getLogger(__name__)
58
60
 
59
- def connection_established(self) -> None:
60
- """Handle connection established event."""
61
+ # Connect protocol signals
62
+ self.conbus_protocol.on_connection_made.connect(self.connection_made)
63
+ self.conbus_protocol.on_telegram_sent.connect(self.telegram_sent)
64
+ self.conbus_protocol.on_telegram_received.connect(self.telegram_received)
65
+ self.conbus_protocol.on_timeout.connect(self.timeout)
66
+ self.conbus_protocol.on_failed.connect(self.failed)
67
+
68
+ def connection_made(self) -> None:
69
+ """Handle connection made event."""
61
70
  self.logger.debug("Connection established, send discover telegram.")
62
- self.send_telegram(
71
+ self.conbus_protocol.send_telegram(
63
72
  telegram_type=TelegramType.SYSTEM,
64
73
  serial_number="0000000000",
65
74
  system_function=SystemFunction.DISCOVERY,
66
75
  data_value="00",
67
76
  )
68
- if self.progress_callback:
69
- self.progress_callback(".")
77
+ self.on_progress.emit(".")
70
78
 
71
79
  def send_blink(self, serial_number: str) -> None:
72
80
  """Send blink or unblink telegram to a discovered module.
@@ -81,7 +89,7 @@ class ConbusBlinkAllService(ConbusProtocol):
81
89
  if self.on_or_off.lower() == "on":
82
90
  system_function = SystemFunction.BLINK
83
91
 
84
- self.send_telegram(
92
+ self.conbus_protocol.send_telegram(
85
93
  telegram_type=TelegramType.SYSTEM,
86
94
  serial_number=serial_number,
87
95
  system_function=system_function,
@@ -90,8 +98,7 @@ class ConbusBlinkAllService(ConbusProtocol):
90
98
  self.service_response.system_function = system_function
91
99
  self.service_response.operation = self.on_or_off
92
100
 
93
- if self.progress_callback:
94
- self.progress_callback(".")
101
+ self.on_progress.emit(".")
95
102
 
96
103
  def telegram_sent(self, telegram_sent: str) -> None:
97
104
  """Handle telegram sent event.
@@ -129,8 +136,7 @@ class ConbusBlinkAllService(ConbusProtocol):
129
136
  ):
130
137
  self.logger.debug("Received discovery response")
131
138
  self.send_blink(reply_telegram.serial_number)
132
- if self.progress_callback:
133
- self.progress_callback(".")
139
+ self.on_progress.emit(".")
134
140
  return
135
141
 
136
142
  if reply_telegram and reply_telegram.system_function in (
@@ -138,12 +144,18 @@ class ConbusBlinkAllService(ConbusProtocol):
138
144
  SystemFunction.UNBLINK,
139
145
  ):
140
146
  self.logger.debug("Received blink response")
141
- if self.progress_callback:
142
- self.progress_callback(".")
147
+ self.on_progress.emit(".")
143
148
  return
144
149
 
145
150
  self.logger.debug("Received unexpected response")
146
151
 
152
+ def timeout(self) -> None:
153
+ """Handle timeout event to stop operation."""
154
+ self.logger.info("Blink all operation timeout")
155
+ self.service_response.success = False
156
+ self.service_response.error = "Blink all operation timeout"
157
+ self.on_finish.emit(self.service_response)
158
+
147
159
  def failed(self, message: str) -> None:
148
160
  """Handle failed connection event.
149
161
 
@@ -154,28 +166,70 @@ class ConbusBlinkAllService(ConbusProtocol):
154
166
  self.service_response.success = False
155
167
  self.service_response.timestamp = datetime.now()
156
168
  self.service_response.error = message
157
- if self.finish_callback:
158
- self.finish_callback(self.service_response)
169
+ self.on_finish.emit(self.service_response)
159
170
 
160
171
  def send_blink_all_telegram(
161
172
  self,
162
173
  on_or_off: str,
163
- progress_callback: Callable[[str], None],
164
- finish_callback: Callable[[ConbusBlinkResponse], None],
165
174
  timeout_seconds: Optional[float] = None,
166
175
  ) -> None:
167
176
  """Send blink command to all discovered modules.
168
177
 
169
178
  Args:
170
179
  on_or_off: "on" to blink or "off" to unblink all devices.
171
- progress_callback: Callback function to call with progress updates.
172
- finish_callback: Callback function to call when the operation completes.
173
180
  timeout_seconds: Timeout in seconds.
174
181
  """
175
182
  self.logger.info("Starting send_blink_all_telegram")
176
183
  if timeout_seconds:
177
- self.timeout_seconds = timeout_seconds
178
- self.progress_callback = progress_callback
179
- self.finish_callback = finish_callback
184
+ self.conbus_protocol.timeout_seconds = timeout_seconds
180
185
  self.on_or_off = on_or_off
181
- self.start_reactor()
186
+ # Caller invokes start_reactor()
187
+
188
+ def set_timeout(self, timeout_seconds: float) -> None:
189
+ """Set operation timeout.
190
+
191
+ Args:
192
+ timeout_seconds: Timeout in seconds.
193
+ """
194
+ self.conbus_protocol.timeout_seconds = timeout_seconds
195
+
196
+ def start_reactor(self) -> None:
197
+ """Start the reactor."""
198
+ self.conbus_protocol.start_reactor()
199
+
200
+ def stop_reactor(self) -> None:
201
+ """Stop the reactor."""
202
+ self.conbus_protocol.stop_reactor()
203
+
204
+ def __enter__(self) -> "ConbusBlinkAllService":
205
+ """Enter context manager - reset state for singleton reuse.
206
+
207
+ Returns:
208
+ Self for context manager protocol.
209
+ """
210
+ # Reset state for singleton reuse
211
+ self.service_response = ConbusBlinkResponse(
212
+ success=False,
213
+ serial_number="",
214
+ system_function=SystemFunction.NONE,
215
+ operation="none",
216
+ )
217
+ self.serial_number = ""
218
+ self.on_or_off = "none"
219
+ return self
220
+
221
+ def __exit__(
222
+ self, _exc_type: Optional[type], _exc_val: Optional[Exception], _exc_tb: Any
223
+ ) -> None:
224
+ """Exit context manager - cleanup signals and reactor."""
225
+ # Disconnect protocol signals
226
+ self.conbus_protocol.on_connection_made.disconnect(self.connection_made)
227
+ self.conbus_protocol.on_telegram_sent.disconnect(self.telegram_sent)
228
+ self.conbus_protocol.on_telegram_received.disconnect(self.telegram_received)
229
+ self.conbus_protocol.on_timeout.disconnect(self.timeout)
230
+ self.conbus_protocol.on_failed.disconnect(self.failed)
231
+ # Disconnect service signals
232
+ self.on_progress.disconnect()
233
+ self.on_finish.disconnect()
234
+ # Stop reactor
235
+ self.stop_reactor()
@@ -6,45 +6,46 @@ blink/unblink telegrams to control module LED indicators.
6
6
 
7
7
  import logging
8
8
  from datetime import datetime
9
- from typing import Callable, Optional
9
+ from typing import Any, Optional
10
10
 
11
- from twisted.internet.posixbase import PosixReactorBase
11
+ from psygnal import Signal
12
12
 
13
- from xp.models import ConbusClientConfig
14
13
  from xp.models.conbus.conbus_blink import ConbusBlinkResponse
15
14
  from xp.models.protocol.conbus_protocol import TelegramReceivedEvent
16
15
  from xp.models.telegram.system_function import SystemFunction
17
16
  from xp.models.telegram.telegram_type import TelegramType
18
- from xp.services.protocol import ConbusProtocol
17
+ from xp.services.protocol.conbus_event_protocol import ConbusEventProtocol
19
18
  from xp.services.telegram.telegram_service import TelegramService
20
19
 
21
20
 
22
- class ConbusBlinkService(ConbusProtocol):
21
+ class ConbusBlinkService:
23
22
  """
24
23
  Service for blinking module LEDs on Conbus servers.
25
24
 
26
- Uses ConbusProtocol to provide blink/unblink functionality
25
+ Uses ConbusEventProtocol to provide blink/unblink functionality
27
26
  for controlling module LED indicators.
27
+
28
+ Attributes:
29
+ on_finish: Signal emitted when blink operation completes (with response).
28
30
  """
29
31
 
32
+ on_finish: Signal = Signal(ConbusBlinkResponse)
33
+
30
34
  def __init__(
31
35
  self,
36
+ conbus_protocol: ConbusEventProtocol,
32
37
  telegram_service: TelegramService,
33
- cli_config: ConbusClientConfig,
34
- reactor: PosixReactorBase,
35
38
  ) -> None:
36
39
  """Initialize the Conbus blink service.
37
40
 
38
41
  Args:
42
+ conbus_protocol: ConbusEventProtocol instance for communication.
39
43
  telegram_service: Service for parsing telegrams.
40
- cli_config: Configuration for Conbus client connection.
41
- reactor: Twisted reactor for event loop.
42
44
  """
43
- super().__init__(cli_config, reactor)
45
+ self.conbus_protocol = conbus_protocol
44
46
  self.telegram_service = telegram_service
45
47
  self.serial_number: str = ""
46
48
  self.on_or_off = "none"
47
- self.finish_callback: Optional[Callable[[ConbusBlinkResponse], None]] = None
48
49
  self.service_response: ConbusBlinkResponse = ConbusBlinkResponse(
49
50
  success=False,
50
51
  serial_number=self.serial_number,
@@ -55,15 +56,22 @@ class ConbusBlinkService(ConbusProtocol):
55
56
  # Set up logging
56
57
  self.logger = logging.getLogger(__name__)
57
58
 
58
- def connection_established(self) -> None:
59
- """Handle connection established event."""
59
+ # Connect signals
60
+ self.conbus_protocol.on_connection_made.connect(self.connection_made)
61
+ self.conbus_protocol.on_telegram_sent.connect(self.telegram_sent)
62
+ self.conbus_protocol.on_telegram_received.connect(self.telegram_received)
63
+ self.conbus_protocol.on_timeout.connect(self.timeout)
64
+ self.conbus_protocol.on_failed.connect(self.failed)
65
+
66
+ def connection_made(self) -> None:
67
+ """Handle connection made event."""
60
68
  self.logger.debug("Connection established, sending blink command.")
61
69
  # Blink is 05, Unblink is 06
62
70
  system_function = SystemFunction.UNBLINK
63
71
  if self.on_or_off.lower() == "on":
64
72
  system_function = SystemFunction.BLINK
65
73
 
66
- self.send_telegram(
74
+ self.conbus_protocol.send_telegram(
67
75
  telegram_type=TelegramType.SYSTEM,
68
76
  serial_number=self.serial_number,
69
77
  system_function=system_function,
@@ -113,8 +121,14 @@ class ConbusBlinkService(ConbusProtocol):
113
121
  self.service_response.serial_number = self.serial_number
114
122
  self.service_response.reply_telegram = reply_telegram
115
123
 
116
- if self.finish_callback:
117
- self.finish_callback(self.service_response)
124
+ self.on_finish.emit(self.service_response)
125
+
126
+ def timeout(self) -> None:
127
+ """Handle timeout event to stop operation."""
128
+ self.logger.info("Blink operation timeout")
129
+ self.service_response.success = False
130
+ self.service_response.error = "Blink operation timeout"
131
+ self.on_finish.emit(self.service_response)
118
132
 
119
133
  def failed(self, message: str) -> None:
120
134
  """Handle failed connection event.
@@ -126,14 +140,12 @@ class ConbusBlinkService(ConbusProtocol):
126
140
  self.service_response.success = False
127
141
  self.service_response.timestamp = datetime.now()
128
142
  self.service_response.error = message
129
- if self.finish_callback:
130
- self.finish_callback(self.service_response)
143
+ self.on_finish.emit(self.service_response)
131
144
 
132
145
  def send_blink_telegram(
133
146
  self,
134
147
  serial_number: str,
135
148
  on_or_off: str,
136
- finish_callback: Callable[[ConbusBlinkResponse], None],
137
149
  timeout_seconds: Optional[float] = None,
138
150
  ) -> None:
139
151
  r"""Send blink command to start blinking module LED.
@@ -141,7 +153,6 @@ class ConbusBlinkService(ConbusProtocol):
141
153
  Args:
142
154
  serial_number: 10-digit module serial number.
143
155
  on_or_off: "on" to blink or "off" to unblink.
144
- finish_callback: Callback function to call when the reply is received.
145
156
  timeout_seconds: Timeout in seconds.
146
157
 
147
158
  Examples:
@@ -151,8 +162,55 @@ class ConbusBlinkService(ConbusProtocol):
151
162
  """
152
163
  self.logger.info("Starting send_blink_telegram")
153
164
  if timeout_seconds:
154
- self.timeout_seconds = timeout_seconds
155
- self.finish_callback = finish_callback
165
+ self.conbus_protocol.timeout_seconds = timeout_seconds
156
166
  self.serial_number = serial_number
157
167
  self.on_or_off = on_or_off
158
- self.start_reactor()
168
+ # Caller invokes start_reactor()
169
+
170
+ def set_timeout(self, timeout_seconds: float) -> None:
171
+ """Set operation timeout.
172
+
173
+ Args:
174
+ timeout_seconds: Timeout in seconds.
175
+ """
176
+ self.conbus_protocol.timeout_seconds = timeout_seconds
177
+
178
+ def start_reactor(self) -> None:
179
+ """Start the reactor."""
180
+ self.conbus_protocol.start_reactor()
181
+
182
+ def stop_reactor(self) -> None:
183
+ """Stop the reactor."""
184
+ self.conbus_protocol.stop_reactor()
185
+
186
+ def __enter__(self) -> "ConbusBlinkService":
187
+ """Enter context manager - reset state for singleton reuse.
188
+
189
+ Returns:
190
+ Self for context manager protocol.
191
+ """
192
+ # Reset state for singleton reuse
193
+ self.service_response = ConbusBlinkResponse(
194
+ success=False,
195
+ serial_number="",
196
+ system_function=SystemFunction.NONE,
197
+ operation="none",
198
+ )
199
+ self.serial_number = ""
200
+ self.on_or_off = "none"
201
+ return self
202
+
203
+ def __exit__(
204
+ self, _exc_type: Optional[type], _exc_val: Optional[Exception], _exc_tb: Any
205
+ ) -> None:
206
+ """Exit context manager - cleanup signals and reactor."""
207
+ # Disconnect protocol signals
208
+ self.conbus_protocol.on_connection_made.disconnect(self.connection_made)
209
+ self.conbus_protocol.on_telegram_sent.disconnect(self.telegram_sent)
210
+ self.conbus_protocol.on_telegram_received.disconnect(self.telegram_received)
211
+ self.conbus_protocol.on_timeout.disconnect(self.timeout)
212
+ self.conbus_protocol.on_failed.disconnect(self.failed)
213
+ # Disconnect service signals
214
+ self.on_finish.disconnect()
215
+ # Stop reactor
216
+ self.stop_reactor()