Skip to content

Refactor device export command supporting now json and yaml export. Added device links data to device export and details command#52

Merged
darthsharp merged 18 commits intomainfrom
feature/moredevicecommands
Apr 29, 2026
Merged

Refactor device export command supporting now json and yaml export. Added device links data to device export and details command#52
darthsharp merged 18 commits intomainfrom
feature/moredevicecommands

Conversation

@darthsharp
Copy link
Copy Markdown
Contributor

No description provided.

- Introduced `CcuCommandGroup` to group CCU-related commands in the CLI.
- Enhanced `ShowDeviceDetailsCommand` with `CliCommand` attribute for better integration.
- Added `ICcuBackupServiceBuilder` to support CCU backup handling.
- Updated project dependencies and service registrations to include new functionality.
- Registered a named `HttpClient` ("CcuBackup") in `HomeMaticServiceCollectionExtensions`.
- Enables support for CCU backup handling via `ICcuBackupServiceBuilder`.
- Implemented `CcuBackupService` to handle HomeMatic CCU system backups via JSON-RPC and HTTP.
- Added `CcuBackupServiceBuilder` for flexible service configuration based on host and credentials.
- Introduced CLI support with the `CreateBackupCommand` and `CreateBackupOptions` for managing CCU backups directly from the command line.
- Extended `HomeMaticServiceCollectionExtensions` to register CCU backup services.
- Deleted `CcuBackupService`, `CcuBackupServiceBuilder`, and related interfaces.
- Removed `CreateBackupCommand`, `CreateBackupOptions`, and `CcuCommandGroup`.
- Updated `HomeMaticServiceCollectionExtensions` to exclude CCU backup registration.
…ructure

- Deleted deprecated `CliBaseCommand`, `CliCommandBase`, and associated CLI command implementations.
- Introduced `DataOutputCommandBase` for a streamlined and reusable command structure.
- Added new tests in `CreativeCoders.HomeMatic.Tools.Cli.Base.Tests` to validate `DataOutputCommandBase` behavior and functionality.
…property handling

- Updated collection initializations to use concise syntax for readability.
- Marked `DataOutputCommandBase` class with `[PublicAPI]` for better tooling support.
- Removed redundant private field `_console` and replaced it with a direct property `Console`.
- Consolidated YAML format handling in `DataOutputWriter`.
- Introduced `.serena/project.yml` with project-specific settings.
- Configured C# as the primary language for the Serena language server.
- Enabled gitignore integration and UTF-8 encoding as defaults.
- Added placeholders for advanced project and tool configurations.
… unit tests

- Introduced `Link` and `LinkInfo` classes to represent HomeMatic communication links.
- Added `LinkFlags` and `GetLinksFlags` enums for link state and API filtering options.
- Implemented extension methods in `HomeMaticXmlRpcApiLinkExtensions` for strongly-typed link operations.
- Updated `IHomeMaticXmlRpcApi` with new methods: `GetLinksAsync`, `AddLinkAsync`, `RemoveLinkAsync`, `SetLinkInfoAsync`, and `ActivateLinkParamsetAsync`.
- Added `CreativeCoders.HomeMatic.XmlRpc.Tests` project with comprehensive tests for the `Links` module, ensuring full coverage.
…ce` tests

- Replaced `HomeMaticXmlRpcApiBuilderLinkSurfaceTests` with an extended `HomeMaticXmlRpcApiBuilderTests` suite for improved test clarity and edge case handling.
- Added null argument checks and error scenario validations for `HomeMaticXmlRpcApiBuilder` and `HomeMaticXmlRpcApiLinkExtensions`.
- Improved bitmask flag tests in `GetLinksFlagsTests` and `LinkFlagsTests` to ensure completeness.
- Refactored test structure and added assertion comments for better readability.
…conversion tests

- Deleted `GetLinksFlagsTests`, `LinkFlagsTests`, and `LinkTests` as they overlap with `FlagsMemberValueConverter` and API extension tests.
- Added `FlagsMemberValueConverterRxModesTests` for comprehensive RxModes conversion testing.
- Expanded `HomeMaticXmlRpcApiLinkExtensionsTests` and `HomeMaticXmlRpcApiBuilderTests` for new edge cases and error propagation validation.
…guration validation

- Added `CcuClientLinkTests` and `CcuDeviceChannelLinkTests` for thorough validation of link operations.
- Introduced `CompleteCcuDeviceBuildOptions` class to configure link inclusion during snapshot creation.
- Enhanced `DeviceExporter` to include communication links when exporting devices.
- Updated interfaces and entities to support link retrieval, export, and error handling.
- Increased test coverage for edge cases and API interactions.
…le paramset deserialization

- Added `ParamSetDictionaryValueConverter` to handle HomeMatic `getLinks` paramset conversion, tolerating deviations in XML-RPC response formats.
- Updated `Link` model to include the new converter for `SenderParamSet` and `ReceiverParamSet`.
- Introduced unit tests to ensure correct handling of various `XmlRpcValue` types, including edge cases.
- Introduced `UseEncoding` with `Encoding.Latin1` in `HomeMaticXmlRpcApiBuilder` to support custom character encoding.
- Updated unit tests to include mocking for `UseEncoding` in `HomeMaticXmlRpcApiBuilder`.
- Ensured proper handling of `Encoding` in the API builder's test scenarios.
- Improved null check validation and refactored test consistency.
@darthsharp darthsharp merged commit 6c4075a into main Apr 29, 2026
7 checks passed
@darthsharp darthsharp deleted the feature/moredevicecommands branch April 29, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant