hobbyquaker / node-red-contrib-zigbee

Node-RED Nodes for ZigBee Devices 🐝
MIT License
86 stars 15 forks source link

Device specific commands #71

Open Sineos opened 5 years ago

Sineos commented 5 years ago

I'm trying to set the Sensitivity on the Xiaomi DJT11LM. Ref: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/toZigbee.js#L634

What I tried: grafik

grafik

grafik

I know the above screenshot is not valid JSON. I tried:

{
    "0xFF0D": {
        "value": "0x15",
        "type": "0x20"
    }
}

=> Error: Cannot read property 'toUpperCase' of undefined

{
    "0xFF0D": {
        "value": 0x15,
        "type": 0x20
    }
}

=> Error: Timeout - 31878 - 1 - 24 - 0 - 4 after 10000ms

{
    "0xFF0D": {
        "value": 15,
        "type": 20
    }
}

=> Error: Cannot read property 'toUpperCase' of undefined

hobbyquaker commented 5 years ago

with the write cmd it should work like this (you have to convert the hex values) image

Using a zigbee2mqtt-style payload ({"sensitivity":"high") can only work with the converter node, the command node (same like #70) does not do any conversions.

hobbyquaker commented 5 years ago

addition: as this is a battery-device you will have to keep it awake when trying to send commands.

Sineos commented 5 years ago

Unfortunately, I cannot get it to work. Not with the converter node and not with writing a direct command. Every time I get the timeout error.

Tried every possible combination / timing with pressing the button on the device.

hobbyquaker commented 5 years ago

give me a few more days, also got this device, will try to reproduce.

Sineos commented 5 years ago

I think I managed to pass the command successfully. It required to go extremely near the coordinator (in contrast to pairing, which it did with quite a distance)

Now I tried to verify the value with: grafik

Again, it required to be very near to the coordinator (which is kind of a pity, once such sensor are finally installed)

I expected to find something like:

{
    "65293": {
        "32": 21
    },
    "modelId": "lumi.vibration.aq1"
}

But I have not been able to read-out this.