Closed roysbike closed 3 years ago
Is work!!!
{
"type": "occupancySensor",
"name": "Sensor Bathroom",
"url": "mqtt://192.168.88.3:1883",
"accessory": "mqttthing",
"logMqtt": true,
"topics": {
"getOccupancyDetected": {
"topic": "zigbee2mqtt/0x00158d00054a726a",
"apply": "return JSON.parse(message).occupancy;"
},
"getStatusLowBattery": {
"topic": "zigbee2mqtt/0x00158d00054a726a",
"apply": "if (JSON.parse(message).battery < 20) return 1; else return 0;"
},
"getBatteryLevel": {
"topic": "zigbee2mqtt/0x00158d00054a726a",
"apply": "return JSON.parse(message).battery;"
}
},
"integerValue": true
}
I using Xiaomi Aqara human body movement and illuminance sensor (occupancy and illuminance)
But Occupancy not Detected ..
JSON output from mqtt topic zigbee2mqtt/0x00158d00054a726a
{"battery":100,"voltage":3055,"illuminance":7,"illuminance_lux":7,"linkquality":26,"occupancy":true}