Problem http binding

using OH3 UI configuration.
Thing configuration:

getting value of the light: => gives an JSON with Gaeste_Light with value on off !

I can set with that POST call my values for a light: (or false)
Configuration Channel:
State Transformation:

Command Transformation:

State URL Extenstion:

On Value:

Off Vavlue:

getting error in stack:

11:57:51.010 [WARN ] [sform.CascadedValueTransformationImpl] - Transformation ignore, failed to parse /postdata.php?gaeste=%2$s: The transformation pattern must consist of the type and the pattern separated by a colon

I already installed json binding.
I do not get the actual state of the light. I thnk this is the problem with the values off/on ? Do I need a rule to transfer to on / off ?

setting is not working because of the false Command Transformation. how ist that correct?


Here it expects a transformation, like you gave for State Transformation
That would look like JS:myscript.js or, which is what the error message is telling you.
Did you mean to put that in commandExtension?

The on=, off= mini-transformationsare bi-directional, dealing with incoming states and outgoing commands.
So you cannot get them to do true/false and on/off at the same time.
It’s probably easiest to make a read-only channel and a write-only channel, you can link both to the same Item.

ok! perfect. i put the /postdata.php?gaeste=%2$s from Command Transformation to Command URL Extension.
I can change the light now !
But the status of the light…
I put in the transform folder the file with that content:

shouldn’t that work?

No idea. What does ‘not work’ look like? Have you installed MAP transform? Have you configured to use this MAP in your HTTP channel, if so how? What’s in your secret JSON? What do you get out of the channel - temporarily link to a String Item so that you can see.

installed map transform. Problem:
I get not the state of the light.
(using url: with Gaeste_Light (off/on) from json

Using state Transformation:

We don’t know what your JSON looks like. We don’t know how you applied your MAP, because we don’t know how your channel is configured now. Can’t help.

thanks. I updated my postdata.php to accept on/off instead of true/false. so it is compatible with reading from callajax.php.
thanks, all works now!