Integrating generic remote control

I’m installing motorised louvres in my patio. They come with a generic remote control. Would it be possible to ditch this remote and integrate it via say ZigBee? How do I find out what protocol the remote talks and then create the necessary controls?