×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Scheduler observatory shutdown procedure script fails.

  • Posts: 79
  • Thank you received: 13
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

Error is:

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.

TNX, Max
2 years 7 months ago #52555
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 13
Found that if I sub run the script it works?!
Created new script:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import sys
import os
os.system('python maxclose.py')
exit(0)

Ran that from scheduler and all OK, not sure why
Max
2 years 7 months ago #52677

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 13
Still having a problem with this.

Same issue as below script runs when I issue it at the command prompt python maxclose.py    made the script executable
Made executable, but doesn't run in scheduler.

Does the script need to be in a particular directory?

All I am trying to do is briefly close then open a relay to trigger the closure of my roof.  Is there a better way? 
 
1 year 7 months ago #70055

Please Log in or Create an account to join the conversation.

  • Posts: 232
  • Thank you received: 57
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.

ferrante

EDIT: some resources:
github.com/indilib/indi/blob/master/driv...dome/dome_script.txt
indilib.org/forum/general/4637-dome-scri...-off-roof.html#35227
indilib.org/forum/domes/8449-control-rol...ff-driver.html#64818
The following user(s) said Thank You: Max Dobres
Last edit: 1 year 7 months ago by Ferrante Enriques.
1 year 7 months ago #70069

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 13
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 ..."
sys.stdout.flush()
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.

Getting there, grateful for the help.

Max
1 year 7 months ago #70091

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 13
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?
Regards
Max
1 year 7 months ago #70092

Please Log in or Create an account to join the conversation.

  • Posts: 232
  • Thank you received: 57
Glad to hear that it works.

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.

Ferrante
The following user(s) said Thank You: Max Dobres
1 year 7 months ago #70093

Please Log in or Create an account to join the conversation.

Time to create page: 0.198 seconds