I’m running Openhab 2.4.0-1 and i would like to switch from Philips Hue Gateway to zigbee2mqtt. in the old MQTT Binding it looked like this:
Switch BK_Pflanzenregal_Toggle "Pflanzenregal [MAP(active.map):%s]" <light> (Hue,BK,Lights) { channel="hue:0210:00178847fafb:11:color" }
Dimmer BK_Pflanzenregal_Dimmer "Helligkeit" <light> (Hue,BK) { channel="hue:0210:00178847fafb:11:color" }
Color BK_Pflanzenregal_Color "Farbwahl" <light> (Hue,BK) { channel="hue:0210:00178847fafb:11:color" }
Dimmer BK_Pflanzenregal_Colortemp <color> (Colortemp) { channel="hue:0210:00178847fafb:11:color_temperature" }
String BK_Pflanzenregal_alert <light> (Alert) { channel="hue:0210:00178847fafb:11:alert" }
Switch BK_Pflanzenregal_effect <light> (Effect) { channel="hue:0210:00178847fafb:11:effect" }
in the new MQTT-Binding im struggling with the color, colortemp, and brightness, i can not control the brightness. it is not working.
and how do i control the color?
i created this thing:
Bridge mqtt:broker:mosquitto "Mosquitto" [ host="localhost", port=1883, secure=false, username="xxxx", password="xxxx", clientID="openHAB2" ]
{
Thing topic zigbeebridge "Zigbee2mqtt Bridge" {
Channels:
Type switch : permitJoin [ commandTopic="zigbee2mqtt/bridge/config/permit_join", on="true", off="false" ]
Type string : state [ stateTopic="zigbee2mqtt/bridge/state" ]
Type string : logType [ stateTopic="zigbee2mqtt/bridge/log", transformationPattern="JSONPATH:$.type" ]
Type string : logMessage [ stateTopic="zigbee2mqtt/bridge/log", transformationPattern="JSONPATH:$.message" ]
}
Thing topic dresden_elektronik "Dresden Elektronik" {
Channels:
Type switch : switch "Dresden Elektronik AN/AUS" [ stateTopic="zigbee2mqtt/dresden_elektronik", commandTopic="zigbee2mqtt/dresden_elektronik/set", on="ON", off="OFF", transformationPattern="JSONPATH:$.state"]
Type dimmer : dimmer "Dresden Elektronik Dimmer" [ stateTopic="zigbee2mqtt/dresden_elektronik", commandTopic="zigbee2mqtt/dresden_elektronik/set", min=0, max=100, step=1, transformationPattern="JS:huewhite2openhab.js" ]
Type number : linkquality "Dresden Elektronik LinkQuality" [ stateTopic="zigbee2mqtt/dresden_elektronik", transformationPattern="JSONPATH:$.linkquality" ]
}
}
and this is the items.file
Group Zigbee "Zigbee Geräte zigbee2mqtt"
Group ZigbeeBridge "Zigbee2mqtt Bridge" (Zigbee)
String ZigbeeBridgeState "Zigbee2mqtt Bridge State" (ZigbeeBridge) { channel="mqtt:topic:mosquitto:zigbeebridge:state" }
Switch ZigbeeBridgePermitJoin "Zigbee2mqtt Bridge Permit join" (ZigbeeBridge) { channel="mqtt:topic:mosquitto:zigbeebridge:permitJoin" , expire="10m,command=OFF" }
String ZigbeeBridgeLogType "Zigbee2mqtt Bridge LogType" (ZigbeeBridge) { channel="mqtt:topic:mosquitto:zigbeebridge:logType" }
String ZigbeeBridgeLogMessage "Zigbee2mqtt Bridge LogMessage" (ZigbeeBridge) { channel="mqtt:topic:mosquitto:zigbeebridge:logMessage" }
Group Dresden_Elektronik "Dresden Elektronik" (Zigbee)
Switch Dresden_Elektronik_State "Dresden Elektronik" (Dresden_Elektronik) { channel="mqtt:topic:mosquitto:dresden_elektronik:switch" }
Dimmer Dresden_Elektronik_Dimmer "Dresden Elektronik Dimmer" (Dresden_Elektronik) { channel="mqtt:topic:mosquitto:dresden_elektronik:dimmer" }
Number Dresden_Elektronik_Signal "Dresden Elektronik Signal" (Dresden_Elektronik) { channel="mqtt:topic:mosquitto:dresden_elektronik:linkquality" }
Group Hue_Aura "Hue Aura" (Zigbee)
Switch Hue_Aura_1_State "Hue Aura 1" (Hue_Aura) { channel="mqtt:topic:mosquitto:hue_aura1:switch" }
Dimmer Hue_Aura_1_Dimmer "Hue Aura 1 Dimmer" (Hue_Aura) { channel="mqtt:topic:mosquitto:hue_aura1:dimmer" }
Number Hue_Aura_1_Signal "Hue Aura 1 Signal" (Hue_Aura) { channel="mqtt:topic:mosquitto:hue_aura1:linkquality" }
i can only switch the Hue Aura and the Dresden Elektronik on and off. but i don t know how to change the color? i can’t find any example for controlling Hue color Lamps. how can i control the brightness. i do not want update to openhab 2.5 unstable
br dave