OpenHAB Community,
I stumbled upon this thread looking for a “native” OpenHAB solution to being able to configure a Thing configuration parameter as part of a Rule.
The solution that I currently have it to use ZWaveJSUI and Zigbee2MQTT, and then you can literally map the MQTT topic to a channel and then to an Item.
So for example, I have an Inovelli LZW36 light/fan combo zwave switch connected to ZwaveJSUI, with this Generic MQTT Thing configuration:
Thing mqtt:topic:zwave01-nodeID_15 "F1_GuestRoom_Wall_Switch" (mqtt:broker:8fd56e1f3c)
{
Channels:
Type dimmer : light_dimmer
[
transformationPattern="JSONPATH:$.value",
stateTopic="zwave01/nodeID_15/switch_multilevel/endpoint_1/currentValue",
commandTopic="zwave01/nodeID_15/switch_multilevel/endpoint_1/targetValue/set",
min=0,
max=100,
step=5
]
Type dimmer : fan_dimmer
[
transformationPattern="JSONPATH:$.value",
stateTopic="zwave01/nodeID_15/switch_multilevel/endpoint_2/currentValue",
commandTopic="zwave01/nodeID_15/switch_multilevel/endpoint_2/targetValue/set",
min=0,
max=100,
step=5
]
Type number : kWh [stateTopic="zwave01/nodeID_15/meter/endpoint_0/value/65537", transformationPattern="JSONPATH:$.value"]
Type number : watts [stateTopic="zwave01/nodeID_15/meter/endpoint_0/value/66049", transformationPattern="JSONPATH:$.value"]
Type number : light-led-color
[
stateTopic="zwave01/nodeID_15/configuration/endpoint_0/Light_LED_Indicator_Color",
transformationPattern="JSONPATH:$.value",
commandTopic="zwave01/nodeID_15/configuration/endpoint_0/Light_LED_Indicator_Color/set"
]
}
This is my Item configuration:
// F1_GuestRoom
Group gF1_GuestRoom_Wall_Switch "Wall Switch" <light> (F1_GuestRoom) ["Equipment","WallSwitch"]
Dimmer F1_GuestRoom_Light "Guest Room Light [%d]" <light> (gF1_GuestRoom_Wall_Switch) ["Lighting","Switchable","Point"] {ga="Light", channel="mqtt:topic:zwave01-nodeID_15:light_dimmer"}
Dimmer F1_GuestRoom_Fan "Guest Room Fan [%d]" <fan_ceiling> (gF1_GuestRoom_Wall_Switch) ["Switchable","Point"] {ga="Fan" [ speeds="0=off:zero,33=low:one,66=medium:two,99=high:three", lang="en", ordered=true ], channel="mqtt:topic:zwave01-nodeID_15:fan_dimmer"}
Number:Energy F1_GuestRoom_kWh "Fan/Light Power Consumption [%.1f kWh]" <Energy> (gF1_GuestRoom_Wall_Switch) ["Energy","Point","Measurement"] {unit="kWh",channel="mqtt:topic:zwave01-nodeID_15:kWh"}
Number:Power F1_GuestRoom_watts "Fan/Light Wattage [%.1f W]" <Energy> (gF1_GuestRoom_Wall_Switch) ["Energy","Point","Measurement"] {unit="W",channel="mqtt:topic:zwave01-nodeID_15:watts"}
Number F1_GuestRoom_LightLEDColor "Guest Room Light Color [%d]" <light> (gF1_GuestRoom_Wall_Switch) ["Point"] {channel="mqtt:topic:zwave01-nodeID_15:light-led-color"}
As you can see, you can map configuration endpoints just as easily as switch endpoints.