Skip to content
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

Strange behaviour when using 2 ECU in same network #142

Closed
syl2222 opened this issue Dec 19, 2022 · 8 comments
Closed

Strange behaviour when using 2 ECU in same network #142

syl2222 opened this issue Dec 19, 2022 · 8 comments

Comments

@syl2222
Copy link

syl2222 commented Dec 19, 2022

Hello

I have strange behavious with this integration.

Everything work fine, but, time to time, i lost my graph and, when i check entity , i good the message:
This entity is no longer provided by the apsystems_ecur integration. If the entity is no longer used, delete it from the settings.

I remove the ecu and add it again, it's enough.
Then, later (1 minute, 1 hour, 12 hours, 1 day, depending) the second ECU got the same problem

I'm newbie with Homeassistant and unable to fully undestand everything. I attached few debug logs .
I have the impression that with 2 ecu and the absence of unique ID, the integration is lost?

Where can i search to find where is the problem .
home-assistant_apsystems_ecur_2022-12-19T16-17-04.314Z.log

Joyeuses fêtes , merry christmas !

@HAEdwin
Copy link
Collaborator

HAEdwin commented Dec 19, 2022

From your log I extracted that you own 1x ECU-B and 2x DS3-L. One of the DS3-L inverters has an somewhat strange ID 703000012345 was this ID really scanned from the inverters bar-code and is it valid? Make sure the ECU has a valid configuration first and the EMA site represents the correct hardware. Then it will also run fine in HA.

Are you using the latest 1.2.25 version?

For Home Assistant the best thing you can do is remove all (un-)related entities by uninstalling the integration:
Go to [Settings] > [Devices & Services] > Select the three dots above eachother (overflow menu) and choose [Delete].

The entities will now be removed (the software will remain in place, that's ok) but you will notice some entities will remain visible when you navigate to [Settings] > [Devices & Services] tab [Entities]. Select these entities and choose [Remove Selected].
Restart HA

If all "APSystems PV solar ECU" associated entities are removed you can add the Integration again by going to [Settings] > [Devices & Services] > [+ Add Integration] and choose the "APSystems PV solar ECU integration". Enter the IP-Address of the ECU and wait for the integration to complete setup. Hopefully you will now only have valid entities that you can add to the dashboard. If not your ECU might be misconfigured.

@syl2222
Copy link
Author

syl2222 commented Dec 20, 2022

Hello,
Thank you for your answer. (English is not my natural language, so, sorry for errors in typo).

All my id (Ecu and ds3) were (and are) changed before i send the logs, so, don't worry about the strange numbers :)

I try, without problem, to remove all ecu and reinstall them. Everything works fine (data show up and graphs ok).
As soon as i restart HomeAssistant (i need it many times a day as i keep migrating from domoticz to Ha) , i have one Ecu which stop working (not all the time the same one).
In Ema website , everything still ok (graph)
From this git, i'm using v1.2.25 and, it seem than my Ecu(s) are in version 1.2.23

Attached , few logs at each step when i remove /restart HA/reinsert one Ecu.

when I encounter this problem and I try with my old bash script from domoticz, both ecu respond and give me data.
But, I do not know how to program in python and unable to debug :(

logs.txt

Debugs logs :
debug-logs.txt

Maybe, with little luck, somebody should see something in this logs ..

Best regards
Sylvain

@HAEdwin
Copy link
Collaborator

HAEdwin commented Dec 21, 2022

If you really own 2 ECU-B units, the integration has not anticipated on this because settings are stored under the same key. But still it is a bit confusing to see ECU ID's 216300067890 and 216300012345 but these are not the real numbers are they? I know the ECU-B can handle max 4 panels, are you planning to connect more than 4 panels I'd recommend using the ECU-R not ECU-B.

@syl2222
Copy link
Author

syl2222 commented Dec 21, 2022

I confirm than ID's 216300067890 and 216300012345 are fake number (i replace the real number with fake before send logs).
And yes, Ecu-b handle only 4 panels. I have 8 panels so, order 2 ecu-b (2 Ecu-b is much lower price than one ecu-r/c in my country ).
So , when i read: the integration has not anticipated on this because settings are stored under the same key.
This explain my behaviour ? if yes, I feel reassured because, i was thinking than the problem is me :)

@HAEdwin
Copy link
Collaborator

HAEdwin commented Dec 21, 2022

Unfortunately it's way above my head to adapt the integration to work with multiple ECU's (and thus multiple instances of the integration). I added a second instance of the integration and I'm able to reproduce the issue. Initially, each ECU entity does not have a unique ID linked to the ECU, if it would in future versions, it would effect current users having to re-set all entities.
Hopefully you find a solution by buying the ECU-R cheaper abroad for example because it seems all to much of an effort for this single use case. Sorry, hope you understand and maybe someone else is able to take the challenge.

@syl2222
Copy link
Author

syl2222 commented Dec 22, 2022

Thank you for your investigations . I understand than this should be too much work to integrate this use case . Maybe you could add this limitation (only one ecu by integration) in the readme ?
A last question:
I wonder if , by copying this integration into a new one (by changing the name), and , by changing the domain value in the const.py file would allow me to have a workaround in my case?

@HAEdwin
Copy link
Collaborator

HAEdwin commented Dec 22, 2022

That might work because settings are then hopefully stored under the other domain. You can see the settings file by going to the terminal screen then type: cd config > cd .storage > cat core.config_entries but be carefull !!! If you change or remove values you might end up with an inaccessible HA. Make sure you make a full backup before experimenting so you can restore easy from the HA console prompt. Best thing is to let the integration make changes to this file.

@syl2222
Copy link
Author

syl2222 commented Dec 22, 2022

Thank you for everything.
I close this issue as, this is not an issue but a limitation which is excepted

FYi: It seem to working good with the workaround :copy/paste old folder to new name , change Domain in const.py and manifest.json. Now i have on ecu on legacy integration and one Ecu on this duplicate integration.
On core.config_entries , id are different , so ... cross-finger than it will continue working for next days/month/years ! If not, I would search for ecu-r because it's frustrating by don't see everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants