Skip to content
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

[Bug] Integration doesn't work with RouterOS 7.13 Beta #328

Open
Foroxon opened this issue Nov 15, 2023 · 88 comments
Open

[Bug] Integration doesn't work with RouterOS 7.13 Beta #328

Foroxon opened this issue Nov 15, 2023 · 88 comments
Labels
bug Something isn't working testing Solution is being tested

Comments

@Foroxon
Copy link

Foroxon commented Nov 15, 2023

Describe the issue

Integration doesn't work

How to reproduce the issue

Steps to reproduce the behavior:

  1. Upgrade Router OS to 7.13 beta2 on device

Expected behavior

It should work like on Router OS <7.13

Software versions

  • Home Assistant version: HA 2023.11.2
  • Mikrotik Router integration version: v2.1.4
  • Mikrotik Hardware: RB5009UG+S+
  • RouterOS version: 7.13beta2

Diagnostics data

No

Traceback/Error logs

Logger: custom_components.mikrotik_router.mikrotikapi
Source: custom_components/mikrotik_router/mikrotikapi.py:95
Integration: Mikrotik Router (documentation, issues)
First occurred: 14 листопада 2023 р. о 21:42:42 (660 occurrences)
Last logged: 12:16:05

Mikrotik 192.168.86.2 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix

@Foroxon Foroxon added the bug Something isn't working label Nov 15, 2023
@L2jLiga
Copy link
Contributor

L2jLiga commented Nov 21, 2023

Did you tried to install "wireless" package as a workaround?
Since CAPsMAN now moved to this package it should work well

@YaoFei509
Copy link

Did you tried to install "wireless" package as a workaround? Since CAPsMAN now moved to this package it should work well

wireless package will confilict with new wifi-qcom package.
So it's better check whether CAPSMAX exists.

@L2jLiga
Copy link
Contributor

L2jLiga commented Nov 22, 2023

So in wifi-qcom CAPsMAN renamed to CAPsMAX?
If so, then integration now have to check both in order to keep compatibility and provide new functionality

@Foroxon
Copy link
Author

Foroxon commented Nov 22, 2023

So in wifi-qcom CAPsMAN renamed to CAPsMAX? If so, then integration now have to check both in order to keep compatibility and provide new functionality

wifi-qcom is just a driver for wifi hardware and does not add any interfaces.

So, as I understand "wireless" package was renamed to "wifi", so now CAPsMAN can be found on interface wifi capsman

Screenshot 2023-11-22 at 11 18 25

@L2jLiga
Copy link
Contributor

L2jLiga commented Nov 22, 2023

For ROS < 7.13: /caps-man
For ROS >= 7.13: /interface/wifi/capsman when wireless package installed

Is it correct?

@Foroxon
Copy link
Author

Foroxon commented Nov 22, 2023

Yes. But also it was totally rewritten. So there is no more /interface/wifi/capsman/registration-table as it was on /caps-man/registration-table.
Now it's common for local managed wifi and CAPsMAN managed wifi and located in /interface/wifi/registration-table.
It may be similar for other old caps-man functions.

Edit: also we do not need to install additional wireless package to have /interface/wifi/capsman. Now it's included to base RouterOS package.

@L2jLiga
Copy link
Contributor

L2jLiga commented Nov 22, 2023

I'm glad that I decided to stay on 7.12.1 😅

@GlenWi
Copy link

GlenWi commented Nov 25, 2023

I have this exact issue also.

2023-11-25 19:17:10.751 WARNING (SyncWorker_3) [homeassistant.components.mikrotik.hub] Mikrotik 192.168.88.1 failed to retrieve data. cmd=[/caps-man/interface/print] Error: no such command or directory (caps-man), no such command prefix
2023-11-25 19:17:10.753 WARNING (SyncWorker_3) [homeassistant.components.mikrotik.hub] Mikrotik 192.168.88.1 failed to retrieve data. cmd=[/interface/wireless/print] Error: no such command or directory (wireless), no such command prefix
2023-11-25 19:17:10.754 WARNING (SyncWorker_3) [homeassistant.components.mikrotik.hub] Mikrotik 192.168.88.1 failed to retrieve data. cmd=[/interface/wifiwave2/print] Error: no such command or directory (wifiwave2), no such command prefix
2023-11-25 19:17:14.211 ERROR (SyncWorker_5) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:17:29.026 ERROR (SyncWorker_0) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:17:42.597 ERROR (SyncWorker_8) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:18:05.791 ERROR (SyncWorker_2) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:18:49.419 ERROR (SyncWorker_9) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:20:12.635 ERROR (SyncWorker_7) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:21:35.120 ERROR (SyncWorker_5) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:22:57.413 ERROR (SyncWorker_6) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:24:20.032 ERROR (SyncWorker_6) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix

2023-11-25 19:25:42.635 ERROR (SyncWorker_7) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:27:05.064 ERROR (SyncWorker_9) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:27:40.629 ERROR (SyncWorker_9) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:27:48.116 ERROR (SyncWorker_6) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:28:00.331 ERROR (SyncWorker_6) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:28:22.802 ERROR (SyncWorker_0) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:28:27.241 ERROR (SyncWorker_4) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:29:05.370 ERROR (SyncWorker_2) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:29:49.701 ERROR (SyncWorker_7) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:31:12.221 ERROR (SyncWorker_10) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2023-11-25 19:32:34.805 ERROR (SyncWorker_1) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix

@tomaae tomaae added the planned To be implemented in future release label Dec 7, 2023
@tomaae
Copy link
Owner

tomaae commented Dec 7, 2023

yea, I never touch betas. specially with mikrotik, they often change major things mid betas.
good to know about this tho, if it makes it to at least RC, I will implement it.

@GlenWi
Copy link

GlenWi commented Dec 7, 2023

Hi Tomaae,
Yes, It's on RC2 now so I expect it will be in.

@slackr31337
Copy link

I added a PR to fix this. (Fix for ros 7.13 wireless #332)

@Lieta2
Copy link

Lieta2 commented Dec 15, 2023

7.13 stable was released today.
Before 7.13 these existed:
/interface/wireless/
/caps-man/interface/
Starting from 7.13:
/interface/wifi/
/interface/wifi/capsman
/interface/wifiwave2 is alias to /interface/wifi

@fragtion
Copy link

fragtion commented Dec 15, 2023

The wireless package is now optional. Integration setup should be possible without wireless/capsman, but that is not so. Setup fails to initialize the device...:
image
Routeros v7.13 stable

@M0DDer
Copy link

M0DDer commented Dec 21, 2023

I'm waiting for update

@VladimirV01
Copy link

I have the same issue.

Upgraded to ROS 7.13 and the integration does not work.

@Yamaha0014
Copy link

Hi, After ugraded to 7.13 integration not connect to router. My router C53UiG+5HPaxD2HPaxD (Mikrotik AX3), We wait for update integration. Thenks for Your great job.

@L2jLiga L2jLiga mentioned this issue Jan 3, 2024
@vheneraliuk
Copy link

Why does it take so long to fix this issue? I can't use this integration for about two months now.

@GlenWi
Copy link

GlenWi commented Jan 6, 2024

Same here. Maybe it's a difficult problem to solve? It looks pretty embedded in Mikrotik's roadmap as 7.14 beta is using the same structure now.

@M0DDer
Copy link

M0DDer commented Jan 14, 2024

It Works even at 7.14 !

With this file, added manualy from (you need to replace file)
custom_components/mikrotik_router/coordinator.py

and this changes (you need to add 2 lines)
[custom_components/mikrotik_router/coordinator.py](#332 (comment))

Работает даже в 7.14 !

Скачать и заменить файл
custom_components/mikrotik_router/coordinator.py

Добавить две строчки в другой файл
[custom_components/mikrotik_router/coordinator.py](#332 (comment))

@ranrinc
Copy link

ranrinc commented Jan 15, 2024

It Works even at 7.14 !

With this file, added manualy from (you need to replace file) custom_components/mikrotik_router/coordinator.py

and this changes (you need to add 2 lines) [custom_components/mikrotik_router/coordinator.py](#332 (comment))

Работает даже в 7.14 !

Скачать и заменить файл custom_components/mikrotik_router/coordinator.py

Добавить две строчки в другой файл [custom_components/mikrotik_router/coordinator.py](#332 (comment))

Which coordinator.py do I need to download/replace 1st or 2nd one? TIA

@L2jLiga
Copy link
Contributor

L2jLiga commented Jan 15, 2024

Actually you have 2 more options to install version from #332

Option 1 - Like HACS manual install

Just follow HACS manual install instruction, except steps 2 and 3

download zip file from this specific branch on repo short link via "Code" -> "Download zip"
image

Option 2 - Install via Shell
~/config$ cd custom_components/
~/config/custom_components$ rm -Rf mikrotik_router
~/config/custom_components$ curl https://codeload.github.com/slackr31337/homeassistant-mikrotik_router/zip/refs/heads/ros-7.13 -o master.zip
~/config/custom_components$ unzip master.zip
~/config/custom_components$ mv homeassistant-mikrotik_router-ros-7.13/custom_components/mikrotik_router/ .
~/config/custom_components$ rm -Rf homeassistant-mikrotik_router-ros-7.13/
~/config/custom_components$ rm -Rf master.zip
~/config/custom_components$ ls -l
total 4
drwxrwxr-x 3 user user  4096 Dec 27 14:28 mikrotik_router

@mrbaja
Copy link

mrbaja commented Jan 31, 2024

After using @M0DDer 's fix, integration is working again, however number of wired clients is not working, it always reports 0.
Is anyone else having the same issue?

@GlenWi
Copy link

GlenWi commented Jan 31, 2024

Yes, I have the same issue - 3 wired clients but the integration says 0

@FrankGiesecke
Copy link

Is there any working solution for this issue?

I have two MikroTik machines, one "RB5009UG+S+" an one "hAP ax lite LTE6".
Both integrations run the same error:

2024-02-22 13:32:03.123 ERROR (SyncWorker_2) [custom_components.mikrotik_router.mikrotikapi] Mikrotik xxx.xxx.xxx.xxx error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix

But the integration of RB5009 seems to works.
All interfaces are queries and the entities will be available in HA.

But the integration of the hAP doesn't.

Both routers are running on RouterOS v7.13.5

@Korvenwin
Copy link

Korvenwin commented May 31, 2024

It is working for me.
EDIT: I'm using the master version.

@Real-Ztrawberry
Copy link

For what it's worth, I managed to get the integration working on existing instances as well as a new installation by:

  • Ensuring beta features are disabled in HACS
  • Use Redownload in HACS, wait for the versions to be populated, select Master at the bottom of the list. Wait a bit
  • Reboot HA (not just a quick restart)
  • Do above again and again until it works

@riddley
Copy link

riddley commented Jun 1, 2024

@tomaae
Would you please communicate your intentions with the community? Are you interested in help or new maintainers? A little communication would be really appreciated.

@Yamaha0014
Copy link

It is working for me. EDIT: I'm using the master version.

ok, I updated ax3 to 7.15 and working ok, I have integration with copy files by ftp.

Copy link

github-actions bot commented Aug 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Aug 9, 2024
@FrankGiesecke
Copy link

There is still no new version.

I'm running on master for 9 month now and can confirm, that everything is working fine.

So I'll bagging you @tomaae release a version.

@github-actions github-actions bot removed the stale label Aug 10, 2024
@riddley
Copy link

riddley commented Aug 11, 2024

Inching up on a year since the last release. I think it might be time to admit to ourselves that this software has been abandoned.

@FrankGiesecke
Copy link

@riddley but the commits in the main brach looks like the work is still in progress

@SkeLLLa
Copy link

SkeLLLa commented Aug 19, 2024

Mikrotiks now have native mqtt integration. So in theory all the necessary stats and switches could be managed by a collection of mikrotik scripts that listen/publish mqtt messages. The drawback is that there will be a need to manually setup proper sensor units, etc.

@Korvenwin
Copy link

MQTT is a great idea!!

@Onepamopa
Copy link

Onepamopa commented Aug 23, 2024

Errors out on CCR2994 - it's a model without any wireless capabilities.
Mikrotik 192.168.254.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix

Why does the integration ask for capsman in the first place, especially if capsman is OFF ?

@SkeLLLa
Copy link

SkeLLLa commented Aug 27, 2024

For those who's interested in mqtt, there's a repo: https://github.com/Xrlls/MikroTik-Home-Assistant-MQTT-telemetry.
It doesn't have a lot of functions, but it has good enough set for monitoring your router.

@Korvenwin FYI.

@FrankGiesecke
Copy link

For those who's interested in mqtt, there's a repo: https://github.com/Xrlls/MikroTik-Home-Assistant-MQTT-telemetry. It doesn't have a lot of functions, but it has good enough set for monitoring your router.

@Korvenwin FYI.

Cool, I'll test this. The main use case for me is to fetch statistics about the uplink interfaces (rx/tx).
The only thing I will miss is the opportunity to update the mikrotik devices direkt from HA.

@herijaya
Copy link

2024-08-29 13:37:12.191 DEBUG (SyncWorker_10) [custom_components.mikrotik_router.mikrotikapi] API query: /caps-man/registration-table
2024-08-29 13:37:12.194 ERROR (SyncWorker_10) [custom_components.mikrotik_router.mikrotikapi] Mikrotik 192.168.57.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
2024-08-29 13:37:12.196 DEBUG (MainThread) [custom_components.mikrotik_router.coordinator] Finished fetching Mikrotik data in 1.531 seconds (success: False)

@Onepamopa
Copy link

To get rid of the capsman issue, I changed coordinator.py, at least now the integration works.

    elif 0 < self.major_fw_version >= 7:
        self.support_ppp = True
        self.support_wireless = False
        if "wifiwave2" in packages and packages["wifiwave2"]["enabled"]:
            self.support_wifiwave2 = True
            self.support_capsman = False
        else:
            self.support_wifiwave2 = False
            self.support_capsman = False

@ilexpl01
Copy link

ilexpl01 commented Sep 11, 2024

To get rid of the capsman issue, I changed coordinator.py, at least now the integration works.

    elif 0 < self.major_fw_version >= 7:
        self.support_ppp = True
        self.support_wireless = False
        if "wifiwave2" in packages and packages["wifiwave2"]["enabled"]:
            self.support_wifiwave2 = True
            self.support_capsman = False
        else:
            self.support_wifiwave2 = False
            self.support_capsman = False

It did not work 4 me :(

Once I have added wireless-7.15.3-tile.npk package to my CCR1009 (the router doesn't have wireless anyways) integration started to work fine.

ros: "7.15.3"

@Onepamopa
Copy link

I haven't added any wireless packages (the router doesn't have wireless anyways)

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Sep 26, 2024
@FrankGiesecke
Copy link

Not stale!

@github-actions github-actions bot removed the stale label Sep 29, 2024
@Real-Ztrawberry
Copy link

A major problem is with the new HACS 2.x you cannot select master any longer. So impossible to get the integration to work on new HA installations. It is now 326 days since 1st reported, wish there was something we could do to help advance the resolution.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Oct 21, 2024
@FrankGiesecke
Copy link

Thai issue won't be closeable until a new version is released.

@github-actions github-actions bot removed the stale label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing Solution is being tested
Projects
None yet
Development

No branches or pull requests