If your battery is disconnected or you manually open the sunroof using the hex head wrench, you have to re-set your sunroof motor as follows :
Inhibitor Switch. Specifications
Specifications
▷ Type: Combination of output signals from 4 terminals
Power supply (V)
12
Output type
Combination of output signals
...
Troubleshooting
Troubleshooting
Symptom
Probable cause
Remedy
Play in steering
Loose yoke plug
Retighten
Loose steering gear ...
ESC connector input/output
Connector Terminal
Specification
Remark
No
Description
29
IGNITION1(+)
High level of wake up vol ...