Bob, thank you very much for your response always very educational, but obviously it's me who am not clear. I totally agree with your analysis, but what I do not understand is the following: the controller does not indicate any error, while the ASCOM driver returns one. How can that be? Who manages this status?

Somehow the dome needs not to report ShutterError, ever, unless there really is some sort of error (stuck shutter, broken cable, frozen, electronic failure, etc. etc.). This is a basic rule: Do it right or report an error. Reporting an error should/must never be part of routine operation.
I also totally agree and will rethink my program. But like you, I would like to understand where the ShutterError comes from. This can possibly hide a bigger problem (there are rarely miracles in computer science ).

Stéphane