Hello Guys,
I am running OH2.5.5 on Rpi3B and connecting some zigbee devices through Zigbee2MQTT.
Currently I purchased a IKEA E PIR sensor but having problem reading the value of occupancy from json.
I can read both Link Quality and Battery.
Published MQTT :
{"battery":87,"linkquality":99,"occupancy":true,"update":{"state":"idle"},"update_available":false}
Things:
// IKEA PIR 01
Thing mqtt:topic:MQTT_IKEA_PIR_01 "MQTT IKEA PIR 01" (mqtt:broker:66b21258) @ "NAPPALI" {
Channels:
Type number : LinkQuality "Link Quality [%d %%]" [ stateTopic="zigbee2mqtt/IKEA_PIR_01", transformationPattern="JSONPATH:$.linkquality" ]
Type string : Battery "Battery [%d %%]" [ stateTopic="zigbee2mqtt/IKEA_PIR_01", transformationPattern="JSONPATH:$.battery" ]
Type switch : Occupancy "Occupancy" [ stateTopic="zigbee2mqtt/IKEA_PIR_01", transformationPattern="JSONPATH:$.occupancy" ]
Items:
Number MQTT_IKEAPIR01_LinkQuality "Link quality [%d %%]" {channel="mqtt:topic:MQTT_IKEA_PIR_01:LinkQuality"}
String MQTT_IKEAPIR01_Battery "Battery [%d %%]" {channel="mqtt:topic:MQTT_IKEA_PIR_01:Battery"}
Switch MQTT_IKEAPIR01_Occupancy "Occupancy" {channel="mqtt:topic:MQTT_IKEA_PIR_01:Occupancy"}
I tried several mappings in the chanel definition but none of them was working.
Thanks fo your help