REST API: valid item commands

Hello

I am using a Philips HUE bulb with a conbee stick and everything works fine over the PAPER UI (using Dresden and Hue bindings). For the purpose of integration with another project (voice control module) I need to control the lamp over the REST API. Both “ON” and “OFF” work just fine. However I couldn’t find anywhere what the other supported commands are. In the PAPER interface these are named “Color”, “Brightness” and “Saturation”.
How does these three translate in REST API requests?

Per the docs https://www.openhab.org/docs/configuration/items.html#type, a Color Item supports OnOff, IncreaseDecrease, Percent, HSB.

So you can send: “ON”, “OFF”, “INCREASE”, “DECREASE”, any integer between 0 and 100, or the color specified in Hue, Saturation, Brightness format where Hue is a number between 0 and 359 and Saturation and Brightness are any integer between 0 and 100 (e.g. “180,75,100”).

INCREASE/DECREASE and a single integer between 0 and 100 only adjusts the brightness.

Note that the above applies no matter how you are sending the command, be it from the REST API, the Karaf Console, or a rule using sendCommand.

2 Likes