HTTP Binding with POST for in-parameter

Hello,

I’m trying to connect to a Power-Metering solution (Voltcraft SEM-5000 Pro).

I would like to read the current live power consumption. This happens by performing a POST request with specific JSON in the body.

I read about the HTTP Binding add-on but it seems I can only perform a POST for an OUT binding, not for an IN binding.

Is there a way to do this?

Thanks,

sacha

(I’m on the 1.9 branch)

Use a rule and

val result = sendHttpPostRequest(String url, String contentType, String content)

Then you will likely need to parse the String that is returned. You can use Transforms with the call

transform(String type, String function, String value)

This can be handy if it returns JSON, XML, or something that can is suitable for regex.