joleys / niko-home-control-II

Home Assistant Custom Integration for Niko Home Control II
MIT License
74 stars 21 forks source link

Coco unknown entities - enhancement request #169

Closed bartsmetdv closed 2 months ago

bartsmetdv commented 3 months ago

I have a pulse meter in my installation which is not detected, as well as a PV charging station, which has recently been added through the Niko API integration layer.

In can assist in testing.

Logger: custom_components.nhc2.nhccoco.coco Source: custom_components/nhc2/nhccoco/coco.py:414 integration: Niko Home Control II (documentation, issues) First occurred: 11:34:25 (3 occurrences) Last logged: 11:34:25

Class CocoGenericChargingstation not found: module 'custom_components.nhc2.nhccoco.coco' has no attribute 'CocoGenericChargingstation' Class CocoElectricityPulseCentralmeter not found: module 'custom_components.nhc2.nhccoco.coco' has no attribute 'CocoElectricityPulseCentralmeter' Class CocoEaseeChargingstation not found: module 'custom_components.nhc2.nhccoco.coco' has no attribute 'CocoEaseeChargingstation'

tijsverkoyen commented 3 months ago

@bartsmetdv can you mail me your Device List

Bartsmet commented 3 months ago

@tijsverkoyen : Done.

tijsverkoyen commented 3 months ago

Class CocoGenericChargingstation not found: module 'custom_components.nhc2.nhccoco.coco' has no attribute 'CocoGenericChargingstation'

I think this is a bogus device as it has no properties. I have added it to the ignore list

Class CocoElectricityPulseCentralmeter not found: module 'custom_components.nhc2.nhccoco.coco' has no attribute 'CocoElectricityPulseCentralmeter'

I suspect you have https://www.niko.eu/en/article/550-00250 in your installation, correct? I don't see any data in your device list. So I think this is not exposed through the API (yet).

Class CocoEaseeChargingstation not found: module 'custom_components.nhc2.nhccoco.coco' has no attribute 'CocoEaseeChargingstation'

@Bartsmet would you be able to test the changes in https://github.com/joleys/niko-home-control-II/pull/170. This PR adds support for your Easee Charging station.

I don't own one myself, but I think I have implemented all available data.

I also contacted Niko, as there is a new parameter HasStream on the Electrical Power property. I suspect this is a new way that allows to read realtime values, but I am not sure. But as I don't own a charging I can't see this in real life.

Bartsmet commented 2 months ago

Hi tijs, this seems to work fine, thx.

I think the CocoGenericChargingstation will be a base implementation where other chargers will inherit from. Niko also supports other charger types. In case you want those later on, it would make sense to refactor the implementation also in this way.

The pulse meter is indeed https://www.niko.eu/en/article/550-00250, I have it in my installation for a long time, and I suppose it's indeed not supported by the API. As the total counters are not neither :-( .

tijsverkoyen commented 2 months ago

@Bartsmet The CocoGenericChargingstation does not expose any properties, so it is the CocoEaseeChargingstation that needs to be used. If other people that have other chargers report this I can still refactor the code.

I will create a new release including these changes.

mherwege commented 1 month ago

@tijsverkoyen If you are interested, I have an Alfen EV charger and can provide the device list for it. I am not using Home Assistant, but openHAB (I developed and maintain the openHAB Niko Home Control integration). I am just following along here for ideas.

Did you get a reply on:

I also contacted Niko, as there is a new parameter HasStream on the Electrical Power property. I suspect this is a new way that allows to read realtime values, but I am not sure. But as I don't own a charging I can't see this in real life.

tijsverkoyen commented 1 month ago

@tijsverkoyen If you are interested, I have an Alfen EV charger and can provide the device list for it. I am not using Home Assistant, but openHAB (I developed and maintain the openHAB Niko Home Control integration). I am just following along here for ideas.

That would be very nice! Feel free to send it to niko-ha [at] verkoyen [dot] eu.

Did you get a reply on:

I also contacted Niko, as there is a new parameter HasStream on the Electrical Power property. I suspect this is a new way that allows to read realtime values, but I am not sure. But as I don't own a charging I can't see this in real life.

Yes I have. The HasStream is an internal attribute and is only used in their internal app. So don't rely on it (yet).