APsystems APS ECU R local inverters data pull

I agree @checking12, first delete the old integration using the integration settings and “delete” then go to HACS and “remove” the old integration. Then restart Home Assistant. You might also want to use delete on the new integration, restart HA and then Add the integration again. Configurations should be cleaner now.

1 Like

I can do that. No problem. I will give that a try. :slight_smile: Thanks.

Edit: removed all old installations. Restarted HA and, re-installed the reader. Going to keep an eye out on the logs now. Hopefully it keeps running smooth now. :slight_smile:

1 Like

First error in the log arrived

Update failure during occurred while querying inverter. Status is: incomplete inverter data received due to ECU recovery. :neutral_face:

And the second one about 20 minutes later:

Socket claim attempt 1/5 failed: timed out

It’s starting to drive me nuts. I don’t get it. It just to work just fine without errors and suddenly I see errors showing up in the logs that I did not have with the old implementation of the software.

Damn! I think I found the problem.

The problem seems to be the VPN connection that was used for my Solar vlan to connect to the outside world. I could not figure out why the problem suddenly occurred. My subscription recently expired and got a new provider. :man_facepalming:

I moved the solar vlan to a different VPN provider. I have no errors in the logs and the cache counter is now idle on 0 for 1:30 hours now. Before it would go up to 1 every 10 to 20 minutes. I think my new provider was blocking stuff and made the ECU less responsive.

Will keep an eye on the logs, but I think this solves the issue for now. :crossed_fingers: Sorry for bothering you guys here. :slight_smile: Although I would have not found the new software, if it wasn’t for this problem. :wink:

Update:

Socket claim attempt 1/5 failed: timed out

Had two of them now. With about 30 minutes in between.

Yes, that happens now and then, you shouldn’t worry about that. If the socket claim fails too often you might want to take a look at where you positioned the ECU. I started with: So something has changed… I was thinking of network related changes - should also have mentioned that. :thinking:

1 Like

What I find strange is that the ECU_R is running on firmware 1.3.16, while my ECU_R_2160x is running on firmware 1.2.31.
I wonder if this is not causing the problem?

@complex1 Best thing to do is ask APsystems for support. There might be some sort of firmware corruption going on. Maybe caused by a power off during firmware upgrade, who knows.

Could be. Although I never had issues when i used the older software as mentioned before.

The problems seem to have start when the VPN provider changed. It is stable now. :slightly_smiling_face:

@Elnielio have you managed to get it working?

So far it’s running ok. Except that I sometimes get a socket claim attempt. If I do not have to worry about it, can I somehow prevent them from appearing in the logs?

Sure, in the next release I will convert irrelevant warnings to debug logging. If you want to see how often the cache was used the sensor will give insight to that.

1 Like

Issue is not resolved with a different VPN. It’s more stable, but just got the above error again. I guess I have to enable debugging to see what is going on.

I can make the error message better understandable but what it means is that there was no data received from the inverters. But you mention the VPN provider. Is it a remote site on which you monitor the ECU?

Ah ok. I didn’t understand what the message ment.

No, the ECU is only on a different Vlan. But HomeAssistant has access to that Vlan and specifically the ip address of the ECU.
I think the VPN blocked some traffic from the ECU to EMA, causing the ECU to get slow. But that is just a guess, as the ECU was not able to reach EMA and the data did not come through.

When switching the VPN, the data was send to EMA and I got less errors in HA about getting the data.

You do indeed need to give the ECU free access to the internet for the specified ports otherwise you will get unwanted effects. The ECU also does some checks with the EMA site.

1 Like

Thanks. So far it’s going pretty good. Only 1 time an error and 1 Socket claim attempt 1/5 failed: timed out since yesterday afternoon.

I found out about the existence of the APSystems ECU Reader integration and that the “old” APSystems ECU Integration is no longer being maintained, by pure chance, because I happen to be subscribed to this topic. Maybe it would be a good idea to push a final update of the APSystems ECU Integration with just an updated change log with big bold letters asking users to switch to the new integration?

Anyway, I did switch and noticed that my sensor.ecu_lifetime_energy entity changed to sensor.ecu_SERIAL_lifetime_energy (as per the documentation, of course) and I’m wondering if it’s possible to merge the historic data from the old entity to the new entity? As it is right now, I have to keep the old sensor.ecu_lifetime_energy entity from the removed integration in my energy dashboard, or all history from before I switched integrations is lost. That’s not a huge issue, but when I go to configure the energy dashboard, it always says the entity is missing, so it doesn’t look as nice.

Anyway, also want to say a huge thank you to everyone involved in developing these integrations!

Hi Per,

Good idea to do another release on the old repository with only the reference to the new version, I will do that later this year.

I am a bit cautious in the beginning with the announcement because the new integration also has to function well for the users. Especially in the beginning there will still be bugs or comments like the one you have about the sensor.ecu_SERIAL_lifetime_energy entity. Fair comment and unfortunately Home Assistant does not yet provide a facility to transfer the historical data to the new entity (afaik).

I have therefore already made an attempt to write an integration for transferring historical data from one entity to another but that does not seem to work yet, I will have to invest more time in it to understand everything and do testing because it might mess up the database. Maybe there is a good reason why it doesn’t exist yet.

I’m glad you’re enjoying the integration - thank you for your appreciation.

Hey @HAEdwin ,

if i remember well, you switched to an ECU-R-PRO right?
With the markte changes upcoming i’m thinking about changing to an ECU with inverter on/off capability and was wondering if getting a ECU-C or the R-pro would make any difference. And where did you find the R-PRO purchasable?

Same question here, I’m also considering upgrading, but where to buy one in the Netherlands?