tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
303 stars 52 forks source link

[Bug] error while building list for path : unknown #170

Closed combrs closed 2 years ago

combrs commented 2 years ago

Describe the issue

Freshly added integration detect "devices" (router and ports) but do not get data from router at all (all sensors in state "unavailable") For all requests every 30 seconds. Screenshot: Got router model, but not any other data.

How to reproduce the issue

Reproduced by default install (immediately)

Expected behavior

Get some data as usual

Screenshots

image

Software versions

Traceback/Error logs

Recurrent records in log:

2022-02-04 23:04:23 WARNING (SyncWorker_4) [custom_components.mikrotik_router.mikrotikapi] Mikrotik Reconnected to 192.168.1.3
2022-02-04 23:04:23 ERROR (SyncWorker_7) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.1.3 error while building list for path : unknown
2022-02-04 23:04:53 WARNING (SyncWorker_7) [custom_components.mikrotik_router.mikrotikapi] Mikrotik Reconnected to 192.168.1.3
2022-02-04 23:04:53 ERROR (SyncWorker_6) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.1.3 error while building list for path : unknown

Additional context

Not permission problem - same under admin with full rights. Looks like incompatible api answer format in this ROS version?

tomaae commented 2 years ago

Not sure what is happening. Can you debug it?

combrs commented 2 years ago

How to debug ? Can you post some examples of API requests that application does? (I try it with curl to router to get raw data that router sends in response)

ondras12345 commented 2 years ago

https://github.com/tomaae/homeassistant-mikrotik_router#enabling-debug

combrs commented 2 years ago

I add Using debug, I see in logs: system data is here

2022-02-06 23:44:56 DEBUG (SyncWorker_3) [custom_components.mikrotik_router.helper] Processing entry {'uptime': '6d1h38m33s', 'version': '7.1 (testing)', 'build-time': 'Dec/01/2021 14:07:27', 'factory-software': '6.46.6', 'free-memory': 142794752, 'total-memory': 268435456, 'cpu': 'ARMv7', 'cpu-count': 4, 'cpu-frequency': 896, 'cpu-load': 1, 'free-hdd-space': 80564224, 'total-hdd-space': 134479872, 'architecture-name': 'arm', 'board-name': 'hAP ac^3', 'platform': 'MikroTik'}

Capsman (not used by me) is a error source

2022-02-06 23:44:56 DEBUG (SyncWorker_4) [custom_components.mikrotik_router.mikrotikapi] API query: /caps-man/registration-table
2022-02-06 23:44:56 ERROR (SyncWorker_4) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.1.3 error while building list for path : unknown

All other API requests (under admin user now) also have data responses (about ethernet ports etc). Then

2022-02-06 23:45:27 DEBUG (MainThread) [custom_components.mikrotik_router.sensor] Updating sensor Mikrotik-system_cpu-load

But in dashboard I see (I delete integration and setup it as new) image

tomaae commented 2 years ago

Try to execute /caps-man/registration-table/print terse in mikrotik. that path has to exist.

combrs commented 2 years ago

No /caps-man section on my router, because I use Wifiwave2 package. it is not compatible: "* The wifiwave2 package is not compatible with CAPsMAN. " image

tomaae commented 2 years ago

I see, so that new package removes capsman completely. I dont have compatible device, but will try to install it on one of my development devices.

combrs commented 2 years ago

yes, Wifiwave2 compatible only with this devices (for now)

    hAP ac³ (non-LTE)  <-- my device
    Audience
    Audience LTE6 kit
    RB4011iGS+5HacQ2HnD

If some additional info (full requests output, for example) are needed, I can send it (not in this comments)

tomaae commented 2 years ago

Nope, it wont get installed. Can you give me output of this? Nothing sensitive there: /system/package/print terse

Also: /interface/wifiwave2/registration-table/print terse You can mask MAC addresses there if you want, I just need to see output for formatting.

combrs commented 2 years ago
0  name=routeros version=7.1 build-time=dec/01/2021 14:07:27 git-commit=c10440f8996b58b9f238f14430d31cbad1891c93 scheduled=
1  name=wifiwave2 version=7.1 build-time=dec/01/2021 14:07:27 git-commit=c10440f8996b58b9f238f14430d31cbad1891c93 scheduled=
0 A interface=wifi1 ssid=Mikrotik-F0 mac-address=84:**:**:**:A6:5E uptime=6d4h23m45s60ms signal=-72
1 A interface=wifi1 ssid=Mikrotik-F0 mac-address=DA:**:**:**:2C:82 uptime=5h7m13s930ms signal=-42
tomaae commented 2 years ago

thanks, that should be enough for what I need

vecjh commented 2 years ago

I also use "Wifiwave2" package and confirm that it's incompatible with the current version of this integration. It throws the same error for me as for topic starter.

tomaae commented 2 years ago

yes, if wifiwave2 removes access to capsman, it will affect everyone with wifiwave2 plugin. It will take a bit to tho, I'm working on large update to incorporate new HA model and all the features HA implemented.

tomaae commented 2 years ago

Can you test master? I have no way of testing this myself. Wireless client tracking should also work.

combrs commented 2 years ago

remove ver1.8 from mikrotik_router folder and redjwnload it (git clone) from current master ( commit 5973315048ee746b4b4c18539c3addeabd6ede17 ) at least 'sensors' are fixed, thanks image