Problem adding Mi Light sensor (lumi.sen_ill.mgl01) on 2.18

I have a few of these lumi.sen_ill.mgl01 light sensors and they are working fine in general. But when I deleted one and tried to re-add it on deconz 2.18, the device appears in deconz vnc GUI with the hex name but doesn’t show up in the api. When I look at the “illuminance measurement” cluster, the values do change as expected. Environment: 2.18 beta Docker on Synology NAS, no other issues.

Can someone reproduce this?

image

image

image

##### Some logging
11:47:28:961 APS-DATA.indication from unknown node 0x04CF8CDF3C78B5DC
11:47:28:963 new node - ext: 0x04cf8cdf3c78b5dc, nwk: 0xCF88
11:47:28:964 FP indication 0x0000 / 0x0013 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:28:964                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:28:965 device announce 0x04CF8CDF3C78B5DC (0xCF88) mac capabilities 0x84
11:47:28:965 FP indication 0x0000 / 0x0013 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:28:965                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:28:966 device announce 0x04CF8CDF3C78B5DC (0xCF88) mac capabilities 0x84
11:47:28:974 DEV Tick.Join: event/device.anounce
11:47:28:975 ZDP get node descriptor for 0xCF88
11:47:28:975 ZDP get node descriptor for 0xCF88
11:47:29:184 ZCL attribute report 0xA4C1387E4E3DC05C for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:29:487 DB UPDATE device_descriptors SET data = x'0240846e127f6400002c640000', timestamp = 1661255249 WHERE device_id = (SELECT id FROM devices WHERE mac = '04:cf:8c:df:3c:78:b5:dc') AND endpoint = 0 AND type = 2
11:47:29:488 DB INSERT INTO device_descriptors (device_id, endpoint, type, data, timestamp) SELECT id, 0, 2, x'0240846e127f6400002c640000', 1661255249 FROM devices WHERE mac = '04:cf:8c:df:3c:78:b5:dc'
11:47:29:507 FP indication 0x0000 / 0x8002 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:29:508                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:29:508 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8002
11:47:29:580 ZCL attribute report 0xA4C1383602BE8319 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:29:619 ZDP get active endpoints for 0xCF88
11:47:30:019 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:30:326 ZCL attribute report 0xA4C1387E4E3DC05C for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:30:438 ZCL attribute report 0xA4C1387E4E3DC05C for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:30:890 FP indication 0x0104 / 0x0000 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:30:891                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:30:891 ZCL attribute report 0x04CF8CDF3C78B5DC for cluster: 0x0000, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:30:896 [3] get simple descriptor 0x01 for 0x04cf8cdf3c78b5dc
11:47:30:897 ZDP get simple descriptor 0x01 for 0x360F
11:47:30:916 0x04CF8CDF3C78B5DC missing cluster 0x0400, frame control 0x00000018
11:47:30:917 FP indication 0x0104 / 0x0400 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:30:917                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:30:918 ZCL attribute report 0x04CF8CDF3C78B5DC for cluster: 0x0400, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:31:329 ZCL attribute report 0xA4C1387E4E3DC05C for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:31:457 ZCL attribute report 0xA4C1387E4E3DC05C for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:31:928 FP indication 0x0000 / 0x8005 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:31:929                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:31:930 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8005
11:47:31:933 ZDP get simple descriptor 0x01 for 0xCF88
11:47:31:936 wait response fastEnddeviceProbe() 0x04CF8CDF3C78B5DC, elapsed 1038 ms
11:47:32:306 void zmController::onApsdeDataIndication(const deCONZ::ApsDataIndication&),3990: assertion 'node' failed
11:47:32:307 FP indication 0x0000 / 0x8004 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:32:308                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:32:308 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8004
11:47:32:308 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) clear timeout on cluster 0x8004
11:47:32:313 ZDP get simple descriptor 0x01 for 0xCF88
11:47:32:316 [3] get simple descriptor 0x01 for 0x04cf8cdf3c78b5dc
11:47:32:316 ZDP get simple descriptor 0x01 for 0x360F
11:47:32:583 ZCL attribute report 0xA4C1383602BE8319 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:32:709 DB UPDATE device_descriptors SET data = x'010401060101040000000403000100010300', timestamp = 1661255252 WHERE device_id = (SELECT id FROM devices WHERE mac = '04:cf:8c:df:3c:78:b5:dc') AND endpoint = 1 AND type = 4
11:47:32:710 DB INSERT INTO device_descriptors (device_id, endpoint, type, data, timestamp) SELECT id, 1, 4, x'010401060101040000000403000100010300', 1661255252 FROM devices WHERE mac = '04:cf:8c:df:3c:78:b5:dc'
11:47:32:856 FP indication 0x0000 / 0x8004 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:32:857                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:32:857 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8004
11:47:32:857 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) clear timeout on cluster 0x8004
11:47:33:025 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:33:105 FP indication 0x0000 / 0x8004 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:33:106                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:33:106 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8004
11:47:33:300 void zmController::onApsdeDataIndication(const deCONZ::ApsDataIndication&),3990: assertion 'node' failed
11:47:33:300 FP indication 0x0000 / 0x8004 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:33:301                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:33:301 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8004
11:47:33:419 ZCL attribute report 0xA4C138C783B59014 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:33:698 FP indication 0x0104 / 0x0000 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:33:699                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:33:702 DEV found DDF for 0x04CF8CDF3C78B5DC, path: 
11:47:33:708 FP indication 0x0000 / 0x8005 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:33:709                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:33:709 ZDP indication search sensors 0x04CF8CDF3C78B5DC (0xCF88) cluster 0x8005
11:47:33:901 FP indication 0x0104 / 0x0000 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:33:901                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:35:690 FP indication 0x0104 / 0x0000 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:35:691                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:35:691 ZCL attribute report 0x04CF8CDF3C78B5DC for cluster: 0x0000, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:35:699 FP indication 0x0104 / 0x0001 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:35:700                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:35:700 ZCL attribute report 0x04CF8CDF3C78B5DC for cluster: 0x0001, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:35:712 0x04CF8CDF3C78B5DC missing cluster 0xFCC0, frame control 0x0000001C
11:47:35:713 DB UPDATE device_descriptors SET data = x'010401060101050000000403000100c0fc010300', timestamp = 1661255255 WHERE device_id = (SELECT id FROM devices WHERE mac = '04:cf:8c:df:3c:78:b5:dc') AND endpoint = 1 AND type = 4
11:47:35:871 0x04CF8CDF3C78B5DC extract Xiaomi special attribute 0x00F7
11:47:35:872 	01 battery 3000 (0x0BB8)
11:47:35:872 	03 Device temperature 25 °?C
11:47:35:872 	04 unknown 424 (0x01A8)
11:47:35:873 	05 RSSI dB (?) 48 (0x0030)
11:47:35:873 	06 LQI (?) 47244640256 (0x0B00000000)
11:47:35:874 	08 unknown 277 (0x0115)
11:47:35:874 	0a Parent NWK 13456 (0x3490)
11:47:35:874 	0c unknown 1 (0x01)
11:47:35:875 	64 unsupported tag (data type 0x21)
11:47:35:875 FP indication 0x0104 / 0xFCC0 (0x04CF8CDF3C78B5DC / 0xCF88)
11:47:35:875                       ...     (0x04CF8CDF3C78B5DC / 0x360F)
11:47:35:876 ZCL attribute report 0x04CF8CDF3C78B5DC for cluster: 0xFCC0, ep: 0x01, frame control: 0x1C, mfcode: 0x115F 
11:47:36:015 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:36:576 ZCL attribute report 0xA4C1383602BE8319 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:37:578 ZCL attribute report 0xA4C1383602BE8319 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:38:139 ZCL attribute report 0x00158D00058A26A4 for cluster: 0x0402, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:38:249 ZCL attribute report 0x00158D00058A26A4 for cluster: 0x0405, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:38:256 ZCL attribute report 0x00158D00058A26A4 for cluster: 0x0403, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:39:031 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:39:045 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:40:579 ZCL attribute report 0xA4C1383602BE8319 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:41:059 ZCL attribute report 0xA4C138E5DFE9591C for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:41:300 ZCL attribute report 0x00158D000520E453 for cluster: 0x0000, ep: 0x01, frame control: 0x1C, mfcode: 0x115F 
11:47:41:301 0x00158D000520E453 extract Xiaomi special attribute 0xFF01
11:47:41:301 	03 Device temperature 42 °?C
11:47:41:302 	05 RSSI dB (?) 162 (0x00A2)
11:47:41:302 	07 unknown 0 (0x0000000000000000)
11:47:41:302 	08 unknown 279 (0x0117)
11:47:41:303 	09 unknown 1536 (0x0600)
11:47:41:303 	0a Parent NWK 0 (0x0000)
11:47:41:303 	64 lift 0 (100%)
11:47:41:304 	64 smoke/gas density 0 (0x00)
11:47:41:304 	65 battery 179%
11:47:41:304 	66 unknown 327 (0x0147)
11:47:41:414 ZCL attribute report 0xA4C138C783B59014 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:42:017 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:43:021 ZCL attribute report 0xA4C138120A4F4868 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000 
11:47:43:276 saved node state in 0 ms
11:47:43:276 sync() in 0 ms

[Update] when I change from the default “Basic” to “Hybrid” DDF mode, the device is added correctly?

image
image

Intresting find. I’ll check swoop in to check here.

In the meanwhile, i checked the DDF, but couldn’t see anything wrong. Swoop did a change, but that shouldnt affect this (it made it better as there was a typo in the ddf): Fix incorrect commas · dresden-elektronik/deconz-rest-plugin@1302047 · GitHub

Also pinging Manuel, because i am not sure why the Basic one doesn’t work. Clearly theres a DDF that works.

Yeah, I also noticed the DDF typo fix. :slight_smile:

It looks like the built-in DDF is not even being used!

12:23:11:459 DEV no DDF for 0x00158D000520A838, modelId: lumi.sen_ill.mgl01
12:23:11:459 DEV create on-the-fly DDF for 0x00158D000520A838

DDF loading Log section:

12:23:11:456 DEV no DDF for 0xBC33ACFFFE891B55, modelId: TRADFRI on/off switch
12:23:11:456 DEV create on-the-fly DDF for 0xBC33ACFFFE891B55
12:23:11:457 DEV no DDF for 0x000D6F001494F614, modelId: SmokeSensor-EM
12:23:11:457 DEV create on-the-fly DDF for 0x000D6F001494F614
12:23:11:457 DEV found DDF for 0x588E81FFFE5BC091, path: 
12:23:11:457 DEV no DDF for 0x00158D0001A6697C, modelId: lumi.sensor_switch.aq2
12:23:11:457 DEV create on-the-fly DDF for 0x00158D0001A6697C
12:23:11:457 DEV found DDF for 0x000D6F0014F82F71, path: 
12:23:11:457 DEV found DDF for 0x000D6F0014F6F9C6, path: 
12:23:11:458 DEV no DDF for 0x00158D00066F967A, modelId: lumi.remote.b1acn01
12:23:11:458 DEV create on-the-fly DDF for 0x00158D00066F967A
12:23:11:458 DEV found DDF for 0x00158D0001A6673E, path: 
12:23:11:458 DEV no DDF for 0x00158D0004ABE8F2, modelId: lumi.sensor_motion
12:23:11:458 DEV create on-the-fly DDF for 0x00158D0004ABE8F2
12:23:11:458 DEV no DDF for 0x00158D0001AB4097, modelId: lumi.sensor_magnet.aq2
12:23:11:458 DEV create on-the-fly DDF for 0x00158D0001AB4097
12:23:11:459 DEV no DDF for 0x00158D000520A838, modelId: lumi.sen_ill.mgl01
12:23:11:459 DEV create on-the-fly DDF for 0x00158D000520A838
12:23:11:459 DEV found DDF for 0x04CF8CDF3C7B50D0, path: 
12:23:11:459 DEV found DDF for 0xA4C138C783B59014, path: /usr/share/deCONZ/devices/neo/NAS-WR01B.json
12:23:11:459 DEV found DDF for 0xA4C138120A4F4868, path: /usr/share/deCONZ/devices/neo/NAS-WR01B.json
12:23:11:459 DEV found DDF for 0x04CF8CDF3C78C39E, path: 
12:23:11:468 dlg action: Read binding table
12:23:11:489 DEV found DDF for 0x00158D0001DACF97, path: 
12:23:11:490 DEV found DDF for 0xA4C138E5DFE9591C, path: /usr/share/deCONZ/devices/neo/NAS-WR01B.json
12:23:11:490 DEV found DDF for 0x00158D0004AB3C58, path: 
12:23:11:490 DEV found DDF for 0x04CF8CDF3C7D199E, path: 
12:23:11:490 DEV found DDF for 0x04CF8CDF3C7D1330, path: 
12:23:11:490 DEV found DDF for 0xA4C1383602BE8319, path: /usr/share/deCONZ/devices/neo/NAS-WR01B.json
12:23:11:490 DEV found DDF for 0x04CF8CDF3C78B5DC, path: 
12:23:11:494 DEV found DDF for 0x00158D000750FC94, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:498 DEV found DDF for 0x00158D00047E48B1, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:501 DEV found DDF for 0x00158D000466638E, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:507 DEV found DDF for 0xA4C138B388AA7353, path: /usr/share/deCONZ/devices/neo/NAS-WR01B_2.json
12:23:11:507 DEV no DDF for 0x00158D000530371F, modelId: lumi.light.aqcn02
12:23:11:507 DEV create on-the-fly DDF for 0x00158D000530371F
12:23:11:512 DEV found DDF for 0xA4C1387E4E3DC05C, path: /usr/share/deCONZ/devices/neo/NAS-WR01B_2.json
12:23:11:517 DEV found DDF for 0x00158D00054CB2E2, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_wsdcgq11lm_temp_hum_press_sensor.json
12:23:11:522 DEV found DDF for 0x00158D000581E523, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:527 DEV found DDF for 0x00158D00058A29AD, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_wsdcgq11lm_temp_hum_press_sensor.json
12:23:11:530 DEV found DDF for 0x00158D0003E83890, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:536 DEV found DDF for 0x00158D00067C1F90, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_wsdcgq11lm_temp_hum_press_sensor.json
12:23:11:540 DEV found DDF for 0x00158D000586C764, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:543 DEV found DDF for 0x00158D0004ACA6FE, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:548 DEV found DDF for 0x00158D000461F3E0, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:553 DEV found DDF for 0x00158D000578E15B, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_wsdcgq11lm_temp_hum_press_sensor.json
12:23:11:554 DEV found DDF for 0x00158D000520E453, path: 
12:23:11:557 DEV found DDF for 0x00158D00057F8020, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:562 DEV found DDF for 0x00158D00048757D0, path: /usr/share/deCONZ/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json
12:23:11:562 DEV found DDF for 0x00158D000520ABA2, path: 
12:23:

NOt sure what these mean, with an empty path?
12:23:11:459 DEV found DDF for 0x04CF8CDF3C78C39E, path:

Welcome to the jungle. Apparently, there’s 2 versions of the device out there not only deviating in the used mac prefix. Of course, I got the working version right here (what else…).

Fix is simple: copy the DDF to the location where you can have your custom ones and make the following change from

"manufacturername": "$MF_XIAOMI",
"modelid": "lumi.sen_ill.mgl01",

to

"manufacturername": ["$MF_XIAOMI", "$MF_LUMI"],
"modelid": ["lumi.sen_ill.mgl01", "lumi.sen_ill.mgl01"],

Then restart and re-pair.

Thanks, I updated the DDF and it gets used, but unfortunately it seems that all sensors are now unreachable (including a newly added one, although it gets added now by name)? Even when pressing the button once or shining a light on the sensor no updates…

I took this DDF from master and modified the 2 lines:

“manufacturername”: ["$MF_XIAOMI", “$MF_LUMI”],
“modelid”: [“lumi.sen_ill.mgl01”, “lumi.sen_ill.mgl01”],

BTW: I had renamed one sensor before, and it popped up with the old name again when using the DDF (it was not reachable)? If I restore the DB + remove the DDF at least the existing light sensors work OK again.

[Update 24/8] @Swoop Retried today, but the same issue. Once I use the DDF, all sensors end up unreachable, including a newly added one! I also tried to export a DDF from one of the existing working sensors, but it had the same issues?

Ah, the device is dependent for each and everything on scripts, which it naturally cannot find in the custom location. So either you copy all the scripts over as well (then do not forget to update/remove the path for the light level script) or you delete the file from the custom location again and make the necessary changes at the original location if you can.

PR for the update is already out. And regarding the missing path in your log data above: that happens if you use devices not having a DDF (DEV found DDF is returned because one got created on the fly).

1 Like

Thanks I was indeed wondering about the scripts, I’ll just wait for the next build then!

BTW: Would it be an option to get deconz to fallback to built-in scripts when a user DDF references scripts that can’t be found in the user path?

Good and helpful suggestion. I’ll have a look around and discuss that with the other devs :+1: