REST API Setpoint Controls

Hey all –

I’m looking for a way to send the equivalent of a “setpoint up” or “setpoint down” command to an item via the Rest API, or otherwise set a relative state rather than absolute.

Assume I have a Volume item, ranging from 0-100, and it’s exposed via a setpoint with min 0, max 100, and step 5. I’m looking to have a “Volume up” API call which raises the volume by a step, and a “Volume down” which lowers it a step.

Any ideas?

Thanks!

Have a look here:

In order to send a command to an item, you would use the item uri (http://localhost:8080/rest/items/Temperature_FF_Office) and send an HTTP POST with the according command in the request body as text/plain.

If the item accepts UpDownType commands, you should be able to send UP or DOWN in the request body.

Aha! Thanks! I’d scraped the docs a bunch, but I think the gap was around the accepted command types. Since the base item class is a Dimmer, IncreaseDecrease should do it. Looking into this, I expect that to do an increase/decrease of a different step size, I’ll need to use a proxy item, and a rule to set status on the physical item.

Thanks again!

Oh yes, INCREASE/DECREASE, not UP/DOWN. Oof. But yes, you got it!