Mikrotik Binding>API Error

Hello,
I’m creating a new topic because I was not able to find anything related using the search function. Apologize me if I missed it.

I’m trying to configure the Mikrotik binding to connect to my cAP ax. The RouterOS version installed is 7.11.2 and it is configured as a simple access point.
I created a “read only” user in RouterOS an allowed the service API as prescribed in the binding manual.
I’m currently using OpenHAB 4.0.3 installed on Ubuntu 22.04 and I’m using OpenJDK Zulu17.46+19-CA (build 17.0.9+8-LTS).

When I try to configure the binding bridge, the connection is created but every 10 seconds it flips to OFFLINE (communication error) and then back to ONLINE.

The logs are showing this:

2023-10-30 11:17:00.930 [ERROR] [andler.MikrotikRouterosBridgeHandler] - RouterOS cache refresh failed in mikrotik:routeros:0989559e1e due to Mikrotik API error
me.legrange.mikrotik.MikrotikApiException: no such command prefix
	at me.legrange.mikrotik.impl.ApiConnectionImpl$SyncListener.getResults(ApiConnectionImpl.java:482) ~[?:?]
	at me.legrange.mikrotik.impl.ApiConnectionImpl$SyncListener.access$100(ApiConnectionImpl.java:436) ~[?:?]
	at me.legrange.mikrotik.impl.ApiConnectionImpl.execute(ApiConnectionImpl.java:117) ~[?:?]
	at me.legrange.mikrotik.impl.ApiConnectionImpl.execute(ApiConnectionImpl.java:75) ~[?:?]
	at org.openhab.binding.mikrotik.internal.model.RouterosDevice.updateCapsmanRegistrations(RouterosDevice.java:263) ~[?:?]
	at org.openhab.binding.mikrotik.internal.model.RouterosDevice.refresh(RouterosDevice.java:163) ~[?:?]
	at org.openhab.binding.mikrotik.internal.handler.MikrotikRouterosBridgeHandler.performRefresh(MikrotikRouterosBridgeHandler.java:202) ~[?:?]
	at org.openhab.binding.mikrotik.internal.handler.MikrotikRouterosBridgeHandler.scheduledRun(MikrotikRouterosBridgeHandler.java:190) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: me.legrange.mikrotik.impl.ApiCommandException: no such command prefix
	at me.legrange.mikrotik.impl.ApiConnectionImpl$Processor.run(ApiConnectionImpl.java:270) ~[?:?]

I don’t know where to look to understand how to fix that error. Could you please help me giving some directions?

Thanks!

Hello,
i moved to OpenHAB 4.0.4 and RouterOS 7.12 but the error is still the same.

Anyone else is experiencing the same error? Any hint on how I can dig more in details to be able to provide more information?

Thank you!

I am having the same issue. I have just replaced my mikrotik, the old one ran 6.8 routerOS, the new one is 7.8. Probably some API implementation changed, I try to look deeper into that.