So you can get all informations to different Items by using JSONPATH transformation (i.e. define one channel with stateTopic BW_2.0.0/message
You need to build a Number Item for each value, then connect the Items to the channel and add a profile JSONPATH transformation with the key word, e.g. $.AIR for the bubbles.
You could also use the JSONPATH transformation within the channel, but you have to create more channels with the same stateTopic then.
HJT is not mentioned in the documentation.
This is the input part.
For commands, I think it will be necessary to build a rule to create the JSON object.
The %s in the Outgoing Value Format is automatically filled in with ON or OFF once linked to a switch, and this is in turn transformed to either 1 or 0 respectively.
Note that it’s not quite clear to me whether CMD and VALUE and XTIME and INTERVAL need the double quote marks around it - the documentation doesn’t specify, but because the message string includes double quotes around the keys I’ve done the same!
You then link the Channel to an Switch Item of your creation.
With this:
When you flick the openHAB switch, openHAB will send the following to BW_2.0.0/command when flicking the switch ON:
{"CMD":2,"VALUE":1,"XTIME":0,"INTERVAL":0}
When you flick the openHAB switch, openHAB will send the following to BW_2.0.0/command when flicking the switch OFF:
{"CMD":2,"VALUE":0,"XTIME":0,"INTERVAL":0}
When your device sends the message, the openHAB switch will be updated with the current state of the air bubbles through the AIR value in the message.
Temperature is essentially the same deal, except use a Number Channel and Number Item instead. How you represent the Number Item in the UI is then up to you - maybe a slider?
I have one last think (I hope :D). The heater has two on states, RED for heating and GRN for standby, if the temperature is below the set temperature. How can I set this in “Incoming Value Transformation” ?
Edit: The absolute best where if the state is RED, the switch color is red and when the state us GRN the switch shows green =)
You will want a Switch Channel and Switch Item. Setup and configuration is the same as you’ve done before, but also add GRN into Custom Off/Closed Value and RED into Custom On/Open Value in the Switch Channel configuration.
I think you don’t understand what I want. GRN and RED are both on states. The documentation links are not helpful. I read that before I post here the first time, but I don’t unterstand it…. That’s the reason I asking for help here
I use the basic ui.
Comment; multistate switch devices (off/low/med/high style) can be represented in openHAB as String type Items, where the string state is a selection of values.
An alternative is to represent by Number type (0-3 in our example) and MAP is a useful transformation to give numbers meaning.