homeassistant-mikrotik_router icon indicating copy to clipboard operation
homeassistant-mikrotik_router copied to clipboard

[Bug] Providing upgrade to "unknown" version

Open Cougar opened this issue 1 year ago • 9 comments

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

  • Home Assistant version: 2022.8.6
  • Mikrotik Router integration version: v2.1.1
  • Mikrotik Hardware: 951G-2HnD
  • RouterOS version: 6.49.6

Cougar avatar Aug 24 '22 21:08 Cougar

I will need debugs for this.

tomaae avatar Aug 24 '22 21:08 tomaae

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

Cougar avatar Aug 26 '22 18:08 Cougar

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.

tomaae avatar Aug 27 '22 05:08 tomaae

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)

Cougar avatar Aug 27 '22 10:08 Cougar

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.

PavelD avatar Oct 21 '22 21:10 PavelD

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.

tomaae avatar Oct 21 '22 22:10 tomaae