Skip to content

Add grid energy balance value#7

Merged
darthsharp merged 6 commits intomainfrom
feature/addgridenergybalancevalue
Apr 17, 2026
Merged

Add grid energy balance value#7
darthsharp merged 6 commits intomainfrom
feature/addgridenergybalancevalue

Conversation

@darthsharp
Copy link
Copy Markdown
Contributor

No description provided.

Replaced the synchronous worker thread with an asynchronous method in MqttValuePublisher to enhance error handling and logging. Simplified the Ensure.NotNull calls and adjusted logging statements for better readability. Added minor formatting changes to improve code consistency.
Introduced new unit tests for DataProcessing to validate SmlValueProcessor behavior. Updated SmlValueProcessor to track GridPowerBalance and use a customizable TimeProvider. Made minor refactors and included new test project setup in the solution file.
Previously, the script deleted the contents of the installation directory directly. Now, it renames the existing installation directory to a backup location before proceeding, ensuring no files are lost until the new installation is confirmed successful.
Removed the redundant ContentType setting when publishing MQTT messages for cleaner code. Updated SmlValueProcessor to ignore zero values and removed unnecessary complete action in the subscription. Adjusted package versions in the project file to match the correct dependencies.
Added a new async method to handle MQTT client reconnection on disconnection. Modified message publishing to support both JSON and string payloads with a new `WriteAsJson` flag in `SmartMeterValue`. Updated MQTTnet package version and refactored server stop procedures for better code organization.
Corrected the sign inversion logic for grid power balance calculation in SmlValueProcessor. The update ensures that current purchasing power and current selling power values are processed with the correct sign. This resolves issues with interpreting power flow direction.
@darthsharp darthsharp merged commit a8e8f86 into main Apr 17, 2026
1 check passed
@darthsharp darthsharp deleted the feature/addgridenergybalancevalue branch April 17, 2026 11:58
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