[OH3] Sending command to item via REST API does not trigger change

Hi all

I’m using a custom UI which communicates with OH via the REST API.
After migrating to OH3, I noticed some weird behavior with some rules.

I did some debugging and noticed that when POSTing a command to an item (e.g. a switch) via the API, the item does not change. The command is received, but no change follows.

If I flip the switch via mainUI, logs show that the item receives the command, which is immediately followed by a change in its state, as expected.

Is this expected behavior? It didn’t happen before.
Should I now send a command and an update every time I want to change an item? Or is this a bug?

Thanks in advance.

I can’t imagine what is going on because MainUI issues a POST to that same REST API endpoint. It’s doing exactly what you say your custom UI is doing.

What happens when you use CURL?

What happens when you issue the POST through the REST API docs?

Just to be clear, absolutely nothing has changed in OH 3 in how the REST API works.

1 Like

Really embarrassed, but false alarm :roll_eyes:

The problem was elsewhere (in my code) and it led me to incorrectly think the item’s state did not change.

Thanks for the help!