Skip to content

Conversation

mherwege
Copy link
Contributor

This PR extends the Niko Home Control binding with following functions for Niko Home Control II:

  • Add car chargers: allow full control of all car charger settings and fuctions, including switching between solar, smart and normal modes.
  • Add energy metering: electricity, water and gas metering for all supported meter types. The home digital meter is fully supported and the channels provide the same information as in the Niko Home Control app.
  • Add energy metering for car chargers: allows getting electricity consumption and current power for car chargers.

All energy metering has 2 channels:

  • Todays consumption/production
  • Consumption/production relative to a reference date: this can be set in the thing configuration, or will be default to the date of thing creation. This simulates a running meter

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>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@lsiepel lsiepel requested a review from Copilot October 16, 2025 07:49
@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Oct 16, 2025
Copy link

@Copilot Copilot AI left a 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.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Copy link
Contributor

@lsiepel lsiepel left a 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.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@lsiepel lsiepel merged commit 81c1fd2 into openhab:main Oct 20, 2025
2 checks passed
@lsiepel lsiepel added this to the 5.1 milestone Oct 20, 2025
@mherwege mherwege deleted the nikohomecontrol branch October 20, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature for an existing add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants