@Taffy - in your original post the data shown doens’t include any data for “Voltage” or “Battery”, so if it isn’t in the data being sent by your sensor, you are not going to be able to parse it out of the air. This was mentioned already by @hafniumzincin his first post.
You also still have all of your transformations incorrect. @hafniumzinc showed them correct per your posted data in two different posts. I’d suggest using those.
it sends battery Percentage and voltage on a seperate line. this is why i didnt include it.
i have also tried the transformations @hafniumzinc showed me and they unfortunatly didnt work so i was just trying a few combinations.
heres is my setup after altering fully from what @hafniumzinc said
Number Kids_Bedroom_Temperature "Temperature [%.1f °C]" <temperature> { channel="mqtt:topic:Kids_Bedroom_Sensor:temperature" }
Number Kids_Bedroom_Humidity "Humidity [%.1f %%]" <humidity> { channel="mqtt:topic:Kids_Bedroom_Sensor:humidity" }
Number Kids_Bedroom_LinkQuality "Link Quality [%d]" <network> { channel="mqtt:topic:Kids_Bedroom_Sensor:linkquality" }
Number Kids_Bedroom_Voltage "Voltage [%d mV]" <energy> { channel="mqtt:topic:Kids_Bedroom_Sensor:voltage" }
Number Kids_Bedroom_Battery "Battery [%.1f %%]" <battery> { channel="mqtt:topic:Kids_Bedroom_Sensor:battery" }
things
Thing mqtt:topic:Kids_Bedroom_Sensor "Kids Sensor" (mqtt:broker:MQTTBroker) {
Channels:
Type number : temperature [ stateTopic="tele/Zigbee_Bridge/SENSOR", transformationPattern="JSONPATH:$.ZbReceived.0xB85C.Temperature" ]
Type number : humidity [ stateTopic="tele/Zigbee_Bridge/SENSOR", transformationPattern="JSONPATH:$.ZbReceived.0xB85C.Humidity" ]
Type number : voltage [ stateTopic="tele/Zigbee_Bridge/SENSOR", transformationPattern="JSONPATH:$.ZbReceived.0xB85C.BatteryVoltage" ]
Type number : battery [ stateTopic="tele/Zigbee_Bridge/SENSOR", transformationPattern="JSONPATH:$.ZbReceived.0xB85C.BatteryPercentage" ]
Type number : linkquality [ stateTopic="tele/Zigbee_Bridge/SENSOR", transformationPattern="JSONPATH:$.ZbReceived.0xB85C.LinkQuality" ]
}
sitemap
Text item=Kids_Bedroom_Temperature label="Bedroom Temperature [%.1f °C] " icon="temperature"
Text item=Kids_Bedroom_Humidity label="Humidity [%.1f %%]" icon="humidity"
still no activity in openhab. using MQTTOOL to make sure messages are being sent and received, which they are so the problem must lie in my configs.
You may be hitting the known bug where Things files aren’t correctly parsed by openHAB, especially as you’re still on OH2.4. Easiest thing to do is restart openHAB.
Thank you for that, it is now showing all relevant data.
im only on 2.4 still because when i tried to update to latest stable version all the mqtt items wouldnt work as id not brought them all upto date, which im currently in the process of doing.
Found myself a new issue now!
I have added additional sensors to the zigbee bridge. All sensors are outputting mqqt data from the bridge. I was reading the tasmota zigbee documentation and it stated by using the command SetOption89 1 each sensor could have its own mqtt topic which is great but now nothing is reporting like it should on the openhab side. nothing even pops up on the log when there is incoming mqqt data.
Thing mqtt:topic:Living_Room_Sensor "Living Room Sensor" (mqtt:broker:MQTTBroker) {
Channels:
Type number : temperature [ stateTopic=" tele/Zigbee_Bridge/CD15/SENSOR", transformationPattern="REGEX:(.*Temperature.*)∩JSONPATH:$.ZbReceived.0xCD15.Temperature" ]
Type number : humidity [ stateTopic=" tele/Zigbee_Bridge/CD15/SENSOR", transformationPattern="REGEX:(.*Temperature.*)∩JSONPATH:$.ZbReceived.0xCD15.Humidity" ]
Type number : voltage [ stateTopic=" tele/Zigbee_Bridge/CD15/SENSOR", transformationPattern="REGEX:(.*BatteryVoltage.*)∩JSONPATH:$.ZbReceived.0xCD15.BatteryVoltage" ]
Type number : battery [ stateTopic=" tele/Zigbee_Bridge/CD15/SENSOR", transformationPattern="REGEX:(.*BatteryPercentage.*)∩JSONPATH:$.ZbReceived.0xCD15.BatteryPercentage" ]
Type number : linkquality [ stateTopic=" tele/Zigbee_Bridge/CD15/SENSOR", transformationPattern="REGEX:(.*LinkQuality.*)∩JSONPATH:$.ZbReceived.0xCD15.LinkQuality" ]
}
Thing mqtt:topic:Kids_Bedroom_Sensor "Kids Sensor" (mqtt:broker:MQTTBroker) {
Channels:
Type number : temperature [ stateTopic="tele/Zigbee_Bridge/B85C/SENSOR", transformationPattern="REGEX:(.*Temperature.*)∩JSONPATH:$.ZbReceived.0xB85C.Temperature" ]
Type number : humidity [ stateTopic="tele/Zigbee_Bridge/B85C/SENSOR", transformationPattern="REGEX:(.*Humidity.*)∩JSONPATH:$.ZbReceived.0xB85C.Humidity" ]
Type number : voltage [ stateTopic="tele/Zigbee_Bridge/B85C/SENSOR", transformationPattern="REGEX:(.*BatteryVoltage.*)∩JSONPATH:$.ZbReceived.0xB85C.BatteryVoltage" ]
Type number : battery [ stateTopic="tele/Zigbee_Bridge/B85C/SENSOR", transformationPattern="REGEX:(.*BatteryPercentage.*)∩JSONPATH:$.ZbReceived.0xB85C.BatteryPercentage" ]
Type number : linkquality [ stateTopic="tele/Zigbee_Bridge/B85C/SENSOR", transformationPattern="REGEX:(.*LinkQuality.*)∩JSONPATH:$.ZbReceived.0xB85C.LinkQuality" ]
}
items
Number Kids_Bedroom_Temperature "Temperature [%.1f °C]" <temperature> { channel="mqtt:topic:Kids_Bedroom_Sensor:temperature" }
Number Kids_Bedroom_Humidity "Humidity [%.1f %%]" <humidity> { channel="mqtt:topic:Kids_Bedroom_Sensor:humidity" }
Number Kids_Bedroom_LinkQuality "Kids Bedroom Link Quality [%d]" <network> (gALLLinkQuality) { channel="mqtt:topic:Kids_Bedroom_Sensor:linkquality" }
Number Kids_Bedroom_Voltage "Kids Bedroom Voltage [%d mV]" <energy> (gALLBatteryVoltage) { channel="mqtt:topic:Kids_Bedroom_Sensor:voltage" }
Number Kids_Bedroom_Battery "Kids Bedroom Battery [%.1f %%]" <battery> (gALLBatteryPercentage) { channel="mqtt:topic:Kids_Bedroom_Sensor:battery" }
Number Living_Room_Temperature "Temperature [%.1f °C]" <temperature> { channel="mqtt:topic:Living_Room_Sensor:temperature" }
Number Living_Room_Humidity "Humidity [%.1f %%]" <humidity> { channel="mqtt:topic:Living_Room_Sensor:humidity" }
Number Living_Room_LinkQuality "Living Room Link Quality [%d]" <network> (gALLLinkQuality) { channel="mqtt:topic:Living_Room_Sensor:linkquality" }
Number Living_Room_Voltage "Living Room Voltage [%d mV]" <energy> (gALLBatteryVoltage) { channel="mqtt:topic:Living_Room_Sensor:voltage" }
Number Living_Room_Battery "Living Room Battery [%.1f %%]" <battery> (gALLBatteryPercentage) { channel="mqtt:topic:Living_Room_Sensor:battery" }
All sensors output data for all things stated just at different times as stated in an earlier post so i used a regex transformation as explained by @hafniumzinc
I had this working perfectly with just one sensor but since adding the second and using seperate mqqt topics i dont seem to get anything?
Yes, The Sensors seem to communicate with the bridge regarding temp, humidity and all other data at different times. I presume this happens when a change occurs not at specific intervals.
No I have a different regard for all the different data to correspond to the correct thing ie temp and humidity. Unfortunately a restart did not help. Only one sensor is showing up in openhab logs now but says there’s a warning this happens with all the data incoming from the Zigbee bridge
2021-01-03 17:52:17.416 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload '{"ZbReceived":{"0xB85C":{"Device":"0xB85C","Name":"Kids_Bedroom_Sensor","Humidity":61.76,"Endpoint":1,"LinkQuality":89}}}' not supported by type 'NumberValue'