Rest API (basicUI/CMD no longer work?)

Hello everyone,
I am using the current openHAB version 5.1 and since the update I am experiencing a problem with my HTTP binding.

I am controlling a second openHAB instance, which runs on a separate system and is accessed via VNC.
This second instance has always been controlled through HTTP requests sent from my main openHAB installation.

For this purpose, I use an HTTP Thing that previously sent commands to an item on the second instance using the old BasicUI‑CMD interface. This worked flawlessly for years.

Here is an example from my Thing configuration:

Type switch : Terrasse "Terrasse" [
    mode = "READWRITE",
    stateExtension = "rest/items/Terrasse",
    stateTransformation = "JSONPATH:$.state",
    commandExtension = "basicui/CMD?Terrasse=%2$s",
    onValue = "ON",
    offValue = "OFF"
]

Retrieving the status still works:

http://192.168.3.3:8080/rest/items/Terrasse

However, sending a command via:

http://192.168.3.3:8080/basicui/CMD?Terrasse=ON

no longer works since an openHAB update.
Instead, I get the following error message:

Sorry
Requested content not found.

Debug information
Url: /basicui/CMD?Terrasse=Toogle
Path: /basicui/CMD
Query:
Terrasse: Toogle
Route: (.*)

It looks like the entire /basicui/CMD interface has been removed or changed.
Before the update, this worked exactly as expected.

My question:
Is there a new or official way in openHAB 5.x to send a GET‑URL command to an item — especially when controlling a second openHAB instance remotely?

Thanks in advance for any help!
Joe

That was never an officially supported API end point and in fact it’s use was actively discouraged. I don’t know that it has since been removed but if so they would not have announced it since it was never supported in the first place.

There are several alternative ways for one OH to see and control another one though.

The first option is the officially recommended way to implement this use case.

Note, the Tutorials and Examples section is a place to post tutorials and examples, not a place to ask for one.

1 Like

What was your previous OH version having this interface working that way (before upgrading to OH 5.1) ?

I am not sure there was anything disabled about that in 5.1.

Thanks for the solution with RemoteOpenHAB. It works great.

I still played around a bit with the REST API.
OH Instance 1 is running OH 5.1 on a Linux system ← here the API does not work and shows the following error:

Sorry
Requested content not found.

Debug information

Url: /basicui/CMD?WasserStatus=OFF
Path: /basicui/CMD
Hash:
Params:
Query:
  WasserStatus: OFF
Route: (.*)

OH Instance 2 is running OH 5.1 on a Raspberry Pi with openHABian ← here the API works and successfully executes commands.

Maybe someone has an idea what else I could check on the instance where the API is not working.

Do you have the implicit user role turned off on the instance that doesn’t work?

Is BasicUI installed on the instance that doesn’t work?

You´re right, however I lost my BasicUI.

Thx

Blockquote
For this purpose, I use an HTTP Thing that previously sent commands to an item on the second instance using the old BasicUI‑CMD interface. This worked flawlessly for years.

I don’t think it is true that this backdoor access has been removed or tampered with in OH 5.1. I use it extensively, even though I know it is not officially supported. I am running OH 5.1 in a docker and I can access the /basicui/CMD? without issue. I access it through an older iPAD programmable remote app “DemoPAD” to command a number of devices through OH. It has worked flawlessly in the past and for me at least it continues to do so. As a result I don’t think your issues are basicui related

I can confirm it is working with 5.1

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.