-
Notifications
You must be signed in to change notification settings - Fork 24
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
Error when adding second EdgeRouter: "Platform edgeos does not generate unique IDs" #152
Comments
Versions:
Both ER-Xs on firmware v2.0.9-hotfix.7 |
can you pls provide diagnostic file for both integrations? thanks |
@elad-bar Thank you - I've emailed the diagnostic files over |
Hi Elad, Okay I've been experimenting since release 2.1.7 trying to bottom out my problems. I think I now have some useful information for you. In summary - when multiple routers exist, entities created by the addon aren't unique across multiple routers. I have 3 edgerouters per home. I would find that if I deleted all routers then the first I added would be fine and then I would have problems with missing interfaces on subsequent ones, or if they did add I wouldn't be able to access the interfaces to for example turn monitoring on. Anyway I finally realised that when the routers have the same interfaces for example ETH0, the second router added wouldn't add ETH0, and in fact would only have the interfaces that were unique from the first router. This can be seen in the logs as:
So in this example interfaces eth0 to eth4 can't be created (though they are in the diagnostic file) because they have already been created for router_1. The same applies for:
All these router level stats have already been created for router_1. I also run primary/secondary DHCP across 2 routers, which means Edgeos replicates the DHCP leases across routers, which means the addon then tries to create duplicate entities for the leases (honestly I would prefer to have the option to disable this functionality totally). This then generates duplicate ID logs for each device in the DHCP lease table:
This is more difficult to fix as obviously you are trying to create the mac uniquely, so maybe just the option to ignore DHCP leases for a given router. I hope thats helpful! Thanks again. |
Hi Elad, Any progress on this problem, it still persists in 2.1.8. In summary - if you have multiple Edgerouters and they all have ETH0 (for example) then integration will only work correctly with one of the routers ETH0, the others will either not be found or not show any entities for that device. |
looks to be this part of code: https://github.com/elad-bar/ha-edgeos/blob/cc9678c575eea992d070038aa6cb4d0e7ec94a2a/custom_components/edgeos/common/base_entity.py#L89C13-L94C14
|
very dirty solution for my home environment, but for me it works. I added 'entity_name' (name of edge router) into the uique_id
after change restart of HA is needed. Then at least the 2nd, 3rd, etc EdgeOS needs to be removed and readded. Best to remove all to have same login in ids. I will not create a pull request, as I am not able to test, nor to see all the consequences, etc... |
I just applied this same change to my installation and it worked immediately. Thanks so much! |
Really appreciate the awesome features of this HA integration.
I am crazy enough to have 2 EdgeRouter Xs on my network for redundancy. I can add the first using this integration, and all data is displayed as expected. When I add the second, no devices or entities are created and these errors appear in the system log:
Am I able to add
{some code}
to myconfiguration.yaml
to address this or is this effectively an improvement request for this integration?Thanks in advance!
EDIT:
neptune
is the hostname of the ER X already added,mercury
is the hostname of the ER X I added second.The text was updated successfully, but these errors were encountered: