I am trying to run a simple script to shut my roll off roof but it fails, not sure why. Tested by just pressing run button
Copied example structure from : indilib.org/about/ekos/153-robotic-obser...-ekos-scheduler.html. File runs ok from command line. Does it need to be in a particular directory? currently in /home/max/OBScontrol/maxclose.py
Manual shutdown procedure terminated due to errors.
2020-04-24T10:16:50 Shutdown script failed, aborting...
2020-04-24T10:16:50 Executing script /home/max/OBScontrol/maxclose.py...
I attach script with extension changed to txt, and log.
you could try the Dome Scripting Gateway driver. Then the scheduler triggers startup / shutdown commands through the driver itself.
The driver on the other end needs 2 scripts for opening/ closing operation but they are easier to test because you don' t need the scheduler.
There' s a recent thread on this forum discussing the syntax to use for these scripts. If I find that thread will update this msg.
Thanks, this looks really promising. I have read the threads you suggested. I have copied the full set of scripts to /usr/share/indi/scripts/ ran sudo chmod +x *.*To test I left all the scripts at their default "Empty" values except park, where I added the lines:
print "Shutting Roof ..."
Just to see if it runs.
I then created a simple Indi Ekos profile with the dome scripting gateway. When I ran it, the control panel shows the full set of scripts but the gateway would not connect with the error "2021-04-15T09:28:37: [WARNING] Failed to connect "
I looked at your script for connect.py which contains a USB connect routine, but I assume I can leave it empty, or does it need something to connect to?
I switched on the log files, but the directory is empty.
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?
There's a locking safety switch in Telescope and Dome Tabs:
In Telescope Tab-> Options->Dome locks: This prevents the mount from unparking when dome is parked.
And in Dome Tab->Options->Mount locks: This prevents the dome from parking when mount is unparked.
In my remote hosting facility they provided a device for additional security: two magnet switches fixed on the RA of the mount and connected directly to the roof hardware controller.
In park position the switches close a circuit so that there's a physical check on the mount position and not just rely on software controls. More or less the same as the laser trigger you're thinking of.
Rain / bad weather. You need to connect your rain gauge or meteo station to Ekos through an INDI driver and set safety conditions.
Then Ekos itself manages shutdown (park mount, park dome etc) if weather is not safe.
To connect your device to Ekos you can think of using a standard INDI driver or write your own.
If your rain gauge can output a text file via LAN or Serial port to your Ekos PC, as a first approach I suggest Weather Watcher driver that just need such a text file with proper information.