APsystems APS ECU R local inverters data pull

Can this integration/script also used for ECU-B?
It’s optically the same model as ECU-R, the data request could be the same.

No, this integration does not support the ECU-B unfortunately. This topic was allready covered here: APsystems APS ECU R local inverters data pull - #323 by HAEdwin

This subject is covered here: Yc1000 compatibility / ECU-C support · Issue #6 · ksheumaker/homeassistant-apsystems_ecur · GitHub
Thing is that I really took the time to dive into this compatibility thing but without owning an ECU-C, it is hard to get to the bottom of this.

@ksheumaker: I added a pull request

Fix for the energy dashboard thanks to @royvanmanen (issue #21 and #22)

WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.ecu_lifetime_energy (<class ‘custom_components.apsystems_ecur.sensor.APSystemsECUSensor’>) with state_class measurement has set last_reset. Setting last_reset for entities with state_class other than ‘total’ is deprecated and will be removed from Home Assistant Core 2021.11. Please update your configuration if state_class is manually configured, otherwise report it to the custom component author.

1 Like

Thank you. I get the impression that ECU-R is better supported, or at least that the ECU-C is a tad unstable in that it needs to be restarted semi-frequently. I asked since I’m about to sign a contract for a solar panel installation, and have been offered en ECU-R, which I now feel comfortable with.

@HAEdwin, ksheumaker, CodingWerf : Thank you for your great work.
I installed my solar panels yesterday and set up the ECU-B.
Your AddOn reads all the data from the ECU and the inverter
So it seems to be compatible.

That’s great news, thanks for the feedback! This is with WiFi connection I assume?
@Apollon77 you might give it a new try. Compare firmware versions if it still does not work.

Yes, connected via WiFi in my local network.
The two LAN-ports are disabled by the manufacturer.
For your information, I have the firmware ECU_B_1.2.17009.

2 Likes

Did you see the message: { states(‘sensor.ecu_current_power’) | int - states(‘sensor.power_consumption’) | int }} {% else %} {{ states(‘sensor.power_consumption’) | int + states(‘sensor.ecu_current_power’) | int }} {%endif%}’ but no default was specified. Currently ‘int’ will return ‘0’, however this template will fail to render in Home Assistant core 2022.1

This is probably a custom sensor in configuration.yaml? Replacing the “int” instances for “int(0)” will solve your issue. This will default values to zero but is not recommended when you use conditional statements which use zero to trigger. I made one myself using float(0).

For those who have allready updated to HA 2021.12.0. You’ll find the following logline for inverter sensors: … implements device_state_attributes. Please report it to the custom component author.

As from version HA 2021.12 device_state_attributes is deprecated and should be replaced by extra_state_attributes. I’ll add this to the issue list on GitHub and add it to my pull request @ksheumaker. To solve this manually edit and replace two instances of def device_state_attributes for def extra_state_attributes in sensor.py

1 Like

easy fix… thx… wasnt updated yet, Max took my attention today :slight_smile:

also in binary_sensor.py btw? i do have it there too

Hey Sander, yes good practice to replace every instance. I noticed you were looking for the source of this deprecated info, it’s here: homeassistant.helpers — Home Assistant 2021.12.1 documentation

yeah… thats big list too.
have some other custom components that were logging these remarks. Fixed them all by now.

Now let’s hope Kyle @ksheumaker will merge the pull request soon.
I would like to upgrade HA to 2021.12 because of some ZHA device quirks that are included, but I’m waiting a few more days.

the logs are warnings for deprecation, real effect wont be there until next month orso. So go ahead for your ZHA things i would say. (i have only one downside on hue api, but it’s minor)

Merged the latest pull request. Haven’t had a chance to update HA in a while, thanks for the code modifications.

3 Likes

Updated HA, and this integration through HACS. All warnings gone, thanks for all the work everyone!

Seems for me in Hassio the problem is not fixed. For binary_sensor.py it need to be device_state_attributes, otherwise the module will not load. The sensor.py is excepted. Anyone knows why?