tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
301 stars 50 forks source link

[Bug] Providing upgrade to "unknown" version #240

Open Cougar opened 2 years ago

Cougar commented 2 years ago

Describe the issue

Somehow it can't read latest version info and then suggests to do an upgrade to "unknown" version

Expected behavior

Find an actual latest version. It should also check if 6.x or 7.x version is running at the moment.

Screenshots

mikrotik

Software versions

tomaae commented 2 years ago

I will need debugs for this.

Cougar commented 2 years ago

Redacted debug output is attached.

Strange is that custom_components.mikrotik_router.version is 0.0.0.

fw-update.status is ERROR: could not resolve dns name which is actually correct because these CAP clients don't have internet access. CAPsMAN controller does upgrade them. It is probably not very common case and therefore not supported so far.

config_entry-mikrotik_router-6b4a92317a5c1e4e48a77f4c04f93449.json.txt

tomaae commented 2 years ago

dont mind that version, that hardcoded version in manifest file.

this seems to be a shortcoming of the update integration. I have already contacted maintainer to find a standardized solution.

how is it setup that capsman controller upgrade slaves? I would like to detect such a feature, it does not make much sense to have an update sensor on slaves that have managed upgrades.

btw, those are not debugs, but diagnostics. but I understand the issue now so no need for debugs.

Cougar commented 2 years ago

It is not easy to detect unless you can somehow relate CAP clients with CAPsMAN. This is CAPsMAN (controller) setting

/caps-man manager upgrade-policy (none | require-same-version | suggest-same-upgrade)
PavelD commented 1 year ago

I had the same issue on the same model.

When I tried to check updates on the web console I got DNS error or reported no internet.

Ping was working only for local IPs and not for the external one.

The problem has been resolved when i add default gateway as /ip/route/add dst-address=0.0.0.0/0 gateway=192.168.1.1.

Anyway It seems to me as not an issue. You can always hide/disable this generated sensor. And unknown version seems to me as good value when checking is not working on the monitored system.

tomaae commented 1 year ago

I had the same issue on the same model.

When I tried to check updates on the web console I got DNS error or reported no internet.

Ping was working only for local IPs and not for the external one.

The problem has been resolved when i add default gateway as /ip/route/add dst-address=0.0.0.0/0 gateway=192.168.1.1.

Anyway It seems to me as not an issue. You can always hide/disable this generated sensor. And unknown version seems to me as good value when checking is not working on the monitored system.

Its different root cause. For OP's case, update should not run like this due to centralized update system.

sermayoral commented 1 year ago

The bug still persists.

Maybe its should control that an "unknown" version doesn't enable the update entity. Doesn't it? It's not the best solucion, but i think it's better than the actual behaviour.

reedy commented 8 months ago

Screenshot 2024-01-09 at 18 52 05

version 2.1.4

sermayoral commented 5 months ago

Is not there a solution for this problem yet?? It's very annoying