-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[nikohomecontrol] Add electricity meters and car chargers #19477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for car chargers and improved energy metering for Niko Home Control II binding. The purpose is to extend the binding's functionality to control car chargers and provide more detailed energy monitoring capabilities.
Key changes:
- Add complete car charger support with status, charging mode control, and energy metering
- Enhance energy metering with support for home digital meters including grid import/export and self-consumption tracking
- Add HTTP client integration for retrieving meter measurements from the controller
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
thing-types.xml | Defines new energyMeterHome and carCharger thing types with their channels and configuration parameters |
nikohomecontrol.properties | Adds internationalization strings for new car charger and enhanced energy meter functionality |
NikoHomeControlCommunication2.java | Implements car charger device handling, HTTP meter reading support, and enhanced energy meter state updates |
NhcMqttConnection2.java | Refactors SSL context creation to use shared SslContextProvider |
NhcMeterReading2.java | New class for parsing HTTP meter reading responses |
NhcMeter2.java | Enhanced meter implementation supporting multiple readings and improved state management |
NhcHttpConnection2.java | New HTTP client for retrieving meter measurements from the controller |
NhcDevice2.java | Extended device properties to support car charger and enhanced meter fields |
NhcCarCharger2.java | Niko Home Control II car charger implementation |
NikoHomeControlCommunication1.java | Updated meter execution method signature for consistency |
NhcMeter1.java | Enhanced meter implementation with improved reading methods |
NikoHomeControlConstants.java | Added constants for car charger states, charging modes, and energy measurement types |
Multiple handler and configuration files | Support for new car charger thing type and enhanced meter functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...rg.openhab.binding.nikohomecontrol/src/main/resources/OH-INF/i18n/nikohomecontrol.properties
Outdated
Show resolved
Hide resolved
...ntrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMeterEvent.java
Outdated
Show resolved
Hide resolved
...a/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlCarChargerHandler.java
Outdated
Show resolved
Hide resolved
...ntrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/NhcMeterEvent.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thansk for this contribution. I left some comments, mainly about the naming convention, the rest seems pretty solid.
.../main/java/org/openhab/binding/nikohomecontrol/internal/NikoHomeControlBindingConstants.java
Show resolved
Hide resolved
...a/org/openhab/binding/nikohomecontrol/internal/handler/NikoHomeControlCarChargerHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.nikohomecontrol/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
This PR extends the Niko Home Control binding with following functions for Niko Home Control II:
All energy metering has 2 channels: