conson-xp 1.52.0__tar.gz → 2.0.1__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 (329) hide show
  1. {conson_xp-1.52.0 → conson_xp-2.0.1}/PKG-INFO +1 -11
  2. {conson_xp-1.52.0 → conson_xp-2.0.1}/README.md +0 -9
  3. {conson_xp-1.52.0 → conson_xp-2.0.1}/pyproject.toml +1 -2
  4. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/__init__.py +1 -1
  5. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/__init__.py +0 -4
  6. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/term/term_commands.py +1 -1
  7. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/main.py +23 -7
  8. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_client_config.py +2 -0
  9. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/protocol/conbus_protocol.py +30 -25
  10. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/accessory_state.py +1 -1
  11. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/protocol/__init__.py +2 -3
  12. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/protocol/conbus_event_protocol.py +6 -6
  13. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/term/homekit_accessory_driver.py +5 -2
  14. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/term/homekit_service.py +118 -11
  15. conson_xp-2.0.1/src/xp/term/homekit.py +248 -0
  16. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/homekit.tcss +4 -4
  17. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/widgets/room_list.py +61 -3
  18. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/dependencies.py +24 -154
  19. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_homekit_service.py +43 -11
  20. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_tui/test_homekit_app.py +63 -18
  21. conson_xp-1.52.0/src/xp/cli/commands/homekit/__init__.py +0 -3
  22. conson_xp-1.52.0/src/xp/cli/commands/homekit/homekit.py +0 -120
  23. conson_xp-1.52.0/src/xp/cli/commands/homekit/homekit_start_commands.py +0 -44
  24. conson_xp-1.52.0/src/xp/services/homekit/__init__.py +0 -1
  25. conson_xp-1.52.0/src/xp/services/homekit/homekit_cache_service.py +0 -313
  26. conson_xp-1.52.0/src/xp/services/homekit/homekit_conbus_service.py +0 -99
  27. conson_xp-1.52.0/src/xp/services/homekit/homekit_config_validator.py +0 -327
  28. conson_xp-1.52.0/src/xp/services/homekit/homekit_conson_validator.py +0 -130
  29. conson_xp-1.52.0/src/xp/services/homekit/homekit_dimminglight.py +0 -189
  30. conson_xp-1.52.0/src/xp/services/homekit/homekit_dimminglight_service.py +0 -155
  31. conson_xp-1.52.0/src/xp/services/homekit/homekit_hap_service.py +0 -351
  32. conson_xp-1.52.0/src/xp/services/homekit/homekit_lightbulb.py +0 -125
  33. conson_xp-1.52.0/src/xp/services/homekit/homekit_lightbulb_service.py +0 -91
  34. conson_xp-1.52.0/src/xp/services/homekit/homekit_module_service.py +0 -60
  35. conson_xp-1.52.0/src/xp/services/homekit/homekit_outlet.py +0 -175
  36. conson_xp-1.52.0/src/xp/services/homekit/homekit_outlet_service.py +0 -127
  37. conson_xp-1.52.0/src/xp/services/homekit/homekit_service.py +0 -371
  38. conson_xp-1.52.0/src/xp/services/protocol/protocol_factory.py +0 -84
  39. conson_xp-1.52.0/src/xp/services/protocol/telegram_protocol.py +0 -270
  40. conson_xp-1.52.0/src/xp/term/homekit.py +0 -116
  41. conson_xp-1.52.0/tests/integration/test_homekit_config_integration.py +0 -318
  42. conson_xp-1.52.0/tests/unit/test_services/test_homekit_cache_service.py +0 -412
  43. conson_xp-1.52.0/tests/unit/test_services/test_homekit_config_validator.py +0 -489
  44. conson_xp-1.52.0/tests/unit/test_services/test_homekit_conson_service.py +0 -299
  45. conson_xp-1.52.0/tests/unit/test_services/test_homekit_services.py +0 -745
  46. conson_xp-1.52.0/tests/unit/test_services/test_protocol.py +0 -405
  47. conson_xp-1.52.0/tests/unit/test_services/test_telegram_protocol.py +0 -313
  48. {conson_xp-1.52.0 → conson_xp-2.0.1}/LICENSE +0 -0
  49. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/__init__.py +0 -0
  50. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/__main__.py +0 -0
  51. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/__init__.py +0 -0
  52. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus.py +0 -0
  53. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_actiontable_commands.py +0 -0
  54. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_autoreport_commands.py +0 -0
  55. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_blink_commands.py +0 -0
  56. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_config_commands.py +0 -0
  57. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_custom_commands.py +0 -0
  58. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_datapoint_commands.py +0 -0
  59. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_discover_commands.py +0 -0
  60. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_event_commands.py +0 -0
  61. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_export_commands.py +0 -0
  62. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_lightlevel_commands.py +0 -0
  63. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_linknumber_commands.py +0 -0
  64. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_modulenumber_commands.py +0 -0
  65. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_msactiontable_commands.py +0 -0
  66. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_output_commands.py +0 -0
  67. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_raw_commands.py +0 -0
  68. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_receive_commands.py +0 -0
  69. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/conbus/conbus_scan_commands.py +0 -0
  70. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/file_commands.py +0 -0
  71. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/module_commands.py +0 -0
  72. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/reverse_proxy_commands.py +0 -0
  73. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/server/__init__.py +0 -0
  74. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/server/server_commands.py +0 -0
  75. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/__init__.py +0 -0
  76. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram.py +0 -0
  77. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram_blink_commands.py +0 -0
  78. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram_checksum_commands.py +0 -0
  79. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram_discover_commands.py +0 -0
  80. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram_linknumber_commands.py +0 -0
  81. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram_parse_commands.py +0 -0
  82. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/telegram/telegram_version_commands.py +0 -0
  83. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/term/__init__.py +0 -0
  84. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/commands/term/term.py +0 -0
  85. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/__init__.py +0 -0
  86. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/click_tree.py +0 -0
  87. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/datapoint_type_choice.py +0 -0
  88. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/decorators.py +0 -0
  89. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/error_handlers.py +0 -0
  90. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/formatters.py +0 -0
  91. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/module_type_choice.py +0 -0
  92. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/serial_number_type.py +0 -0
  93. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/cli/utils/system_function_choice.py +0 -0
  94. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/__init__.py +0 -0
  95. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/actiontable/__init__.py +0 -0
  96. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/actiontable/actiontable.py +0 -0
  97. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/actiontable/actiontable_type.py +0 -0
  98. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/actiontable/msactiontable_xp20.py +0 -0
  99. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/actiontable/msactiontable_xp24.py +0 -0
  100. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/actiontable/msactiontable_xp33.py +0 -0
  101. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/__init__.py +0 -0
  102. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus.py +0 -0
  103. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_autoreport.py +0 -0
  104. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_blink.py +0 -0
  105. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_connection_status.py +0 -0
  106. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_custom.py +0 -0
  107. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_datapoint.py +0 -0
  108. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_discover.py +0 -0
  109. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_event_list.py +0 -0
  110. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_event_raw.py +0 -0
  111. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_export.py +0 -0
  112. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_lightlevel.py +0 -0
  113. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_linknumber.py +0 -0
  114. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_logger_config.py +0 -0
  115. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_output.py +0 -0
  116. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_raw.py +0 -0
  117. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_receive.py +0 -0
  118. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/conbus/conbus_writeconfig.py +0 -0
  119. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/config/__init__.py +0 -0
  120. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/config/conson_module_config.py +0 -0
  121. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/homekit/__init__.py +0 -0
  122. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/homekit/homekit_accessory.py +0 -0
  123. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/homekit/homekit_config.py +0 -0
  124. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/log_entry.py +0 -0
  125. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/protocol/__init__.py +0 -0
  126. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/response.py +0 -0
  127. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/__init__.py +0 -0
  128. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/action_type.py +0 -0
  129. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/datapoint_type.py +0 -0
  130. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/event_telegram.py +0 -0
  131. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/event_type.py +0 -0
  132. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/input_action_type.py +0 -0
  133. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/input_type.py +0 -0
  134. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/module_type.py +0 -0
  135. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/module_type_code.py +0 -0
  136. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/output_telegram.py +0 -0
  137. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/reply_telegram.py +0 -0
  138. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/system_function.py +0 -0
  139. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/system_telegram.py +0 -0
  140. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/telegram.py +0 -0
  141. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/telegram_type.py +0 -0
  142. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/telegram/timeparam_type.py +0 -0
  143. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/__init__.py +0 -0
  144. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/connection_state.py +0 -0
  145. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/module_state.py +0 -0
  146. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/protocol_keys_config.py +0 -0
  147. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/status_message.py +0 -0
  148. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/term/telegram_display.py +0 -0
  149. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/models/write_config_type.py +0 -0
  150. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/__init__.py +0 -0
  151. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/__init__.py +0 -0
  152. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/actiontable_serializer.py +0 -0
  153. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/download_state_machine.py +0 -0
  154. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/msactiontable_serializer.py +0 -0
  155. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/msactiontable_xp20_serializer.py +0 -0
  156. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/msactiontable_xp24_serializer.py +0 -0
  157. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/msactiontable_xp33_serializer.py +0 -0
  158. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/actiontable/serializer_protocol.py +0 -0
  159. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/__init__.py +0 -0
  160. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/actiontable/__init__.py +0 -0
  161. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/actiontable/actiontable_download_service.py +0 -0
  162. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/actiontable/actiontable_list_service.py +0 -0
  163. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/actiontable/actiontable_show_service.py +0 -0
  164. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/actiontable/actiontable_upload_service.py +0 -0
  165. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_blink_all_service.py +0 -0
  166. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_blink_service.py +0 -0
  167. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_custom_service.py +0 -0
  168. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_datapoint_queryall_service.py +0 -0
  169. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_datapoint_service.py +0 -0
  170. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_discover_service.py +0 -0
  171. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_event_list_service.py +0 -0
  172. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_event_raw_service.py +0 -0
  173. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_export_actiontable_service.py +0 -0
  174. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_export_service.py +0 -0
  175. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_output_service.py +0 -0
  176. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_raw_service.py +0 -0
  177. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_receive_service.py +0 -0
  178. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/conbus_scan_service.py +0 -0
  179. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/conbus/write_config_service.py +0 -0
  180. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/log_file_service.py +0 -0
  181. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/module_type_service.py +0 -0
  182. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/reverse_proxy_service.py +0 -0
  183. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/__init__.py +0 -0
  184. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/base_server_service.py +0 -0
  185. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/client_buffer_manager.py +0 -0
  186. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/cp20_server_service.py +0 -0
  187. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/device_service_factory.py +0 -0
  188. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/server_service.py +0 -0
  189. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/xp130_server_service.py +0 -0
  190. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/xp20_server_service.py +0 -0
  191. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/xp230_server_service.py +0 -0
  192. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/xp24_server_service.py +0 -0
  193. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/server/xp33_server_service.py +0 -0
  194. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/__init__.py +0 -0
  195. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_blink_service.py +0 -0
  196. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_checksum_service.py +0 -0
  197. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_datapoint_service.py +0 -0
  198. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_discover_service.py +0 -0
  199. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_link_number_service.py +0 -0
  200. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_output_service.py +0 -0
  201. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_service.py +0 -0
  202. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/telegram/telegram_version_service.py +0 -0
  203. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/term/__init__.py +0 -0
  204. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/term/protocol_monitor_service.py +0 -0
  205. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/services/term/state_monitor_service.py +0 -0
  206. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/__init__.py +0 -0
  207. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/protocol.py +0 -0
  208. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/protocol.tcss +0 -0
  209. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/state.py +0 -0
  210. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/state.tcss +0 -0
  211. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/widgets/__init__.py +0 -0
  212. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/widgets/help_menu.py +0 -0
  213. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/widgets/modules_list.py +0 -0
  214. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/widgets/protocol_log.py +0 -0
  215. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/term/widgets/status_footer.py +0 -0
  216. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/__init__.py +0 -0
  217. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/checksum.py +0 -0
  218. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/event_helper.py +0 -0
  219. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/logging.py +0 -0
  220. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/serialization.py +0 -0
  221. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/state_machine.py +0 -0
  222. {conson_xp-1.52.0 → conson_xp-2.0.1}/src/xp/utils/time_utils.py +0 -0
  223. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/.coverage +0 -0
  224. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/__init__.py +0 -0
  225. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/conftest.py +0 -0
  226. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/.coverage +0 -0
  227. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/__init__.py +0 -0
  228. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/telegram_test_data.py +0 -0
  229. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_actiontable_integration.py +0 -0
  230. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_api/.coverage +0 -0
  231. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_api/__init__.py +0 -0
  232. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_blink_integration.py +0 -0
  233. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_checksum_integration.py +0 -0
  234. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_conbus_blink_integration.py +0 -0
  235. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_conbus_datapoint_integration.py +0 -0
  236. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_conbus_raw_integration.py +0 -0
  237. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_conbus_receive_integration.py +0 -0
  238. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_discovery_integration.py +0 -0
  239. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_event_telegram_integration.py +0 -0
  240. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_link_number_integration.py +0 -0
  241. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_module_integration.py +0 -0
  242. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_output_integration.py +0 -0
  243. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_reverse_proxy_integration.py +0 -0
  244. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_system_reply_telegram_integration.py +0 -0
  245. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_term_logging_integration.py +0 -0
  246. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_version_integration.py +0 -0
  247. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_xp20_action_table_integration.py +0 -0
  248. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/integration/test_xp24_action_table_integration.py +0 -0
  249. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/__init__.py +0 -0
  250. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_api/__init__.py +0 -0
  251. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/__init__.py +0 -0
  252. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_click_tree.py +0 -0
  253. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_conbus_actiontable_commands.py +0 -0
  254. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_conbus_blink_commands.py +0 -0
  255. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_conbus_msactiontable_upload_commands.py +0 -0
  256. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_datapoint_type_choice.py +0 -0
  257. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_decorators.py +0 -0
  258. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_error_handlers.py +0 -0
  259. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_formatters.py +0 -0
  260. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_serial_number_type.py +0 -0
  261. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_system_function_choice.py +0 -0
  262. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_cli/test_term_commands.py +0 -0
  263. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_encoding/__init__.py +0 -0
  264. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_encoding/test_latin1_edge_cases.py +0 -0
  265. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/__init__.py +0 -0
  266. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_conbus.py +0 -0
  267. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_conbus_client_send.py +0 -0
  268. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_conbus_discover.py +0 -0
  269. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_conbus_linknumber.py +0 -0
  270. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_event_telegram.py +0 -0
  271. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_log_entry.py +0 -0
  272. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_logger_config.py +0 -0
  273. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_module_type.py +0 -0
  274. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_reply_telegram.py +0 -0
  275. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_system_telegram.py +0 -0
  276. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_system_telegram_enhancements.py +0 -0
  277. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_term/__init__.py +0 -0
  278. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_term/test_accessory_state.py +0 -0
  279. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_version_telegram.py +0 -0
  280. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_write_config_type.py +0 -0
  281. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_xp20_action_table.py +0 -0
  282. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_xp24_action_table.py +0 -0
  283. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_xp24_action_table_short_format.py +0 -0
  284. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_models/test_xp24_action_telegram.py +0 -0
  285. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/__init__.py +0 -0
  286. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_actiontable_download_service.py +0 -0
  287. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_actiontable_serializer.py +0 -0
  288. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_actiontable_service.py +0 -0
  289. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_actiontable_upload_service.py +0 -0
  290. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_base_server_service.py +0 -0
  291. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_blink_service.py +0 -0
  292. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_checksum_service.py +0 -0
  293. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_client_buffer_manager.py +0 -0
  294. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_blink_service.py +0 -0
  295. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_event_list_service.py +0 -0
  296. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_event_protocol.py +0 -0
  297. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_event_raw_service.py +0 -0
  298. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_output_service.py +0 -0
  299. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_raw_service.py +0 -0
  300. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_receive_service.py +0 -0
  301. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_reverse_proxy_service.py +0 -0
  302. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_conbus_scan_service.py +0 -0
  303. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_device_service_factory.py +0 -0
  304. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_discovery_service.py +0 -0
  305. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_log_file_service.py +0 -0
  306. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_module_type_service.py +0 -0
  307. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_protocol_monitor_service.py +0 -0
  308. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_server_service.py +0 -0
  309. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_state_monitor_service.py +0 -0
  310. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_telegram_input_service.py +0 -0
  311. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_telegram_output_service.py +0 -0
  312. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_telegram_service.py +0 -0
  313. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_version_service.py +0 -0
  314. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp20_action_table_serializer.py +0 -0
  315. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp24_action_service.py +0 -0
  316. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp24_action_table_serializer.py +0 -0
  317. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp24_action_table_service.py +0 -0
  318. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp33_action_table_serializer.py +0 -0
  319. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp33_short_format.py +0 -0
  320. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_services/test_xp_server_services.py +0 -0
  321. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_tui/__init__.py +0 -0
  322. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_tui/test_protocol_log.py +0 -0
  323. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_tui/test_room_list.py +0 -0
  324. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_utils/__init__.py +0 -0
  325. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_utils/test_checksum.py +0 -0
  326. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_utils/test_event_helper.py +0 -0
  327. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_utils/test_logging.py +0 -0
  328. {conson_xp-1.52.0 → conson_xp-2.0.1}/tests/unit/test_utils/test_serialization.py +0 -0
  329. {conson_xp-1.52.0 → conson_xp-2.0.1}/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.52.0
3
+ Version: 2.0.1
4
4
  Summary: XP Protocol Communication Tools
5
5
  Author-Email: ldvchosal <ldvchosal@github.com>
6
6
  License: MIT License
@@ -46,7 +46,6 @@ Requires-Dist: pydantic>=2.11
46
46
  Requires-Dist: HAP-python[QRCode]>=5.0.0
47
47
  Requires-Dist: punq>=0.7.0
48
48
  Requires-Dist: twisted>=25.5.0
49
- Requires-Dist: bubus>=1.5.6
50
49
  Requires-Dist: psygnal>=0.15.0
51
50
  Requires-Dist: textual>=1.0.0
52
51
  Requires-Dist: python-statemachine>=2.5.0
@@ -399,15 +398,6 @@ xp file validate
399
398
 
400
399
  xp help
401
400
 
402
- xp homekit
403
-
404
- xp homekit config
405
- xp homekit config show
406
- xp homekit config validate
407
-
408
- xp homekit start
409
-
410
-
411
401
  xp module
412
402
  xp module categories
413
403
  xp module info
@@ -345,15 +345,6 @@ xp file validate
345
345
 
346
346
  xp help
347
347
 
348
- xp homekit
349
-
350
- xp homekit config
351
- xp homekit config show
352
- xp homekit config validate
353
-
354
- xp homekit start
355
-
356
-
357
348
  xp module
358
349
  xp module categories
359
350
  xp module info
@@ -16,14 +16,13 @@ dependencies = [
16
16
  "HAP-python[QRCode]>=5.0.0",
17
17
  "punq>=0.7.0",
18
18
  "twisted>=25.5.0",
19
- "bubus>=1.5.6",
20
19
  "psygnal>=0.15.0",
21
20
  "textual>=1.0.0",
22
21
  "python-statemachine>=2.5.0",
23
22
  ]
24
23
  requires-python = ">=3.11"
25
24
  readme = "README.md"
26
- version = "1.52.0"
25
+ version = "2.0.1"
27
26
 
28
27
  [project.license]
29
28
  file = "LICENSE"
@@ -4,7 +4,7 @@ XP CLI tool for remote console bus operations.
4
4
  conson-xp package.
5
5
  """
6
6
 
7
- __version__ = "1.52.0"
7
+ __version__ = "2.0.1"
8
8
  __manufacturer__ = "salchichon"
9
9
  __model__ = "xp.cli"
10
10
  __serial__ = "2025.09.23.000"
@@ -66,8 +66,6 @@ from xp.cli.commands.conbus.conbus_raw_commands import send_raw_telegrams
66
66
  from xp.cli.commands.conbus.conbus_receive_commands import receive_telegrams
67
67
  from xp.cli.commands.conbus.conbus_scan_commands import scan_module
68
68
  from xp.cli.commands.file_commands import file
69
- from xp.cli.commands.homekit.homekit import homekit
70
- from xp.cli.commands.homekit.homekit_start_commands import homekit_start
71
69
  from xp.cli.commands.module_commands import module
72
70
  from xp.cli.commands.reverse_proxy_commands import reverse_proxy
73
71
  from xp.cli.commands.server.server_commands import server
@@ -111,8 +109,6 @@ __all__ = [
111
109
  "linknumber",
112
110
  "blink",
113
111
  "checksum",
114
- "homekit",
115
- "homekit_start",
116
112
  "term",
117
113
  # Individual command functions
118
114
  "protocol_monitor",
@@ -57,7 +57,7 @@ def homekit_monitor(ctx: Context) -> None:
57
57
  Start TUI for HomeKit accessory monitoring.
58
58
 
59
59
  Displays HomeKit rooms and accessories with real-time state updates
60
- in an interactive terminal interface. Press action keys (a-z) to
60
+ in an interactive terminal interface. Press action keys (a-z0-9) to
61
61
  toggle accessories.
62
62
 
63
63
  Args:
@@ -3,8 +3,6 @@
3
3
  import click
4
4
  from click_help_colors import HelpColorsGroup
5
5
 
6
- from xp.cli.commands import homekit
7
-
8
6
  # Import all conbus command modules to register their commands
9
7
  from xp.cli.commands.conbus import conbus_discover_commands # noqa: F401
10
8
  from xp.cli.commands.conbus import conbus_export_commands # noqa: F401
@@ -26,17 +24,36 @@ from xp.utils.logging import LoggerService
26
24
  cls=HelpColorsGroup, help_headers_color="yellow", help_options_color="green"
27
25
  )
28
26
  @click.version_option()
27
+ @click.option(
28
+ "--cli-config",
29
+ "-c",
30
+ default="cli.yml",
31
+ help="Path to the CLI configuration file (default: cli.yml)",
32
+ type=click.Path(exists=False),
33
+ )
34
+ @click.option(
35
+ "--log-config",
36
+ "-l",
37
+ default="logger.yml",
38
+ help="Path to the logger configuration file (default: logger.yml)",
39
+ type=click.Path(exists=False),
40
+ )
29
41
  @click.pass_context
30
- def cli(ctx: click.Context) -> None:
42
+ def cli(ctx: click.Context, cli_config: str, log_config: str) -> None:
31
43
  """
32
44
  XP CLI tool for remote console bus operations.
33
45
 
34
46
  Args:
35
47
  ctx: Click context object for passing state between commands.
48
+ cli_config: Path to the CLI configuration file.
49
+ log_config: Path to the logger configuration file.
36
50
  """
37
- container = ServiceContainer()
38
- logger_config = container.get_container().resolve(LoggerService)
39
- logger_config.setup()
51
+ container = ServiceContainer(
52
+ client_config_path=cli_config,
53
+ logger_config_path=log_config,
54
+ )
55
+ logger_service = container.get_container().resolve(LoggerService)
56
+ logger_service.setup()
40
57
 
41
58
  # Initialize the service container and store it in the context
42
59
  ctx.ensure_object(dict)
@@ -47,7 +64,6 @@ def cli(ctx: click.Context) -> None:
47
64
 
48
65
  # Register all command groups
49
66
  cli.add_command(conbus)
50
- cli.add_command(homekit)
51
67
  cli.add_command(telegram)
52
68
  cli.add_command(module)
53
69
  cli.add_command(file)
@@ -15,11 +15,13 @@ class ClientConfig(BaseModel):
15
15
  ip: IP address of the Conbus server.
16
16
  port: Port number for the connection.
17
17
  timeout: Connection timeout in seconds.
18
+ queue_delay_max: Max delay between queued telegrams in centiseconds (default 40 = 0.40s).
18
19
  """
19
20
 
20
21
  ip: str = "192.168.1.100"
21
22
  port: int = 10001
22
23
  timeout: float = 0.1
24
+ queue_delay_max: int = 40
23
25
 
24
26
 
25
27
  class ConbusClientConfig(BaseModel):
@@ -2,10 +2,9 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import TYPE_CHECKING, Union
5
+ from typing import TYPE_CHECKING
6
6
 
7
- from bubus import BaseEvent
8
- from pydantic import Field
7
+ from pydantic import BaseModel, Field
9
8
 
10
9
  from xp.models.config.conson_module_config import ConsonModuleConfig
11
10
  from xp.models.homekit.homekit_config import HomekitAccessoryConfig
@@ -13,23 +12,25 @@ from xp.models.telegram.datapoint_type import DataPointType
13
12
 
14
13
  if TYPE_CHECKING:
15
14
  from xp.services.protocol.conbus_event_protocol import ConbusEventProtocol
16
- from xp.services.protocol.telegram_protocol import TelegramProtocol
17
15
 
18
16
 
19
- class ConnectionMadeEvent(BaseEvent):
17
+ class ConnectionMadeEvent(BaseModel):
20
18
  """
21
19
  Event dispatched when TCP connection is established.
22
20
 
23
21
  Attributes:
24
- protocol: Reference to the TelegramProtocol instance.
22
+ model_config: Pydantic model configuration.
23
+ protocol: Reference to the ConbusEventProtocol instance.
25
24
  """
26
25
 
27
- protocol: TelegramProtocol = Field(
28
- description="Reference to the TelegramProtocol instance"
26
+ model_config = {"arbitrary_types_allowed": True}
27
+
28
+ protocol: ConbusEventProtocol = Field(
29
+ description="Reference to the ConbusEventProtocol instance"
29
30
  )
30
31
 
31
32
 
32
- class ConnectionFailedEvent(BaseEvent):
33
+ class ConnectionFailedEvent(BaseModel):
33
34
  """
34
35
  Event dispatched when TCP connection fails.
35
36
 
@@ -40,7 +41,7 @@ class ConnectionFailedEvent(BaseEvent):
40
41
  reason: str = Field(description="Failure reason")
41
42
 
42
43
 
43
- class SendWriteConfigEvent(BaseEvent):
44
+ class SendWriteConfigEvent(BaseModel):
44
45
  """
45
46
  Event for sending write config commands.
46
47
 
@@ -57,7 +58,7 @@ class SendWriteConfigEvent(BaseEvent):
57
58
  value: int = Field(description="Set brightness value")
58
59
 
59
60
 
60
- class SendActionEvent(BaseEvent):
61
+ class SendActionEvent(BaseModel):
61
62
  """
62
63
  Event for sending action commands.
63
64
 
@@ -76,7 +77,7 @@ class SendActionEvent(BaseEvent):
76
77
  off_action: str = Field(description="off action")
77
78
 
78
79
 
79
- class DatapointEvent(BaseEvent):
80
+ class DatapointEvent(BaseModel):
80
81
  """
81
82
  Base event for datapoint operations.
82
83
 
@@ -131,7 +132,7 @@ class ReadDatapointFromProtocolEvent(DatapointEvent):
131
132
  pass
132
133
 
133
134
 
134
- class ModuleEvent(BaseEvent):
135
+ class ModuleEvent(BaseModel):
135
136
  """
136
137
  Event dispatched when light bulb set is on.
137
138
 
@@ -163,7 +164,7 @@ class LightBulbSetOnEvent(ModuleEvent):
163
164
  value: bool = Field(description="On or Off the light bulb set")
164
165
 
165
166
 
166
- class LightBulbGetOnEvent(ModuleEvent, BaseEvent[bool]):
167
+ class LightBulbGetOnEvent(ModuleEvent):
167
168
  """Event dispatched when getting light bulb on state."""
168
169
 
169
170
  pass
@@ -192,7 +193,7 @@ class OutletGetInUseEvent(ModuleEvent):
192
193
  pass
193
194
 
194
195
 
195
- class OutletSetInUseEvent(ModuleEvent, BaseEvent[bool]):
196
+ class OutletSetInUseEvent(ModuleEvent):
196
197
  """
197
198
  Event dispatched when outlet set is on.
198
199
 
@@ -239,7 +240,7 @@ class DimmingLightGetBrightnessEvent(ModuleEvent):
239
240
  pass
240
241
 
241
242
 
242
- class ConnectionLostEvent(BaseEvent):
243
+ class ConnectionLostEvent(BaseModel):
243
244
  """
244
245
  Event dispatched when TCP connection is lost.
245
246
 
@@ -250,12 +251,13 @@ class ConnectionLostEvent(BaseEvent):
250
251
  reason: str = Field(description="Disconnection reason")
251
252
 
252
253
 
253
- class TelegramEvent(BaseEvent):
254
+ class TelegramEvent(BaseModel):
254
255
  """
255
256
  Event for telegram operations.
256
257
 
257
258
  Attributes:
258
- protocol: TelegramProtocol instance.
259
+ model_config: Pydantic model configuration.
260
+ protocol: ConbusEventProtocol instance.
259
261
  frame: Frame <S0123450001F02D12FK>.
260
262
  telegram: Telegram S0123450001F02D12FK.
261
263
  payload: Payload S0123450001F02D12.
@@ -265,9 +267,9 @@ class TelegramEvent(BaseEvent):
265
267
  checksum_valid: Checksum valid true or false.
266
268
  """
267
269
 
268
- protocol: Union[TelegramProtocol, ConbusEventProtocol] = Field(
269
- description="TelegramProtocol instance"
270
- )
270
+ model_config = {"arbitrary_types_allowed": True}
271
+
272
+ protocol: ConbusEventProtocol = Field(description="ConbusEventProtocol instance")
271
273
  frame: str = Field(description="Frame <S0123450001F02D12FK>")
272
274
  telegram: str = Field(description="Telegram: S0123450001F02D12FK")
273
275
  payload: str = Field(description="Payload: S0123450001F02D12")
@@ -279,7 +281,7 @@ class TelegramEvent(BaseEvent):
279
281
  )
280
282
 
281
283
 
282
- class ModuleStateChangedEvent(BaseEvent):
284
+ class ModuleStateChangedEvent(BaseModel):
283
285
  """
284
286
  Event dispatched when a module's state changes (from event telegram).
285
287
 
@@ -314,16 +316,19 @@ class TelegramReceivedEvent(TelegramEvent):
314
316
  pass
315
317
 
316
318
 
317
- class InvalidTelegramReceivedEvent(BaseEvent):
319
+ class InvalidTelegramReceivedEvent(BaseModel):
318
320
  """
319
321
  Event dispatched when an invalid telegram frame is received.
320
322
 
321
323
  Attributes:
322
- protocol: TelegramProtocol instance.
324
+ model_config: Pydantic model configuration.
325
+ protocol: ConbusEventProtocol instance.
323
326
  frame: Frame <S0123450001F02D12FK>.
324
327
  error: Error with the received telegram.
325
328
  """
326
329
 
327
- protocol: TelegramProtocol = Field(description="TelegramProtocol instance")
330
+ model_config = {"arbitrary_types_allowed": True}
331
+
332
+ protocol: ConbusEventProtocol = Field(description="ConbusEventProtocol instance")
328
333
  frame: str = Field(description="Frame <S0123450001F02D12FK>")
329
334
  error: str = Field(description="Error with the received telegram")
@@ -13,7 +13,7 @@ class AccessoryState:
13
13
  Attributes:
14
14
  room_name: Room containing the accessory (e.g., "Salon").
15
15
  accessory_name: Accessory display name (e.g., "Variateur salon").
16
- action: Action key (a-z) for toggle control.
16
+ action: Action key (a-z0-9) for toggle control.
17
17
  output_state: Output state ("ON", "OFF", "?").
18
18
  dimming_state: Dimming percentage for dimmable modules, "-" if OFF, empty otherwise.
19
19
  module_name: Module identifier (e.g., "A12").
@@ -8,11 +8,10 @@ from xp.models.protocol.conbus_protocol import (
8
8
  TelegramReceivedEvent,
9
9
  )
10
10
  from xp.services.protocol.conbus_event_protocol import ConbusEventProtocol
11
- from xp.services.protocol.telegram_protocol import TelegramProtocol
12
11
 
13
- __all__ = ["TelegramProtocol", "ConbusEventProtocol"]
12
+ __all__ = ["ConbusEventProtocol"]
14
13
 
15
- # Rebuild models after TelegramProtocol and ConbusEventProtocol are imported to resolve forward references
14
+ # Rebuild models after ConbusEventProtocol is imported to resolve forward references
16
15
  ConnectionMadeEvent.model_rebuild()
17
16
  InvalidTelegramReceivedEvent.model_rebuild()
18
17
  ModuleDiscoveredEvent.model_rebuild()
@@ -169,7 +169,7 @@ class ConbusEventProtocol(protocol.Protocol, protocol.ClientFactory):
169
169
  payload = telegram[:-2] # S0123450001F02D12
170
170
  checksum = telegram[-2:].decode() # FK
171
171
  serial_number = (
172
- telegram[1:11] if telegram_type in ("S", "R") else b""
172
+ telegram[1:11].decode("latin-1") if telegram_type in ("S", "R") else ""
173
173
  ) # 0123450001
174
174
  calculated_checksum = calculate_checksum(payload.decode(encoding="latin-1"))
175
175
 
@@ -391,12 +391,12 @@ class ConbusEventProtocol(protocol.Protocol, protocol.ClientFactory):
391
391
  self.logger.debug(f"buildProtocol: {addr}")
392
392
  return self
393
393
 
394
- def clientConnectionFailed(self, connector: IConnector, reason: Failure) -> None:
394
+ def clientConnectionFailed(self, _connector: IConnector, reason: Failure) -> None:
395
395
  """
396
396
  Handle client connection failure.
397
397
 
398
398
  Args:
399
- connector: Connection connector instance.
399
+ _connector: Connection connector instance (unused, required by Twisted).
400
400
  reason: Failure reason details.
401
401
  """
402
402
  self.logger.debug(f"clientConnectionFailed: {reason}")
@@ -404,12 +404,12 @@ class ConbusEventProtocol(protocol.Protocol, protocol.ClientFactory):
404
404
  self.connection_failed(reason)
405
405
  self._cancel_timeout()
406
406
 
407
- def clientConnectionLost(self, connector: IConnector, reason: Failure) -> None:
407
+ def clientConnectionLost(self, _connector: IConnector, reason: Failure) -> None:
408
408
  """
409
409
  Handle client connection lost event.
410
410
 
411
411
  Args:
412
- connector: Connection connector instance.
412
+ _connector: Connection connector instance (unused, required by Twisted).
413
413
  reason: Reason for connection loss.
414
414
  """
415
415
  self.logger.debug(f"clientConnectionLost: {reason}")
@@ -513,7 +513,7 @@ class ConbusEventProtocol(protocol.Protocol, protocol.ClientFactory):
513
513
  self.logger.debug("Queue manager: event loop")
514
514
  telegram = self.telegram_queue.get_nowait()
515
515
  self.sendFrame(telegram)
516
- later = randint(10, 80) / 100
516
+ later = randint(5, self.cli_config.queue_delay_max) / 100
517
517
  self.call_later(later, self.process_telegram_queue)
518
518
 
519
519
  def set_event_loop(self, event_loop: asyncio.AbstractEventLoop) -> None:
@@ -18,6 +18,7 @@ class XPAccessory(Accessory):
18
18
  self,
19
19
  driver: "HomekitAccessoryDriver",
20
20
  name: str,
21
+ display_name: str,
21
22
  service_type: str,
22
23
  aid: int,
23
24
  ) -> None:
@@ -26,11 +27,12 @@ class XPAccessory(Accessory):
26
27
 
27
28
  Args:
28
29
  driver: HomekitAccessoryDriver instance.
29
- name: Accessory name (unique identifier and display name).
30
+ name: Accessory name (unique identifier for internal tracking).
31
+ display_name: Display name shown in HomeKit (from config description).
30
32
  service_type: Service type ('light', 'outlet', 'dimminglight').
31
33
  aid: Accessory ID for HomeKit.
32
34
  """
33
- super().__init__(driver._driver, name, aid=aid)
35
+ super().__init__(driver._driver, display_name, aid=aid)
34
36
  self._hk_driver = driver
35
37
  self._accessory_id = name
36
38
  self.logger = logging.getLogger(__name__)
@@ -108,6 +110,7 @@ class HomekitAccessoryDriver:
108
110
  accessory = XPAccessory(
109
111
  driver=self,
110
112
  name=acc_config.name,
113
+ display_name=acc_config.description,
111
114
  service_type=acc_config.service,
112
115
  aid=aid,
113
116
  )
@@ -89,7 +89,7 @@ class HomekitService:
89
89
 
90
90
  def _initialize_accessory_states(self) -> None:
91
91
  """Initialize accessory states from HomekitConfig and ConsonModuleListConfig."""
92
- action_keys = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
92
+ action_keys = "abcdefghijklmnopqrstuvwxyz0123456789"
93
93
  action_index = 0
94
94
  sort_order = 0
95
95
 
@@ -180,6 +180,23 @@ class HomekitService:
180
180
  return accessory
181
181
  return None
182
182
 
183
+ def _find_accessory_config_by_id(
184
+ self, accessory_id: str
185
+ ) -> Optional[HomekitAccessoryConfig]:
186
+ """
187
+ Find accessory config by accessory ID.
188
+
189
+ Args:
190
+ accessory_id: Accessory ID (e.g., "A12_1").
191
+
192
+ Returns:
193
+ HomekitAccessoryConfig if found, None otherwise.
194
+ """
195
+ state = self._accessory_states.get(accessory_id)
196
+ if not state:
197
+ return None
198
+ return self._find_accessory_config_by_output(state.serial_number, state.output)
199
+
183
200
  def _connect_signals(self) -> None:
184
201
  """Connect to protocol signals."""
185
202
  self._conbus_protocol.on_connection_made.connect(self._on_connection_made)
@@ -291,13 +308,23 @@ class HomekitService:
291
308
  config = self._find_accessory_config(accessory_name)
292
309
  if config:
293
310
  action = config.on_action if is_on else config.off_action
294
- self._conbus_protocol.send_raw_telegram(action)
311
+ self.send_action(action)
295
312
  self.on_status_message.emit(
296
313
  f"HomeKit: {accessory_name} {'ON' if is_on else 'OFF'}"
297
314
  )
298
315
  else:
299
316
  self.logger.warning(f"No config found for accessory: {accessory_name}")
300
317
 
318
+ def send_action(self, action: str) -> None:
319
+ """
320
+ Send an action telegram to the conbus protocol.
321
+
322
+ Args:
323
+ action: The action string to send (e.g., "E00L00I00").
324
+ """
325
+ self._conbus_protocol.send_raw_telegram(f"{action}M")
326
+ self._conbus_protocol.send_raw_telegram(f"{action}B")
327
+
301
328
  def toggle_connection(self) -> None:
302
329
  """
303
330
  Toggle connection state between connected and disconnected.
@@ -313,31 +340,111 @@ class HomekitService:
313
340
  else:
314
341
  self.connect()
315
342
 
316
- def toggle_accessory(self, action_key: str) -> bool:
343
+ def select_accessory(self, action_key: str) -> Optional[str]:
344
+ """
345
+ Get accessory ID for action key.
346
+
347
+ Args:
348
+ action_key: Action key (a-z0-9).
349
+
350
+ Returns:
351
+ Accessory ID if found, None otherwise.
317
352
  """
318
- Toggle accessory by action key.
353
+ return self._action_map.get(action_key)
319
354
 
320
- Sends the toggle_action telegram for the accessory mapped to the given key.
355
+ def toggle_selected(self, accessory_id: str) -> bool:
356
+ """
357
+ Toggle accessory by ID.
321
358
 
322
359
  Args:
323
- action_key: Action key (a-z).
360
+ accessory_id: Accessory ID (e.g., "A12_1").
324
361
 
325
362
  Returns:
326
363
  True if toggle was sent, False otherwise.
327
364
  """
328
- accessory_id = self._action_map.get(action_key)
329
- if not accessory_id:
330
- return False
331
-
332
365
  state = self._accessory_states.get(accessory_id)
333
366
  if not state or not state.toggle_action:
334
367
  self.logger.warning(f"No toggle_action for accessory {accessory_id}")
335
368
  return False
336
369
 
337
- self._conbus_protocol.send_raw_telegram(state.toggle_action)
370
+ self.send_action(state.toggle_action)
338
371
  self.on_status_message.emit(f"Toggling {state.accessory_name}")
339
372
  return True
340
373
 
374
+ def turn_on_selected(self, accessory_id: str) -> bool:
375
+ """
376
+ Turn on accessory by ID.
377
+
378
+ Args:
379
+ accessory_id: Accessory ID (e.g., "A12_1").
380
+
381
+ Returns:
382
+ True if on command was sent, False otherwise.
383
+ """
384
+ config = self._find_accessory_config_by_id(accessory_id)
385
+ state = self._accessory_states.get(accessory_id)
386
+ if not config or not state:
387
+ self.logger.warning(f"No config for accessory {accessory_id}")
388
+ return False
389
+
390
+ self.send_action(config.on_action)
391
+ self.on_status_message.emit(f"Turning ON {state.accessory_name}")
392
+ return True
393
+
394
+ def turn_off_selected(self, accessory_id: str) -> bool:
395
+ """
396
+ Turn off accessory by ID.
397
+
398
+ Args:
399
+ accessory_id: Accessory ID (e.g., "A12_1").
400
+
401
+ Returns:
402
+ True if off command was sent, False otherwise.
403
+ """
404
+ config = self._find_accessory_config_by_id(accessory_id)
405
+ state = self._accessory_states.get(accessory_id)
406
+ if not config or not state:
407
+ self.logger.warning(f"No config for accessory {accessory_id}")
408
+ return False
409
+
410
+ self.send_action(config.off_action)
411
+ self.on_status_message.emit(f"Turning OFF {state.accessory_name}")
412
+ return True
413
+
414
+ def increase_dimmer(self, accessory_id: str) -> bool:
415
+ """
416
+ Increase dimmer level for accessory.
417
+
418
+ Args:
419
+ accessory_id: Accessory ID (e.g., "A12_1").
420
+
421
+ Returns:
422
+ True if command was sent, False otherwise.
423
+ """
424
+ state = self._accessory_states.get(accessory_id)
425
+ if not state:
426
+ return False
427
+ # TODO: Implement dimmer control
428
+ self.on_status_message.emit(f"Dimmer+ {state.accessory_name} (not implemented)")
429
+ return False
430
+
431
+ def decrease_dimmer(self, accessory_id: str) -> bool:
432
+ """
433
+ Decrease dimmer level for accessory.
434
+
435
+ Args:
436
+ accessory_id: Accessory ID (e.g., "A12_1").
437
+
438
+ Returns:
439
+ True if command was sent, False otherwise.
440
+ """
441
+ state = self._accessory_states.get(accessory_id)
442
+ if not state:
443
+ return False
444
+ # TODO: Implement dimmer control
445
+ self.on_status_message.emit(f"Dimmer- {state.accessory_name} (not implemented)")
446
+ return False
447
+
341
448
  def refresh_all(self) -> None:
342
449
  """
343
450
  Refresh all module states.