Open itgb opened 4 years ago
Were you unable to get it to connect to the network due to these missing commands ? Or does the device pair, but otherwise doesn't respond to commands or doesn't send commands ?
All the commands you've listed seem events or things that come from the device to the hub, and shouldn't be hard to respond to from AqaraHub.
Either way, it's an interesting device, so I'll order one to debug with. In the mean time, I'd be happy to look at more debug output and give pointers as to what could be missing from AqaraHub to support this.
I've attempted to order one of these, but can't find it on my usual channels (aliexpress or banggood). Any idea where I could order one ?
Were you unable to get it to connect to the network due to these missing commands ? Or does the device pair, but otherwise doesn't respond to commands or doesn't send commands ?
All the commands you've listed seem events or things that come from the device to the hub, and shouldn't be hard to respond to from AqaraHub.
Either way, it's an interesting device, so I'll order one to debug with. In the mean time, I'd be happy to look at more debug output and give pointers as to what could be missing from AqaraHub to support this.
Hm, yes, pair failed for missing commands. However, zigbee2mqtt can support it. The following are logs for SP-EUC01(un-supported) and WXKG12LM( supported).
Aqara EU smart plug SP-EUC01: UN-SUPPORT
aliexpress
it can be buy from https://aqara.ru/product/aqara-smart-plug/.
I've attempted to order one of these, but can't find it on my usual channels (aliexpress or banggood). Any idea where I could order one ?
I think the smart plug is a completely standard zigbee device. My standard 3rd party zigbeehub can support it. It's strange, mostly aqara devices are non-standard except the smart plug.
You're right that AqaraHub isn't handling TC_DEV_IND or END_DEVICE_ANNCE_IND, but I don't believe that to be the problem. They're events from the CC2531 stick to AqaraHub indicating that a device was added to the trust-center (security key related stuff), as well as an event indicating a new device joined the network (end device announcement).
I believe Zigbee2mqtt and other hubs will, in response to these messages, interrogate the device to ask what device it is exactly, but AqaraHub isn't really interested as it treats all devices the same, and just waits for Zigbee Cluster Library events/reports coming in.
The fact that you are seeing the TC_DEV and END_DEVICE_ANNCE indicates that the device did in fact join the network correctly, and you should be able to send it commands. You can extract the device ID manually, ignore the first two bytes following the TC_DEV_IND (0x2e, 0x54) then take the following 8 bytes (c6 60 76 3c df 8c cf 04) and put them in the reversed order (this is because it's sent little-endian over the wire) as follows: 04cf8cdf3c7660c6.
Could you (after pairing the device again, and seeing the END_DEVICE_ANNCE) try sending {"command": "On"}
or {"command": "Off"}
to AqaraHub/04CF8CDF3C7660C6/1/out/OnOff
? I believe that should turn it on or off.
You're right that AqaraHub isn't handling TC_DEV_IND or END_DEVICE_ANNCE_IND, but I don't believe that to be the problem. They're events from the CC2531 stick to AqaraHub indicating that a device was added to the trust-center (security key related stuff), as well as an event indicating a new device joined the network (end device announcement).
I believe Zigbee2mqtt and other hubs will, in response to these messages, interrogate the device to ask what device it is exactly, but AqaraHub isn't really interested as it treats all devices the same, and just waits for Zigbee Cluster Library events/reports coming in.
The fact that you are seeing the TC_DEV and END_DEVICE_ANNCE indicates that the device did in fact join the network correctly, and you should be able to send it commands. You can extract the device ID manually, ignore the first two bytes following the TC_DEV_IND (0x2e, 0x54) then take the following 8 bytes (c6 60 76 3c df 8c cf 04) and put them in the reversed order (this is because it's sent little-endian over the wire) as follows: 04cf8cdf3c7660c6.
Could you (after pairing the device again, and seeing the END_DEVICE_ANNCE) try sending
{"command": "On"}
or{"command": "Off"}
toAqaraHub/04CF8CDF3C7660C6/1/out/OnOff
? I believe that should turn it on or off.
thanks a lot. It's working now. Sending a report cmd to the device, will get response. I send the cmd:"AqaraHub/04cf8cdf3c7660c6/1/out/Basic/Read Attributes" -m '{"attributes":[5]}' , and get mode [SP-EUC01].
hello,I want to support the smart plug with following steps: 1.Aqarahub: when receive END_DEVICE_ANNCE, extract the Device ID automatically ,and, push the Device ID to a external controller by mqtt;
Could you check if pull request #62 or branch feature/inform-device-join works for you and fixes your issue ?
I'm publishing the information to the log and MQTT, but I'm not implementing any behaviour (e.g. reading certain attributes) on joined devices, as these kind of investigate-devices-on-join routines usually fail on battery powered devices.
Could you check if pull request #62 or branch feature/inform-device-join works for you and fixes your issue ?
I'm publishing the information to the log and MQTT, but I'm not implementing any behaviour (e.g. reading certain attributes) on joined devices, as these kind of investigate-devices-on-join routines usually fail on battery powered devices.
wonderful, I will check it tomorrow.
Could you check if pull request #62 or branch feature/inform-device-join works for you and fixes your issue ?
I'm publishing the information to the log and MQTT, but I'm not implementing any behaviour (e.g. reading certain attributes) on joined devices, as these kind of investigate-devices-on-join routines usually fail on battery powered devices.
it works now. thanks.
Hello sir, I tested several devices with AqaraHub, such as smar plug (SP-EUC01), Rubik's cube controller and mini switch. The Rubik's cube controller and mini switch can join normally, but after joining the network with smart plug, it will cause a few exceptions:
The above phenomenon was obtained after I carefully and repeatedly verified it. Therefore, I boldly guessed that this problem was caused by the smart plug (SP-EUC01) joining the network due to different processing methods. I added the log of my test to the attachment, including a series of procedures for the device to go online as described above, and a log of all the information that the mqtt subscribes to when the program is running. Among them, I made step instructions. log.zip
Thanks @DuanYuXian, I've created a separate issue for this. I'll try to order an SP-EUC01 and see if I can reproduce it :)
I've attempted to order an SP-EUC01, but was unable to do so. I hope to be able to re-investigate this when the SP-EUC01 will become easier to get hold of.
If anyone is willing to ship me an SP-EUC01 (to the Netherlands), please get in touch: fw@hardijzer.nl
hello, I have test SP-EUC01 with AquaraHub, and it can't be support. I did some research in Aqaurahub and i found that there some key ZDO commands aren't implement, such as TC_DEV_IND、NODE_DESC_RSP、ACTIVE_EP_RSP and so on. unfortunately these commands are key to support standard zigbee device. Mostly Aqara Device isn't standard ,but SP-EUC01.