Stephane, I am sorry I tried to explain the best I cold. The logic in your startup script... it is skipping all of the code that opens the dome because the dome is showing an error already, before that function has even been called. That's what the yellow arrows are showing. Let me see if I can explain in English:
  1. The dome is already in error state
  2. Call MyOpenShutter()
  3. The dome is available and it has shutter controls, so
  4. Look at ShutterStatus. Is it 1 (ShutterClosed)? No, so follow the first yellow arrow (skipping all of the Dome Open code)
  5. Look at ShutterStatus. Is it 0 (ShutterOpen)? No, so follow the second yellow arrow (skipping the return 2)
  6. We are now at the last "else" so print "** #domeopen - Unexpected shutter status " + "4" (ShutterError, the dome is already at error status, right?)

Indeed this is what is in the StartupObs log. There has been no activity to try opening the dome because it is already in error state. If the ShutterStatus is 4 when MyOpenShutter() is called the effect will be to instantly print the "** #domeopen - ..." message.

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.

If someone else is reading this and sees that I have missed something obvious, or that I am using poor communication skills, please feel free to jump in and help.