Classic UI CMD URL not working, possibly v2.4 upgrade change?

I cannot swear that this is a change since moving to v2.4 but it could well be.

I use wireless tag presence location and have it set to send a URL call when it is in range and out of range. This used the classic UI URL I understand.

An example of the URL I send is this


I currently think there is no way using the REST interface to change the state of an item from a URL like in the above example, if there is then I will happily change it to use the REST interface.

This was certainly working a few days ago and I noticed it was not working this evening, as I have upgraded today I am drawing a possible connection.

[EDIT] It turns out it was not an upgrade change, but I would still like to know if there is a REST way to perform a URL CMD?



I was not even aware that you could send commands via the ClassicUI… wow :slight_smile:

Unfortunately, you can’t use a simple HTTP URL to send a command and/or to change the state of an Item using the REST API

for the command you need to use HTTP POST method, so you can’t simply format this in a URL.

For the command use:

curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "ON" "http://OH2_IP:8080/rest/items/Robo500"

For the state update, you need to use the HTTP PUT method:

curl -X PUT --header "Content-Type: text/plain" --header "Accept: application/json" -d "ON" "http://OH2_IP:8080/rest/items/Robo500/state"

It was and has been an undocumented and not officially supported call. I don’t know that it has been killed but it is definitely not guaranteed to remain supported for the long run.

It may be an obvious question, but you do still have ClassicUI installed?

1 Like

Strangely for me, I actually did check that.
And yes Classic UI was installed.

And as per my EDIT on the original post it is still functioning, The issue has yet to be tracked down and may never be as I am investigating an alternative and supported way to integrate the wireless tags reachability using IFTTT as both systems support it. I did like the direct approach as it did not involve the internet but as Rich points our its only a matter of time before it fails to function and I cannot imagine people will flock to fixing an unsupported feature when that time comes.



Well there is a supported way to make a direct call, but it requires using an HTTP POST (I think) command which your tags may not support.

If you install the Rest API docs listed under Misc in PaperUI it will add interactive docs as a tile on the dashboard. It shows all of the ways you can interact with OH over HTTP. The Items section will show how to send commands to an item.