AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.44k stars 342 forks source link

Aqara ZNGZDJ14LM (lumi.curtain.hagl07) #988

Open pydog opened 1 year ago

pydog commented 1 year ago

Hi AlexxIT, I try to pair my Aqara ZNGZDJ14LM (lumi.curtain.hagl07) to my xiaomi gateway DMWG03LM (Smart Home Hub 2), so I refer to the spec of aqara ZNJLBL01LM in core/converters/devices.py and add the follow coverter to my "xiaomi_gateway3.py"

{
    "lumi.curtain": ["Aqara", "Curtain", "ZNCLDJ14LM"],
    "lumi.curtain.hagl07": ["aqara", "Curtain", "ZNGZDJ14LM"],                                                                                                                           "spec": [                                                                                                                                                                                MapConv("motor", "cover", mi="2.p.2", map={0: "stop", 1: "close", 2: "open"}),
        Converter("target_position", mi="2.p.4"),
        CurtainPosConv("position", mi="2.p.5", parent="motor"),
        MapConv("run_state", mi="2.p.6", map=RUN_STATE, parent="motor"),
        Converter("motor_reverse", "switch", mi="2.p.7", enabled=False),
    ],
}

I could pair the device successfully, but when I try to control the deivce, I get the follow errors:

.18.162 [MQTT] gw/50EC5053020065DF/MessagePreSentCallback b'{"eui64":"0x54EF441000394E5C","destinationEndpoint":"0x01","clusterId":"0xFCC0","profileId":"0x0104","sourceEndpoint":"0x01","APSCounter":"0xB1","APSPlayload":"0x155F110A01080202010402000000"}'
2023-02-19 12:39:32 [D] 192.168.18.162 [ZIGB] 0x54ef441000394e5c 0xd427 send {'endpoint': 1, 'seq': 10, 'cluster': 'manufacturer_specific', 'command_id': 1, 'value': b'\x08\x02\x02\x01\x04\x02\x00\x00\x00'}
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] gw/50EC5053020065DF/executed b'{"command":"send 0xd427 1 1"}'
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] log/z3 b'CLI command executed: send 0xd427 1 1'
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] miio/report_ack b'{"id":1961387137,"result":"ok"}'
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] log/z3 b''
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] gw/50EC5053020065DF/MessageReceived b'{"sourceAddress":"0xD427","eui64":"0x54EF441000394E5C","destinationEndpoint":"0x01","clusterId":"0xFCC0","profileId":"0x0104","sourceEndpoint":"0x01","APSCounter":"0x9E","APSPlayload":"0x1C5F110A0B01C1","rssi":-65,"linkQuality":140}'
2023-02-19 12:39:32 [D] 192.168.18.162 [ZIGB] 0x54ef441000394e5c (0xd427) recv {'endpoint': 1, 'seq': 10, 'cluster': 'manufacturer_specific', 'command': 'Default_Response', 'value': 1, 'status': 'Status.SOFTWARE_FAILURE'}
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] log/z3 b'T2B84D503:RX len 7, ep 01, clus 0xFCC0 (Unknown clus. [0xFCC0]) mfgId 115F FC 1C seq 0A cmd 0B payload[01 C1 ]'
2023-02-19 12:39:32 [D] 192.168.18.162 [MQTT] miio/report_ack b'{"id":1961387132,"result":"ok"}'

Before using xiaomigateway3, I was able to use the zigbee2mqtt to pair and control the device with Hass, and the device configure of ZNGZDJ14LM is exactly the same as ZNCLDJ11LM, which is supported in core/converters/devices.py of xiaomigateway3, but it is the same failure after paired. Could you kindly help to check and guide me on that, I think the difference between ZNCLDJ11LM and ZNGZDJ14LM is the zigbee version, ZNGZDJ14LM is zigbee 3.0, that's why I refer ZNJLBL01LM now. Hope everything goes well for you and your family. Thanks a lot for your great job to create this awesome integration.

AlexxIT commented 1 year ago

Is your Curtain works in the MiHome app?

pydog commented 1 year ago

Is your Curtain works in the MiHome app? Hi AlexxIT, No, ZNGZDJ14LM doesn't support MiHome, it supports Aqara only. Thanks a lot.

AlexxIT commented 1 year ago

Such devices are very difficult to maintain at the moment.

pydog commented 1 year ago

Such devices are very difficult to maintain at the moment.

Do you have a workaround solution to try? Thanks a lot

AlexxIT commented 1 year ago

Only ZHA/z2m mode

pydog commented 1 year ago

I see, thanks.

pydog commented 1 year ago

@AlexxIT Is it possible to fake ZNGZDJ14LM as ZNGZDJ11LM so that gateway will support it?