No Battery State for Xiaomi Smokedetector JTYJ-GD-01LM/BW
I have add my Xiaomi Honeywell smoke detector JTYJ-GD-01LM/BW and it works fine and publish the "smoke" state. But the smoke detector is the didn't publish any state of the battery in MQTT.
Is it possible to get this state also as a publish?
For how long did you let it run? It should publish it's battery state after 1/2 hours.
Hi
I have the same issue, but I only get the smoke state when I press the test button. (last entry)
I should expect every hour the state with the battery, like an xiaomi door sensor does
2018-6-26 05:46:22 INFO 0x00158d0002092004 (0x00158d0002092004): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
2018-6-26 05:46:22 INFO 0x00158d0001fd66e2 (0x00158d0001fd66e2): JTYJ-GD-01LM/BW - Xiaomi MiJia Honeywell smoke detector (EndDevice)
2018-6-26 05:46:22 WARN `permit_join` set to `true` in configuration.yaml.
2018-6-26 05:46:22 WARN Allowing new devices to join.
2018-6-26 05:46:22 WARN Set `permit_join` to `false` once you joined all devices.
2018-6-26 05:46:22 INFO Zigbee: allowing new devices to join.
2018-6-26 05:46:22 INFO Connecting to MQTT server at mqtt://192.168.180.10
2018-6-26 05:46:22 INFO zigbee-shepherd ready
2018-6-26 05:46:22 INFO Connected to MQTT server
2018-6-26 05:46:22 INFO MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'
2018-6-26 05:58:15 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 06:48:25 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 07:38:36 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 08:28:48 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3065}'
2018-6-26 09:18:58 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3065}'
2018-6-26 10:09:07 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3065}'
2018-6-26 10:59:18 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3065}'
2018-6-26 11:49:30 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 12:39:42 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 13:29:49 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 14:20:00 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 15:10:11 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3055}'
2018-6-26 16:00:22 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3065}'
2018-6-26 16:50:33 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0002092004', payload: '{"battery":"100.00","voltage":3065}'
2018-6-26 17:28:19 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d0001fd66e2', payload: '{"smoke":false}'
I have run 4 devices for few days and only get the smoke state as publish. All of my other Xiaomi devices publish the battery state only the smoke detector didn't.
By pressing the Button the device is publishing only:
{"smoke":false}
Hope you can help
Can you try changing the entry of this device in node_modules/zigbee-shepherd-converters/devices.js to:
{
zigbeeModel: ['lumi.sensor_smoke'],
model: 'JTYJ-GD-01LM/BW',
description: 'MiJia Honeywell smoke detector',
supports: 'smoke',
vendor: 'Xiaomi',
fromZigbee: [fz.JTYJGD01LMBW_smoke, fz.ignore_basic_change],
toZigbee: [],
},
And check if any WARN: No converter available for.... messages appear?
I have try it and get this error by pressing the Button on smoke detector:
WARN No converter available for 'JTYJ-GD-01LM/BW' with cid 'genBasic' and type 'attReport'
any other ideas? how can i help you to found the error and fix it?
Good! Can you now set advanced -> log_level: debug in data/configuration.yaml. https://github.com/Koenkk/zigbee2mqtt/wiki/Configuration
This will print the message.
OK, now im getting the message
2018-6-29 23:46:12 WARN No converter available for 'JTYJ-GD-01LM/BW' with cid 'genBasic' and type 'attReport'
2018-6-29 23:46:12 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-6-29 23:46:12 DEBUG Recieved zigbee message with data {"cid":"genBasic","data":{"modelId":"lumi.sensor_smoke"}}
2018-6-29 23:46:12 DEBUG Recieved zigbee message with data {"cid":"ssIasZone","zoneStatus":0}
2018-6-29 23:46:12 INFO MQTT publish, topic: 'zigbee2mqtt/0x00158d000202eff6', payload: '{"smoke":false}'
It doesn't contain any battery information.
Could you post the entry of this device from data/database.db?
I hope this is the right line...
{"id":11,"type":"EndDevice","ieeeAddr":"0x00158d000202eff6","nwkAddr":20594,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_smoke","epList":[1],"status":"offline","joinTime":null,"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,1,3,12,18,1280],"outClusterList":[25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{}},"genPowerCfg":{"dir":{"value":1},"attrs":{}},"genIdentify":{"dir":{"value":1},"attrs":{}},"genAnalogInput":{"dir":{"value":1},"attrs":{}},"genMultistateInput":{"dir":{"value":1},"attrs":{}},"genOta":{"dir":{"value":2},"attrs":{}},"ssIasZone":{"dir":{"value":1},"attrs":{}}}}},"_id":"pCPL00secZLGvXec"}
That's the right line, but I don't see the battery being in.
@kirovilya can you help with this?
I have not Xiaomi Smoke sensor... I'll ask the users of my application for this issue. Think, it was like for other xiaomi sensor. Strange that this is not so...
Confirmed. Battery not received :( Need research events and data... I request a detailed log of work with the sensor.
Found some code here https://github.com/veeceeoh/xiaomi-hubitat/blob/0c42285fc9c7cb4554d7b8968087d50ef9cb048b/devicedrivers/xiaomi-honeywell-smoke-detector.src/xiaomi-honeywell-smoke-detector.groovy#L86
In i can help, let me know...
@Sonsi79 Can you collect detailed log from smoke-sensor like describe here https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-debug#all-debug-logging during short press button on sensor. And put file here.
@kirovilya ok i will do it later after work and publish the results here...
Here's the log file from DEBUG run. During this run i have first pressed buttons on my Switch and later pressed the button on smoke detector. It seems my thermometer also publish something during thins time.
I hope this file helps... log.txt
@Sonsi79 that is not all... you need start DEBUG=* npm start and save all from console to file. So, command will be: DEBUG=* npm start > log.txt
Ok, done. Here the file... log.txt
Hm it seems that most of Debug Infos wasn't Safe in this file. Here the Output of Console during Debug start. I have copy/paste it. debug_output.txt
@Sonsi79 Well! I think we got it:
cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 0, srcaddr: 20594, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 52, securityuse: 0, timestamp: 94508, transseqnumber: 0, len: 46, data: <Buffer 18 7f 0a 01 ff 42 28 01 21 85 0c 03 28 19 04 21 a8 43 05 21 0e 00 06 24 03 00 00 00 00 0a 21 00 00 08 21 04 10 64 20 00 96 23 00 00 00 00> } +21ms
Splited version of buffer: 18 7f 0a - header 01 ff - attrId ----- this is xiaomi attribute for heartbeat = 65281 42 - type 'charStr' 28 - length 40 byte 01 - index '1' ----- this is battery value of attribute 21 - type 'uint16' 85 0c - data ----- this is battery voltage = 3205 03 - index '3' 28 - type 'int8' 19 - data 04 - index '4' 21 - type 'uint16' a8 43 - data 05 - index '5' 21 - type 'uint16' 0e 00 - data 06 - index '6' 24 - type 'uint40' 03 00 00 00 00 - data 0a 21 04 10 - '10' 'uint16' data 64 20 00 - '100' 'int8' data 96 23 00 00 00 00 - '150', 'uint32', data
So, this message is correctly understood by me, but why it not parsed by zigbee-shepherd... Any ideas?