Finallly I found the time to upgrade to openHAB 2.5.5-1 (Release Build). And there we are, I also got your warning message. For me it is unbelivable, that they put so much change into a 0.0.1 Release update. But this is not the right place to discuss that topic.
// TI ZigBee to MQTT board
Contact ZigBeeBridge_state "ZigBee Bridge (TI CC1352P) [MAP(contact_online.map):%s]" <myswitch> {channel="mqtt:topic:MyMQTTBroker:bridge:state"} // use modified switch-icon for contact with open/closed
sitemap default label="Home" {
Frame label="Network Monitoring" {
Text item=WiFi_AP icon=switch // just as an example for a ping-device
Text item=PhilipsHUE_ZigBeeBridge // just as an example for a ping-device
Default item=ZigBeeBridge_state // use myswitch icon
}
This nicely detects unplugging the bridge from USB-port (and its re-connect). Very fast.
Can be used in a section together with ping-devices (same icon / status-text appearance).
This is a long and useful topic! This may be more of a Zigbee2MQTT question but how do we find out all the available options that something like a Hue RGB bulb has?
I am used to my Xiaomi sensors and sockets which seem to broadcast their current status. Am I right in saying the HueBulbs don’t broadcast their current state and settings?
What I do with a new Zigbee device, after pairing with zigbee2mqtt, is use MQTT Explorer to ‘sniff’ what the new device parameters are.
Sometimes you’ll also have to command the device to see what the ‘extra’ parameters are, such as double or triple button presses, though I don’t know if that’s necessary for a bulb.
Yeah that’s what I do with my sensors… But with the Hue Bulbs I don’t have a hue hub or remote so now way to control the bulbs except for using Zigbee2MQTT…
Either way, surely when you turn your bulb on (as in, supply it with power), it will initially communicate with zigbee2mqtt, and therefore you’ll be able to pick up most parameters?
I also have an Osram RGBW Bulb but unfortunately, your solution doesn’t work for me
I have set the same “formatBeforePublish” pattern but only the first value of the color state is being published. For example the color state is 230,100,100 then only 230 is inserted as the %s inside the format.
I just found the solution:
When we have a comma separated string, the first %s in the format represents the first value, the second %s the second and so on.
Example (you can set the outgoing value format via PaperUI and it will do the necessary escapes for you):
color state: 230,100,100
outgoing value format: {"color": {"hsb": "%s"}}
result: {"color": {"hsb": "230"}}
… doesn’t work!
outgoing value format: {"color": {"hsb": "%s,%s,%s"}}
result: {"color": {"hsb": "230,100,100"}}
… exactly what we need
I also made a pull request to update the readme of the mqtt-binding.
can you tell me why when i remove this from the line it works " @ “SZ”` "
i dont know were to find any thing about it ,becourse i dont know what it do ?
I hope you can help Simon . I know it`s a mqtt thing problem but ?
PS : can you show some of your zigbee sitemap ? i have it working i paperui and shows up in log fine ,but i can`t get anything to show up on sitemap ??
Nothing happens when i push the lines ,its like its just a txt line and whit no values ?
maybe its a rookie mistake but i cant find any thing about it ,and it dose work on computer only not in app , not even the switch is there ???
Frame label="sensor_1" icon="button" {
Switch item=mqtt_topic_sensor_1_sensor_1_Occupancy icon=switch label="sensor_1 : [%s]" valuecolor=[==ON="#a9f7b8", ==OFF="#f8a9ad"]
Text item=mqtt_topic_sensor_1_sensor_1_battery icon="battery" label="Battery [%.0f %%]"
Text item=mqtt_topic_sensor_1_sensor_1_voltage icon="battery" label="Voltage [%.0f mV]"
Text item=mqtt_topic_sensor_1_sensor_1_linkQuality icon="qualityofservice" label="Link quality [%.0f]"
}
Frame label="sensor_2" icon="button" {
Switch item=mqtt_topic_sensor_2_sensor_2_Occupancy icon=switch label="sensor_2 : [%s]" valuecolor=[==ON="#a9f7b8", ==OFF="#f8a9ad"]
Text item=mqtt_topic_sensor_2_sensor_2_battery icon="battery" label="Battery [%.0f %%]"
Text item=mqtt_topic_sensor_2_sensor_2_voltage icon="battery" label="Voltage [%.0f mV]"
Text item=mqtt_topic_sensor_2_sensor_2_linkQuality icon="qualityofservice" label="Link quality [%.0f]"
}
Frame label="Bar skab" icon="button" {
Switch item=mqtt_topic_door_contact_1_door_contact_1_contact icon=switch label="Bar skab : [%s]" mappings=[ON="Lukket", OFF="AAben"] valuecolor=[==ON="#a9f7b8", ==OFF="#f8a9ad"]
Text item=mqtt_topic_door_contact_1_door_contact_1_battery icon="battery" label="Battery [%.0f %%]"
Text item=mqtt_topic_door_contact_1_door_contact_1_voltage icon="battery" label="Voltage [%.0f mV]"
Text item=mqtt_topic_door_contact_1_door_contact_1_linkQuality icon="qualityofservice" label="Link quality [%.0f]"
}
Frame label="Slik skab" icon="button" {
Switch item=mqtt_topic_door_contact_2_door_contact_2_contact icon=switch label="Slik skab : [%s]" mappings=[ON="Lukket", OFF="AAben"] valuecolor=[==ON="#a9f7b8", ==OFF="#f8a9ad"]
Text item=mqtt_topic_door_contact_2_door_contact_2_battery icon="battery" label="Battery [%.0f %%]"
Text item=mqtt_topic_door_contact_2_door_contact_2_voltage icon="battery" label="Voltage [%.0f mV]"
Text item=mqtt_topic_door_contact_2_door_contact_2_linkQuality icon="qualityofservice" label="Link quality [%.0f]"
}
Frame label="termostat_1" icon="temperature" {
Text item=mqtt_topic_termostat_1_termostat_1_temperature
Text item=mqtt_topic_termostat_1_termostat_1_humidity
Text item=mqtt_topic_termostat_1_termostat_1_Voltage icon="battery" label="Voltage [%.0f mV]"
Text item=mqtt_topic_termostat_1_termostat_1_linkQuality icon="qualityofservice" label="Link quality [%.0f]"
Text item=mqtt_topic_termostat_1_termostat_1_Battery icon="battery" label="Battery [%.0f %%]"
}
Frame label="termostat_2" icon="temperature" {
Text item=mqtt_topic_termostat_2_termostat_2_temperature
Text item=mqtt_topic_termostat_2_termostat_2_humidity
Text item=mqtt_topic_termostat_2_termostat_2_Voltage label="Voltage [%.0f mV]" icon="battery"
Text item=mqtt_topic_termostat_2_termostat_2_linkQuality label="Link quality [%.0f]" icon="qualityofservice"
Text item=mqtt_topic_termostat_2_termostat_2_Battery label="Battery [%.0f %%]" icon="battery"
}
Frame label="click_1" icon="button" {
Switch item=mqtt_topic_click_1_click_1 icon=switch label="click 1 : [%s]" valuecolor=[==ON="#a9f7b8", ==OFF="#f8a9ad"]
Text item=mqtt_topic_click_1_click_1_Reachable label="Button switch [MAP(switch2online.map):%s]" icon="wallswitch" valuecolor=["ON"="green", "OFF"="red", "NULL"="red", "-"="red"]
Text item=mqtt_topic_click_1_click_1_Battery label="Battery [%.0f %%]" icon="battery"
Text item=mqtt_topic_click_1_click_1_Voltage label="Voltage [%.0f mV]" icon="battery"
Text item=mqtt_topic_click_1_click_1_LinkQuality label="Link quality [%.0f]" icon="qualityofservice"
Text item=mqtt_topic_click_1_click_1_Click label="Last click action [%s]"
Text item=mqtt_topic_click_1_click_1_ClickDuration label="Last long click duration [%.0f]" icon="time"
}
}