elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
133 stars 24 forks source link

"Unknown Devices" entity - Leased attribute doesn't get updated #93

Closed shlomki closed 5 months ago

shlomki commented 1 year ago

Hey, and thanks for all of your work and keeping this integration live and updated!

I've discovered a new issues where the "Leased" attribute doesn't get updated correctly. Please notice the following screenshot: the entity state has 4 devices but the "Leased" attribute has 7 devices. The correct number of devices is 4 - there are 3 old devices in the "leased" attribute which are not leased anymore.

Screenshot 2023-02-02 at 12 18 39

However, after restarting HA, the attribute is updated correctly:

Screenshot 2023-02-02 at 12 26 37

Using the latest ha-edgeos integration version: v2.0.24 EdgeOS device: EdgeRouter 12 Firmware version: v2.0.8-hotfix.1

VDRainer commented 1 year ago

Same here. EdgeRouter X v2.0.9-hotfix.6 v2.0.27

PlantsThatsWhatsUp commented 10 months ago

Ah just made a similar post as well.

elad-bar commented 10 months ago

I found the issue, just need time to fix it :)

elad-bar commented 5 months ago

released v2.1.0, pls check and report

shlomki commented 5 months ago

@elad-bar The new version crashes on initialization with the following error:

Logger: custom_components.edgeos
Source: custom_components/edgeos/__init__.py:73
integration: Ubiquiti EdgeOS Routers ([documentation](https://github.com/elad-bar/ha-edgeos), [issues](https://github.com/elad-bar/ha-edgeos/issues))
First occurred: 10:57:43 AM (1 occurrences)
Last logged: 10:57:43 AM

Failed to load EdgeOS, error: , line: 36
elad-bar commented 5 months ago

I guess it happens after upgrading from 2.0.x to 2.1.x - if that's the case - you will need to remove the previous set up of the integration, restart and re sdd it

something got broke between those version, it would be much faster to do it like that then wait for a fix, if you think it should be fixed, pls report as new issue related to upgrade and post debug level logs so i'll be able to fix it

thanks

shlomki commented 5 months ago

Something is severely broken, once I removed the integration, HA couldn't load anymore. Only restarting the container helped. I can't even get to a point where I turn on debug logs... I think it's worth fixing this bug regardless of what will be faster. I'll try to create a new issue if I can get HA back up.

elad-bar commented 5 months ago

It will take time up until i will get to it, for now there is workaround to make it work

elad-bar commented 5 months ago

Fixed in v2.1.x