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.
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.
When you flick the openHAB switch, openHAB will send the following to BW_2.0.0/command when flicking the switch ON:
When you flick the openHAB switch, openHAB will send the following to BW_2.0.0/command when flicking the switch OFF:
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.
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.