MQTT thing setup with json HELP!

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.

Your are regexing Temperature but want Humidity…

Did a restart help?

Hi Taffy
You should use also SetOption83 1,
then your Tasmota output should be without ‚ÄúZbReceived‚ÄĚ

17:46:27.058 MQT: tele/Zigbee_Bridge/CD15/SENSOR = {"0xCD15":{"Device":"0xCD15","Name":"Living_Room_Sensor","Humidity":60.82,"Endpoint":1,"LinkQuality":58}}}

and your JSONPATH is calling directly your device.

"REGEX:(.*Temperature.*)‚ą©JSONPATH:$.0xCD15.Temperature"

Rolli

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'

Setoption83 does not get rid of the zbrecieved it just uses the friendly name ie kids_sensor Instead of 0x…

Try to remove the humidity tag from your channel definition.

Type number :         [ stateTopic=" tele/Zigbee_Bridge/CD15/SENSOR",  transformationPattern="REGEX:(.*Temperature.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.Humidity" ]

This is my Tasmota output with SetOption83 1, 89 1 and friendly Name

19:38:05 MQT: tele/Hue1/SENSOR = {"Hue1":{"Device":"0xC110","Name":"Hue1","Temperature":18.95,"Endpoint":2,"LinkQuality":45}}

i have just reset both options and this is the output.


19:50:29.620 CMD: SetOption83 1
19:50:29.625 MQT: stat/Zigbee_Bridge/RESULT = {"SetOption83":"ON"}
19:50:37.679 CMD: SetOption89 1
19:50:37.684 MQT: stat/Zigbee_Bridge/RESULT = {"SetOption89":"ON"}
19:50:38.510 MQT: tele/Zigbee_Bridge/STATE = {"Time":"2021-01-03T19:50:38","Uptime":"0T01:45:15","UptimeSec":6315,"Vcc":3.504,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":2,"Wifi":{"AP":1,"SSId":"ASUSHughes","BSSId":"E0:63:DA:15:4E:DF","Channel":13,"RSSI":100,"Signal":-32,"LinkCount":1,"Downtime":"0T00:00:03"}}
19:51:45.067 MQT: tele/Zigbee_Bridge/CD15/SENSOR = {"ZbReceived":{"Living_Room_Sensor":{"Device":"0xCD15","Name":"Living_Room_Sensor","Humidity":46.21,"Endpoint":1,"LinkQuality":52}}}

i had the same Warning when i set up my Sonoff Zigbee Bridge wit Tasmota, now i try to recreate it and unfortunately i can not find how i solved it. :man_facepalming: :

in this case

19:51:45.067 MQT: tele/Zigbee_Bridge/CD15/SENSOR = {"ZbReceived":{"Living_Room_Sensor":{"Device":"0xCD15","Name":"Living_Room_Sensor","Humidity":46.21,"Endpoint":1,"LinkQuality":52}}}

your Jsonpath should look like this

"REGEX:(.*Temperature.*)‚ą©JSONPATH:$.ZbReceived.Living_Room_Sensor.Humidity" ]

warning shooting up all over openhab now

2021-01-03 19:29:33.909 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload '{"ZbReceived":{"0xCD15":{"Device":"0xCD15","Name":"Living_Room_Sensor","Humidity":45.29,"Endpoint":1,"LinkQuality":18}}}' not supported by type 'NumberValue'

For some reason the Binding is sending the raw JSON string straight to the Channel, without using the transformations. What does your configuration look like?

The Payload Tasmota is sending, yellow mark, is not the same payload which Openhab is complaining, blue mark!!

Tasmota Output on one device

20:43:36.645 MQT: tele/Zigbee_Bridge/SENSOR = {"ZbReceived":{"0xCD15":{"Device":"0xCD15","Name":"Living_Room_Sensor","Temperature":22.7,"Endpoint":1,"LinkQuality":52}}}

Things

Thing mqtt:topic:Kids_Bedroom_Sensor "Kids Sensor" (mqtt:broker:MQTTBroker) {
    Channels:
        Type number : temperature        [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*Temperature.*)‚ą©JSONPATH:$.ZbReceived.0xB85C.Temperature" ]
        Type number : humidity           [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*Humidity.*)‚ą©JSONPATH:$.ZbReceived.0xB85C.Humidity" ]
        Type number : voltage            [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*BatteryVoltage.*)‚ą©JSONPATH:$.ZbReceived.0xB85C.BatteryVoltage" ]
        Type number : battery            [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*BatteryPercentage.*)‚ą©JSONPATH:$.ZbReceived.0xB85C.BatteryPercentage" ]
        Type number : linkquality        [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*LinkQuality.*)‚ą©JSONPATH:$.ZbReceived.0xB85C.LinkQuality" ]
        
}
Thing mqtt:topic:Living_Room_Sensor "Living Room Sensor" (mqtt:broker:MQTTBroker) {
    Channels:
        Type number : temperature        [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*Temperature.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.Temperature" ]
        Type number : humidity           [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*Humidity.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.Humidity" ]
        Type number : voltage            [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*BatteryVoltage.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.BatteryVoltage" ]
        Type number : battery            [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*BatteryPercentage.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.BatteryPercentage" ]
        Type number : linkquality        [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*LinkQuality.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.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" }

sitemap

Frame label="Kids Bedroom"  {
               Switch item=Kids_Bedroom_Light
               Switch item=Kids_Bedroom_Radiator_Valve
               Setpoint item=Kids_Bedroom_Temp_Setpoint label="Bedroom Target Temperature  [%.0f ¬įC]" icon="temperature" step=1
               Text item=Kids_Bedroom_Temperature label="Bedroom Temperature [%.1f ¬įC] " icon="temperature"
               Text item=Kids_Bedroom_Humidity label="Humidity [%.1f %%]" icon="humidity"
               
        }
       Frame label="Living Room"{
                Switch item=Living_Room_Light
                Switch item=Living_Room_Lamp
                Text item=Living_Room_Temperature label="Temperature [%.1f ¬įC] " icon="temperature"
                Text item=Living_Room_Humidity label="Humidity [%.1f %%]" icon="humidity"
                
               
                
        }

I have also restarted openhab to see if the thing file had not parsed properly.

your mqtt payload Tasmota is sending

`19:51:45.067 MQT: tele/Zigbee_Bridge/CD15/SENSOR = {"ZbReceived":{"Living_Room_Sensor":{"Device":"0xCD15","Name":"Living_Room_Sensor","Humidity":46.21,"Endpoint":1,"LinkQuality":52}}}`

and your channel configuration

Type number : humidity           [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*Humidity.*)‚ą©JSONPATH:$.ZbReceived.0xCD15.Humidity" ]

Your Channel definition should be this

Type number : humidity           [ stateTopic="tele/Zigbee_Bridge/SENSOR",  transformationPattern="REGEX:(.*Humidity.*)‚ą©JSONPATH:$.ZbReceived.Living_Room_Sensor.Humidity" ]

oops,
like this

Type number : humidity           [ stateTopic="tele/Zigbee_Bridge/CD15/SENSOR",  transformationPattern="REGEX:(.*Humidity.*)‚ą©JSONPATH:$.ZbReceived.Living_Room_Sensor.Humidity" ]

i have turned option 89 and 83 back off now as this is how it was whe the first sensor was working

20:43:36.645 MQT: tele/Zigbee_Bridge/SENSOR = {"ZbReceived":{"0xCD15":{"Device":"0xCD15","Name":"Living_Room_Sensor","Temperature":22.7,"Endpoint":1,"LinkQuality":52}}}

try to REGEX like this

REGEX:(.*\"Temperature\".*)

that is the only difference i can find between your and my configuration

any ideas why this might be happening?

nop, i still try to reproduce