HTTP Binding, new syntax?

I need help with OH3 and the new http binding syntax that I don’t understand:

String lupus_token “Token” (gLupus_XT3) { http="<[ht tp://user:pw@192.168.2.5/action/tokenGet:6000000:JSONPATH($.message)]" }(Bearbeitet)

this was the string I used in OH2.5 which worked very fine. But it seems that’s the old OH1 syntax for the http binfing (if I’m right…). I have read the docs for the binding and I tried different things, but it failed. I want to do it via text file. Can someone help me transforming it?

I have tried this:
Thing http:url:lupus_token “Lupus Token” [ baseURL=“http://192.168.2.5”, username=“user”, password=“pw”, refresh=60 ] {
Channels:
Type string: lupus_token “Lupus Token” [ stateExtension=“action/tokenGet:6000000:”, stateTransformation=“JSONPATH:$.message”]
}

Result: Requesting ‘http://192.168.2.5/action/tokenGet:6000000:’ (method=‘GET’, content=‘null’) failed: 404 Site or Page Not Found

Any advice? Thanks in advance!

Please use code fences.

Try with

stateExtension="action/token"

instead of

stateExtension="action/tokenGet:6000000:"

And make sure you have the JSONPATH Transformation Service installed.

thanks for the quick answer,

now I get this:
Requesting ‘http://192.168.2.5/action/token’ (method=‘GET’, content=‘null’) failed: 404 Site or Page Not Found

JSONPATH transformation is installed.
I have my old OH2 running in parallel and it still works with the old config.
And sorry for not using code fences, that’s one of the 1000 things I need to learn how to use…

I tried this and it worked (although I could swear I tried it before…hmmm)

stateExtension="action/tokenGet"

Thanks!!

Hi Chris,

would you mind sharing your http thing config?
I am not able to connect to my Lupus XT1 plus.