Hi Giau,
You could send a node descriptor request. You will know if this is a router or end device and how the device is powered.

Then you could send an active endpoints request and an endpoint simple request. You could compare the clusters that you have.
The JN-AN-1229 Example provides a Sleeping End Device, it wakes up and calls ZPS_eAplZdoPoll().
This function can be used by an End Device to poll its parent for pending data.
Regards,
Mario