I’ve been trying to send “zigbee.writeAttribute(0xFC00, 0x0000, DataType.BOOLEAN, 0x00)” to my ZigBee End Device, but I’ve noticed that it is not being sent out from the ST hub. Why isn’t this working?
not really up on the ZigBee stuff but would a write command be considered an OTA update? if so there is a setting to enable in the hub.
writeAttribute is basically just writing a value to a ZigBee device - like writing “value = true”. It should be general to all clusters - OTA is just 1 kind of cluster. I am not focused on OTA.
make sure its enabled just in case?
When you say it is not being sent by the hub, do you have a sniffer running and you don’t see it? Or are you just not seeing the device do what you would expect?
0xFC00 is not a standard cluster. If this is manufacturing specific you would also need to add
[mfgCode: <device_manufacturer_code>] as an argument as well.
I have a sniffer, and I don’t see it. 0xFC00 is my own private cluster. It’s not manufacture specific. I’d also like to say that I am able to do readAttribute just fine.
I got it working by using the “response” method to call my writeAttribute functions - inside of my “updated” function. However, I do notice that whenever the “updated” function calls my writeAttribute functions, it does it twice instead of once. Why is this so?
Also, what are the correct values to use for Boolean? I tried using 0x01 and 0x00. However, I always see “unsupported datatype” in my sniffer log.
It’s difficult to know without seeing code. One thing to note is that calling
zigbee.writeAttribute(...) does not send the command on it’s own but instead builds the appropriate command and returns it. If you return commands from specific methods, they will get sent down to the hub, otherwise you have to explicitly send the hub command similar to what is done here. Although that example is sending a generic command instead of a write attribute, but you would just replace the
zigbee.command call with a
Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)