conson-xp 1.18.0__tar.gz → 1.19.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.
- {conson_xp-1.18.0 → conson_xp-1.19.0}/PKG-INFO +2 -1
- {conson_xp-1.18.0 → conson_xp-1.19.0}/README.md +1 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/pyproject.toml +1 -1
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/__init__.py +1 -1
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_event_commands.py +25 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/__init__.py +2 -0
- conson_xp-1.19.0/src/xp/models/conbus/conbus_event_list.py +34 -0
- conson_xp-1.19.0/src/xp/services/conbus/conbus_event_list_service.py +91 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/utils/dependencies.py +9 -0
- conson_xp-1.19.0/tests/unit/test_services/test_conbus_event_list_service.py +272 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_telegram_service.py +19 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/LICENSE +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/__main__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_actiontable_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_autoreport_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_blink_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_config_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_custom_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_datapoint_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_discover_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_lightlevel_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_linknumber_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_modulenumber_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_msactiontable_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_output_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_raw_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_receive_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_scan_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/file_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/homekit/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/homekit/homekit.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/homekit/homekit_start_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/module_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/reverse_proxy_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/server/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/server/server_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_blink_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_checksum_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_discover_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_linknumber_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_parse_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_version_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/main.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/click_tree.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/datapoint_type_choice.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/decorators.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/error_handlers.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/formatters.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/module_type_choice.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/serial_number_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/system_function_choice.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/utils/xp_module_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/connection/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/connection/exceptions.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/actiontable/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/actiontable/actiontable.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/actiontable/msactiontable_xp20.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/actiontable/msactiontable_xp24.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/actiontable/msactiontable_xp33.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_autoreport.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_blink.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_client_config.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_connection_status.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_custom.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_datapoint.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_discover.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_event_raw.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_lightlevel.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_linknumber.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_output.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_raw.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_receive.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/conbus/conbus_writeconfig.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/homekit/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/homekit/homekit_accessory.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/homekit/homekit_config.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/homekit/homekit_conson_config.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/log_entry.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/protocol/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/protocol/conbus_protocol.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/response.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/action_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/datapoint_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/event_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/event_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/input_action_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/input_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/module_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/module_type_code.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/output_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/reply_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/system_function.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/system_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/telegram_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/telegram/timeparam_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/models/write_config_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/actiontable/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/actiontable/actiontable_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/actiontable/msactiontable_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/actiontable/msactiontable_xp20_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/actiontable/msactiontable_xp24_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/actiontable/msactiontable_xp33_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/actiontable/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/actiontable/actiontable_download_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/actiontable/actiontable_list_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/actiontable/actiontable_show_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/actiontable/actiontable_upload_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/actiontable/msactiontable_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_blink_all_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_blink_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_custom_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_datapoint_queryall_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_datapoint_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_discover_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_event_raw_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_output_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_raw_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_receive_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/conbus_scan_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/conbus/write_config_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_cache_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_conbus_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_config_validator.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_conson_validator.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_dimminglight.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_dimminglight_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_hap_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_lightbulb.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_lightbulb_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_module_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_outlet.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_outlet_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/homekit/homekit_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/log_file_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/module_type_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/protocol/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/protocol/conbus_event_protocol.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/protocol/conbus_protocol.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/protocol/protocol_factory.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/protocol/telegram_protocol.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/reverse_proxy_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/base_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/cp20_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/device_service_factory.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/xp130_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/xp20_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/xp230_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/xp24_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/server/xp33_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_blink_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_checksum_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_datapoint_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_discover_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_link_number_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_output_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/services/telegram/telegram_version_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/utils/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/utils/checksum.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/utils/event_helper.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/utils/serialization.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/utils/time_utils.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/.coverage +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/conftest.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/.coverage +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/telegram_test_data.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_actiontable_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_api/.coverage +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_api/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_blink_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_checksum_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_conbus_blink_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_conbus_datapoint_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_conbus_raw_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_conbus_receive_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_discovery_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_event_telegram_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_homekit_config_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_link_number_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_module_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_output_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_reverse_proxy_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_system_reply_telegram_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_version_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_xp20_action_table_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/integration/test_xp24_action_table_integration.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_api/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_click_tree.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_conbus_actiontable_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_conbus_blink_commands.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_datapoint_type_choice.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_decorators.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_error_handlers.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_formatters.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_serial_number_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_cli/test_system_function_choice.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_connection/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_connection/test_connection_init.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_connection/test_exceptions.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_encoding/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_encoding/test_latin1_edge_cases.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_conbus.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_conbus_client_send.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_conbus_discover.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_conbus_linknumber.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_event_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_log_entry.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_module_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_reply_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_system_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_system_telegram_enhancements.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_version_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_write_config_type.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_xp20_action_table.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_xp24_action_table.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_models/test_xp24_action_telegram.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_actiontable_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_actiontable_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_actiontable_upload_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_base_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_blink_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_checksum_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_conbus_blink_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_conbus_event_raw_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_conbus_raw_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_conbus_reverse_proxy_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_device_service_factory.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_discovery_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_homekit_cache_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_homekit_config_validator.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_homekit_conson_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_homekit_services.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_log_file_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_module_type_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_protocol.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_server_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_telegram_input_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_telegram_protocol.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_version_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_xp20_action_table_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_xp24_action_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_xp24_action_table_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_xp24_action_table_service.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_xp33_action_table_serializer.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_services/test_xp_server_services.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_utils/__init__.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_utils/test_checksum.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_utils/test_event_helper.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.0}/tests/unit/test_utils/test_serialization.py +0 -0
- {conson_xp-1.18.0 → conson_xp-1.19.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.
|
|
3
|
+
Version: 1.19.0
|
|
4
4
|
Summary: XP Protocol Communication Tools
|
|
5
5
|
Author-Email: ldvchosal <ldvchosal@github.com>
|
|
6
6
|
License: MIT License
|
|
@@ -306,6 +306,7 @@ xp conbus datapoint query
|
|
|
306
306
|
xp conbus discover
|
|
307
307
|
|
|
308
308
|
xp conbus event
|
|
309
|
+
xp conbus event list
|
|
309
310
|
xp conbus event raw
|
|
310
311
|
|
|
311
312
|
|
|
@@ -8,6 +8,7 @@ from xp.cli.commands.conbus.conbus import conbus
|
|
|
8
8
|
from xp.cli.utils.decorators import connection_command
|
|
9
9
|
from xp.cli.utils.module_type_choice import MODULE_TYPE
|
|
10
10
|
from xp.models import ConbusEventRawResponse
|
|
11
|
+
from xp.services.conbus.conbus_event_list_service import ConbusEventListService
|
|
11
12
|
from xp.services.conbus.conbus_event_raw_service import ConbusEventRawService
|
|
12
13
|
|
|
13
14
|
|
|
@@ -17,6 +18,30 @@ def conbus_event() -> None:
|
|
|
17
18
|
pass
|
|
18
19
|
|
|
19
20
|
|
|
21
|
+
@conbus_event.command("list")
|
|
22
|
+
@click.pass_context
|
|
23
|
+
def list_events(ctx: click.Context) -> None:
|
|
24
|
+
r"""List configured event telegrams from module action tables.
|
|
25
|
+
|
|
26
|
+
Reads conson.yml configuration, parses action tables, and groups
|
|
27
|
+
modules by their event keys to show which modules are assigned to
|
|
28
|
+
each event (button configuration).
|
|
29
|
+
|
|
30
|
+
Output is sorted by module count (most frequently used events first).
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
ctx: Click context object.
|
|
34
|
+
|
|
35
|
+
Examples:
|
|
36
|
+
\b
|
|
37
|
+
xp conbus event list
|
|
38
|
+
"""
|
|
39
|
+
service: ConbusEventListService = (
|
|
40
|
+
ctx.obj.get("container").get_container().resolve(ConbusEventListService)
|
|
41
|
+
)
|
|
42
|
+
click.echo(json.dumps(service.list_events().to_dict(), indent=2))
|
|
43
|
+
|
|
44
|
+
|
|
20
45
|
@conbus_event.command("raw")
|
|
21
46
|
@click.argument("module_type", type=MODULE_TYPE)
|
|
22
47
|
@click.argument("link_number", type=click.IntRange(0, 99))
|
|
@@ -5,6 +5,7 @@ from xp.models.conbus.conbus_client_config import ConbusClientConfig
|
|
|
5
5
|
from xp.models.conbus.conbus_connection_status import ConbusConnectionStatus
|
|
6
6
|
from xp.models.conbus.conbus_datapoint import ConbusDatapointResponse
|
|
7
7
|
from xp.models.conbus.conbus_discover import ConbusDiscoverResponse
|
|
8
|
+
from xp.models.conbus.conbus_event_list import ConbusEventListResponse
|
|
8
9
|
from xp.models.conbus.conbus_event_raw import ConbusEventRawResponse
|
|
9
10
|
from xp.models.log_entry import LogEntry
|
|
10
11
|
from xp.models.telegram.event_telegram import EventTelegram
|
|
@@ -31,6 +32,7 @@ __all__ = [
|
|
|
31
32
|
"ConbusResponse",
|
|
32
33
|
"ConbusDatapointResponse",
|
|
33
34
|
"ConbusDiscoverResponse",
|
|
35
|
+
"ConbusEventListResponse",
|
|
34
36
|
"ConbusEventRawResponse",
|
|
35
37
|
"ConbusConnectionStatus",
|
|
36
38
|
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Conbus event list response model."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing import Any, Dict, Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class ConbusEventListResponse:
|
|
10
|
+
"""Represents a response from Conbus event list operation.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
events: Dict mapping event keys to list of module names.
|
|
14
|
+
timestamp: Timestamp of the response.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
events: Dict[str, list[str]]
|
|
18
|
+
timestamp: Optional[datetime] = None
|
|
19
|
+
|
|
20
|
+
def __post_init__(self) -> None:
|
|
21
|
+
"""Initialize timestamp if not provided."""
|
|
22
|
+
if self.timestamp is None:
|
|
23
|
+
self.timestamp = datetime.now()
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
"""Convert to dictionary for JSON serialization.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
Dictionary representation of the response.
|
|
30
|
+
"""
|
|
31
|
+
return {
|
|
32
|
+
"events": self.events,
|
|
33
|
+
"timestamp": self.timestamp.isoformat() if self.timestamp else None,
|
|
34
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"""Conbus Event List Service for listing configured event telegrams.
|
|
2
|
+
|
|
3
|
+
This service parses action tables from conson.yml and groups events
|
|
4
|
+
by button configuration to show which modules are assigned to each event.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import logging
|
|
8
|
+
from collections import defaultdict
|
|
9
|
+
from typing import Dict, List
|
|
10
|
+
|
|
11
|
+
from xp.models import ConbusEventListResponse
|
|
12
|
+
from xp.models.homekit.homekit_conson_config import ConsonModuleListConfig
|
|
13
|
+
from xp.services.actiontable.actiontable_serializer import ActionTableSerializer
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ConbusEventListService:
|
|
17
|
+
"""Service for listing configured event telegrams from action tables.
|
|
18
|
+
|
|
19
|
+
Parses action tables from conson.yml configuration and groups modules
|
|
20
|
+
by their event keys to identify common button configurations.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
conson_config: Configuration containing module action tables.
|
|
24
|
+
logger: Logger instance for the service.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def __init__(self, conson_config: ConsonModuleListConfig) -> None:
|
|
28
|
+
"""Initialize the Conbus event list service.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
conson_config: ConsonModuleListConfig instance with module action tables.
|
|
32
|
+
"""
|
|
33
|
+
self.conson_config = conson_config
|
|
34
|
+
self.logger = logging.getLogger(__name__)
|
|
35
|
+
|
|
36
|
+
def list_events(self) -> ConbusEventListResponse:
|
|
37
|
+
"""List all configured events from module action tables.
|
|
38
|
+
|
|
39
|
+
Parses action tables, extracts event information (module_type, link, input),
|
|
40
|
+
groups modules by event key, and sorts by usage count.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
ConbusEventListResponse with events dict mapping event keys to module names.
|
|
44
|
+
"""
|
|
45
|
+
# Dict to track which modules are assigned to each event
|
|
46
|
+
# event_key -> set of module names (using set for automatic deduplication)
|
|
47
|
+
event_modules: Dict[str, set[str]] = defaultdict(set)
|
|
48
|
+
|
|
49
|
+
# Process each module's action table
|
|
50
|
+
for module in self.conson_config.root:
|
|
51
|
+
# Skip modules without action table
|
|
52
|
+
if not module.action_table:
|
|
53
|
+
continue
|
|
54
|
+
|
|
55
|
+
# Process each action in the module's action table
|
|
56
|
+
for action in module.action_table:
|
|
57
|
+
try:
|
|
58
|
+
# Use existing ActionTableSerializer to parse action
|
|
59
|
+
entry = ActionTableSerializer.parse_action_string(action)
|
|
60
|
+
|
|
61
|
+
# Extract event data from parsed entry
|
|
62
|
+
module_type_name = entry.module_type.name
|
|
63
|
+
link = entry.link_number
|
|
64
|
+
input_num = entry.module_input
|
|
65
|
+
|
|
66
|
+
# Create event key (space-separated format)
|
|
67
|
+
event_key = f"{module_type_name} {link:02d} {input_num:02d}"
|
|
68
|
+
|
|
69
|
+
# Add this module to the event (set automatically deduplicates)
|
|
70
|
+
event_modules[event_key].add(
|
|
71
|
+
f"{module.serial_number}:{entry.module_output}"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
except ValueError as e:
|
|
75
|
+
# Invalid action format - log warning and skip
|
|
76
|
+
self.logger.warning(
|
|
77
|
+
f"Invalid action '{action}' in module '{module.serial_number}': {e}"
|
|
78
|
+
)
|
|
79
|
+
continue
|
|
80
|
+
|
|
81
|
+
# Convert sets to sorted lists and sort events by module count (descending)
|
|
82
|
+
events_dict: Dict[str, List[str]] = {
|
|
83
|
+
event_key: sorted(list(modules))
|
|
84
|
+
for event_key, modules in sorted(
|
|
85
|
+
event_modules.items(),
|
|
86
|
+
key=lambda item: len(item[1]),
|
|
87
|
+
reverse=True,
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return ConbusEventListResponse(events=events_dict)
|
|
@@ -43,6 +43,7 @@ from xp.services.conbus.conbus_datapoint_service import (
|
|
|
43
43
|
ConbusDatapointService,
|
|
44
44
|
)
|
|
45
45
|
from xp.services.conbus.conbus_discover_service import ConbusDiscoverService
|
|
46
|
+
from xp.services.conbus.conbus_event_list_service import ConbusEventListService
|
|
46
47
|
from xp.services.conbus.conbus_event_raw_service import ConbusEventRawService
|
|
47
48
|
from xp.services.conbus.conbus_output_service import ConbusOutputService
|
|
48
49
|
from xp.services.conbus.conbus_raw_service import ConbusRawService
|
|
@@ -189,6 +190,14 @@ class ServiceContainer:
|
|
|
189
190
|
scope=punq.Scope.singleton,
|
|
190
191
|
)
|
|
191
192
|
|
|
193
|
+
self.container.register(
|
|
194
|
+
ConbusEventListService,
|
|
195
|
+
factory=lambda: ConbusEventListService(
|
|
196
|
+
conson_config=self.container.resolve(ConsonModuleListConfig)
|
|
197
|
+
),
|
|
198
|
+
scope=punq.Scope.singleton,
|
|
199
|
+
)
|
|
200
|
+
|
|
192
201
|
self.container.register(
|
|
193
202
|
ConbusBlinkService,
|
|
194
203
|
factory=lambda: ConbusBlinkService(
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"""Unit tests for ConbusEventListService."""
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from xp.models.homekit.homekit_conson_config import (
|
|
6
|
+
ConsonModuleConfig,
|
|
7
|
+
ConsonModuleListConfig,
|
|
8
|
+
)
|
|
9
|
+
from xp.services.conbus.conbus_event_list_service import ConbusEventListService
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TestConbusEventListService:
|
|
13
|
+
"""Unit tests for ConbusEventListService functionality."""
|
|
14
|
+
|
|
15
|
+
@pytest.fixture
|
|
16
|
+
def empty_config(self):
|
|
17
|
+
"""Create empty config with no modules."""
|
|
18
|
+
return ConsonModuleListConfig(root=[])
|
|
19
|
+
|
|
20
|
+
@pytest.fixture
|
|
21
|
+
def single_module_config(self):
|
|
22
|
+
"""Create config with single module and one action."""
|
|
23
|
+
module = ConsonModuleConfig(
|
|
24
|
+
name="A1",
|
|
25
|
+
serial_number="0012345001",
|
|
26
|
+
module_type="XP20",
|
|
27
|
+
module_type_code=33,
|
|
28
|
+
link_number=0,
|
|
29
|
+
action_table=["XP20 10 0 > 0 OFF"],
|
|
30
|
+
)
|
|
31
|
+
return ConsonModuleListConfig(root=[module])
|
|
32
|
+
|
|
33
|
+
@pytest.fixture
|
|
34
|
+
def multiple_modules_same_event_config(self):
|
|
35
|
+
"""Create config with multiple modules sharing same event."""
|
|
36
|
+
module1 = ConsonModuleConfig(
|
|
37
|
+
name="A1",
|
|
38
|
+
serial_number="0012345001",
|
|
39
|
+
module_type="XP20",
|
|
40
|
+
module_type_code=33,
|
|
41
|
+
link_number=0,
|
|
42
|
+
action_table=["XP20 10 0 > 0 OFF"],
|
|
43
|
+
)
|
|
44
|
+
module2 = ConsonModuleConfig(
|
|
45
|
+
name="A2",
|
|
46
|
+
serial_number="0012345002",
|
|
47
|
+
module_type="XP20",
|
|
48
|
+
module_type_code=33,
|
|
49
|
+
link_number=0,
|
|
50
|
+
action_table=["XP20 10 0 > 1 ON"],
|
|
51
|
+
)
|
|
52
|
+
module3 = ConsonModuleConfig(
|
|
53
|
+
name="A3",
|
|
54
|
+
serial_number="0012345003",
|
|
55
|
+
module_type="XP20",
|
|
56
|
+
module_type_code=33,
|
|
57
|
+
link_number=0,
|
|
58
|
+
action_table=["XP20 10 0 > 2 OFF"],
|
|
59
|
+
)
|
|
60
|
+
return ConsonModuleListConfig(root=[module1, module2, module3])
|
|
61
|
+
|
|
62
|
+
@pytest.fixture
|
|
63
|
+
def duplicate_actions_config(self):
|
|
64
|
+
"""Create config with duplicate actions in same module."""
|
|
65
|
+
module = ConsonModuleConfig(
|
|
66
|
+
name="A1",
|
|
67
|
+
serial_number="0012345001",
|
|
68
|
+
module_type="XP20",
|
|
69
|
+
module_type_code=33,
|
|
70
|
+
link_number=0,
|
|
71
|
+
action_table=[
|
|
72
|
+
"XP20 10 0 > 0 OFF",
|
|
73
|
+
"XP20 10 0 > 1 OFF",
|
|
74
|
+
"XP20 10 0 > 2 OFF",
|
|
75
|
+
],
|
|
76
|
+
)
|
|
77
|
+
return ConsonModuleListConfig(root=[module])
|
|
78
|
+
|
|
79
|
+
@pytest.fixture
|
|
80
|
+
def invalid_action_config(self):
|
|
81
|
+
"""Create config with invalid action format."""
|
|
82
|
+
module = ConsonModuleConfig(
|
|
83
|
+
name="A1",
|
|
84
|
+
serial_number="0012345001",
|
|
85
|
+
module_type="XP20",
|
|
86
|
+
module_type_code=33,
|
|
87
|
+
link_number=0,
|
|
88
|
+
action_table=[
|
|
89
|
+
"XP20 10 0 > 0 OFF", # Valid
|
|
90
|
+
"INVALID ACTION FORMAT", # Invalid
|
|
91
|
+
"XP20 10 8 > 0 ON", # Valid
|
|
92
|
+
],
|
|
93
|
+
)
|
|
94
|
+
return ConsonModuleListConfig(root=[module])
|
|
95
|
+
|
|
96
|
+
@pytest.fixture
|
|
97
|
+
def empty_action_table_config(self):
|
|
98
|
+
"""Create config with module having empty action table."""
|
|
99
|
+
module1 = ConsonModuleConfig(
|
|
100
|
+
name="A1",
|
|
101
|
+
serial_number="0012345001",
|
|
102
|
+
module_type="XP20",
|
|
103
|
+
module_type_code=33,
|
|
104
|
+
link_number=0,
|
|
105
|
+
action_table=[],
|
|
106
|
+
)
|
|
107
|
+
module2 = ConsonModuleConfig(
|
|
108
|
+
name="A2",
|
|
109
|
+
serial_number="0012345002",
|
|
110
|
+
module_type="XP20",
|
|
111
|
+
module_type_code=33,
|
|
112
|
+
link_number=0,
|
|
113
|
+
action_table=["XP20 10 0 > 0 OFF"],
|
|
114
|
+
)
|
|
115
|
+
return ConsonModuleListConfig(root=[module1, module2])
|
|
116
|
+
|
|
117
|
+
@pytest.fixture
|
|
118
|
+
def sorting_config(self):
|
|
119
|
+
"""Create config for testing sorting by module count."""
|
|
120
|
+
# Event XP20 10 00 has 3 modules
|
|
121
|
+
module1 = ConsonModuleConfig(
|
|
122
|
+
name="A1",
|
|
123
|
+
serial_number="0012345001",
|
|
124
|
+
module_type="XP20",
|
|
125
|
+
module_type_code=33,
|
|
126
|
+
link_number=0,
|
|
127
|
+
action_table=["XP20 10 0 > 0 OFF"],
|
|
128
|
+
)
|
|
129
|
+
module2 = ConsonModuleConfig(
|
|
130
|
+
name="A2",
|
|
131
|
+
serial_number="0012345002",
|
|
132
|
+
module_type="XP20",
|
|
133
|
+
module_type_code=33,
|
|
134
|
+
link_number=0,
|
|
135
|
+
action_table=["XP20 10 0 > 1 ON"],
|
|
136
|
+
)
|
|
137
|
+
module3 = ConsonModuleConfig(
|
|
138
|
+
name="A3",
|
|
139
|
+
serial_number="0012345003",
|
|
140
|
+
module_type="XP20",
|
|
141
|
+
module_type_code=33,
|
|
142
|
+
link_number=0,
|
|
143
|
+
action_table=["XP20 10 0 > 2 OFF"],
|
|
144
|
+
)
|
|
145
|
+
# Event XP20 10 08 has 2 modules
|
|
146
|
+
module4 = ConsonModuleConfig(
|
|
147
|
+
name="A4",
|
|
148
|
+
serial_number="0012345004",
|
|
149
|
+
module_type="XP20",
|
|
150
|
+
module_type_code=33,
|
|
151
|
+
link_number=0,
|
|
152
|
+
action_table=["XP20 10 8 > 0 ON"],
|
|
153
|
+
)
|
|
154
|
+
module5 = ConsonModuleConfig(
|
|
155
|
+
name="A5",
|
|
156
|
+
serial_number="0012345005",
|
|
157
|
+
module_type="XP20",
|
|
158
|
+
module_type_code=33,
|
|
159
|
+
link_number=0,
|
|
160
|
+
action_table=["XP20 10 8 > 1 OFF"],
|
|
161
|
+
)
|
|
162
|
+
# Event CP20 00 00 has 1 module
|
|
163
|
+
module6 = ConsonModuleConfig(
|
|
164
|
+
name="A6",
|
|
165
|
+
serial_number="0012345006",
|
|
166
|
+
module_type="CP20",
|
|
167
|
+
module_type_code=2,
|
|
168
|
+
link_number=0,
|
|
169
|
+
action_table=["CP20 0 0 > 0 OFF"],
|
|
170
|
+
)
|
|
171
|
+
return ConsonModuleListConfig(
|
|
172
|
+
root=[module1, module2, module3, module4, module5, module6]
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
def test_empty_config(self, empty_config):
|
|
176
|
+
"""Test with empty configuration (no modules)."""
|
|
177
|
+
response = ConbusEventListService(conson_config=empty_config).list_events()
|
|
178
|
+
|
|
179
|
+
assert response.events == {}
|
|
180
|
+
assert response.timestamp is not None
|
|
181
|
+
|
|
182
|
+
def test_single_module(self, single_module_config):
|
|
183
|
+
"""Test with single module and one action."""
|
|
184
|
+
response = ConbusEventListService(
|
|
185
|
+
conson_config=single_module_config
|
|
186
|
+
).list_events()
|
|
187
|
+
|
|
188
|
+
assert len(response.events) == 1
|
|
189
|
+
assert "XP20 10 00" in response.events
|
|
190
|
+
assert response.events["XP20 10 00"] == ["0012345001:0"]
|
|
191
|
+
|
|
192
|
+
def test_multiple_modules_same_event(self, multiple_modules_same_event_config):
|
|
193
|
+
"""Test multiple modules sharing same event."""
|
|
194
|
+
response = ConbusEventListService(
|
|
195
|
+
conson_config=multiple_modules_same_event_config
|
|
196
|
+
).list_events()
|
|
197
|
+
|
|
198
|
+
assert len(response.events) == 1
|
|
199
|
+
assert "XP20 10 00" in response.events
|
|
200
|
+
assert sorted(response.events["XP20 10 00"]) == [
|
|
201
|
+
"0012345001:0",
|
|
202
|
+
"0012345002:1",
|
|
203
|
+
"0012345003:2",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
def test_duplicate_actions_deduplication(self, duplicate_actions_config):
|
|
207
|
+
"""Test that duplicate actions in same module are deduplicated."""
|
|
208
|
+
response = ConbusEventListService(
|
|
209
|
+
conson_config=duplicate_actions_config
|
|
210
|
+
).list_events()
|
|
211
|
+
|
|
212
|
+
assert len(response.events) == 1
|
|
213
|
+
assert "XP20 10 00" in response.events
|
|
214
|
+
assert response.events["XP20 10 00"] == [
|
|
215
|
+
"0012345001:0",
|
|
216
|
+
"0012345001:1",
|
|
217
|
+
"0012345001:2",
|
|
218
|
+
] # Only once, not three times
|
|
219
|
+
|
|
220
|
+
def test_invalid_action_format(self, invalid_action_config, caplog):
|
|
221
|
+
"""Test that invalid actions are skipped with warning."""
|
|
222
|
+
response = ConbusEventListService(
|
|
223
|
+
conson_config=invalid_action_config
|
|
224
|
+
).list_events()
|
|
225
|
+
|
|
226
|
+
# Should have 2 valid events
|
|
227
|
+
assert len(response.events) == 2
|
|
228
|
+
assert "XP20 10 00" in response.events
|
|
229
|
+
assert "XP20 10 08" in response.events
|
|
230
|
+
|
|
231
|
+
# Should have logged warning about invalid action
|
|
232
|
+
assert "Invalid action" in caplog.text
|
|
233
|
+
assert "INVALID ACTION FORMAT" in caplog.text
|
|
234
|
+
|
|
235
|
+
def test_empty_action_table(self, empty_action_table_config):
|
|
236
|
+
"""Test that modules with empty action table are silently skipped."""
|
|
237
|
+
response = ConbusEventListService(
|
|
238
|
+
conson_config=empty_action_table_config
|
|
239
|
+
).list_events()
|
|
240
|
+
|
|
241
|
+
# Only A2 should be in result (A1 has empty action_table)
|
|
242
|
+
assert len(response.events) == 1
|
|
243
|
+
assert "XP20 10 00" in response.events
|
|
244
|
+
assert response.events["XP20 10 00"] == ["0012345002:0"]
|
|
245
|
+
|
|
246
|
+
def test_sorting_by_module_count(self, sorting_config):
|
|
247
|
+
"""Test that events are sorted by module count (descending)."""
|
|
248
|
+
response = ConbusEventListService(conson_config=sorting_config).list_events()
|
|
249
|
+
|
|
250
|
+
# Get events in order
|
|
251
|
+
event_keys = list(response.events.keys())
|
|
252
|
+
|
|
253
|
+
# Should be sorted by count: XP20 10 00 (3), XP20 10 08 (2), CP20 00 00 (1)
|
|
254
|
+
assert event_keys[0] == "XP20 10 00"
|
|
255
|
+
assert len(response.events[event_keys[0]]) == 3
|
|
256
|
+
assert event_keys[1] == "XP20 10 08"
|
|
257
|
+
assert len(response.events[event_keys[1]]) == 2
|
|
258
|
+
assert event_keys[2] == "CP20 00 00"
|
|
259
|
+
assert len(response.events[event_keys[2]]) == 1
|
|
260
|
+
|
|
261
|
+
def test_to_dict_serialization(self, single_module_config):
|
|
262
|
+
"""Test that response can be serialized to dict."""
|
|
263
|
+
result_dict = (
|
|
264
|
+
ConbusEventListService(conson_config=single_module_config)
|
|
265
|
+
.list_events()
|
|
266
|
+
.to_dict()
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
assert "events" in result_dict
|
|
270
|
+
assert "timestamp" in result_dict
|
|
271
|
+
assert isinstance(result_dict["events"], dict)
|
|
272
|
+
assert isinstance(result_dict["timestamp"], str) # ISO format
|
|
@@ -383,6 +383,25 @@ class TestReplyTelegramParsing:
|
|
|
383
383
|
assert "Timestamp:" in summary
|
|
384
384
|
assert "Checksum: IL" in summary
|
|
385
385
|
|
|
386
|
+
def test_parse_actiontable_reply_telegram(self):
|
|
387
|
+
"""Test parsing an actiontable reply telegram (F17).
|
|
388
|
+
|
|
389
|
+
This tests a real actiontable telegram received from a module.
|
|
390
|
+
The F17 function code indicates ACTIONTABLE data response.
|
|
391
|
+
"""
|
|
392
|
+
raw = "<R0020042796F17DAAAADDBAAABAAADDBAAABBAADDBAAABCAADDBAAIAIAADDBAAIAJAA>"
|
|
393
|
+
result = self.service.parse_reply_telegram(raw)
|
|
394
|
+
|
|
395
|
+
assert isinstance(result, ReplyTelegram)
|
|
396
|
+
assert result.serial_number == "0020042796"
|
|
397
|
+
assert result.system_function == SystemFunction.ACTIONTABLE
|
|
398
|
+
assert result.data == "AA"
|
|
399
|
+
assert result.data_value == "AADDBAAABAAADDBAAABBAADDBAAABCAADDBAAIAIAADDBAAIAJ"
|
|
400
|
+
assert result.checksum == "AA"
|
|
401
|
+
assert not result.checksum_validated
|
|
402
|
+
assert result.raw_telegram == raw
|
|
403
|
+
assert result.timestamp is not None
|
|
404
|
+
|
|
386
405
|
|
|
387
406
|
class TestAutoDetectTelegramParsing:
|
|
388
407
|
"""Test cases for auto-detect telegram parsing in TelegramService."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_actiontable_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_autoreport_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_datapoint_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_discover_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_lightlevel_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_linknumber_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_modulenumber_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/conbus/conbus_msactiontable_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_blink_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_checksum_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_discover_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_linknumber_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_parse_commands.py
RENAMED
|
File without changes
|
{conson_xp-1.18.0 → conson_xp-1.19.0}/src/xp/cli/commands/telegram/telegram_version_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|