After a bit more work I got past that part and it now seems to work.
A few other questions: I am using this to close my roll off shed using a garage door opener. Mechanically it all looks good.
I will probably not use the scheduler to open the roof. Too much can go wrong with dire consequences, for example trying to open with the roof latches locked.
The OBS is in my back garden so my main use, particularly in the summer, will be to set the scheduler going and get indi to image and shutdown while I sleep.
THe main disaster I can foresee is the roof shutting without the scope being parked. Park scope is a tick box on the scheduler which I could forget. Is there a way in the my roof park script to check the scope is indeed parked?
I will probably try and also implement a physical check using a laser trigger and a last resort "collision" switch on the roof. But it would be good to be able to check the indi status.
The other possible disaster is rain. I have a rain gauge, what do you think is the best approach to connect this to trigger shutdown?