Controlling API of Wallbox via OH3

Just to add on this, as it might help, though I use the UI to configure:

The “thing” needs your base URL as you have shown in your previous post - http://192.168.1.11/api/v1/
Your “channel” then can have a state transformation (if required) and/or a command URL extension, in your case this is chargecontrols/1/mode.
You can then define inside the item the different, in your case, “modes”.

Example from my AC item to set AC mode:

I do not use the %2$s in the command as well. Example:

Your error message looks like that the POST you did was wrong (400 Bad Request).
It shows in your log URL, maybe I am wrong though, that your URL ends with mode?quick.
I assume “quick” is your mode, but the “?” should not be there and it should more look like this: chargecontrols/1/mode/quick (not sure again).

A simple way of testing this would be to use either a rule (so you do not need to redefine the items etc. all the time) or Postman.

EDIT: I forgot to explain my map file - it includes the content shown in this post, which are all the commands. This might be needed for you as well as your “quick” mode might need to be part of the body message as your screenshot shows its part of “formData” and not the “path”

1 Like