we have built and set up a small observatory on our school roof. The observatory is supposed to be automated using the Ekos scheduler. The power for the mount, CCD, guiding cam, filter wheel and dew heater bands is delivered by a PegasusAstro Ultimate Powerbox v2. In order to reduce power consumption, I would like to turn on the power for and connect the above named devices using a startup script to be executed in the scheduler when an observation is about to start.
So my questions are:
1. Is it possible to turn on the 12V power outlets on the UPB with a command that can be executed via a startup script?
2. Is it possible to connect devices (once they are powered up) with a command that can be executed via a startup script?
May be someone is already doing this and could provide their startup script so I can cheat a little bit
That's great to here. Please share some photos of this observatory with us. I am doing exactly the same thing in my home observatory, so I'm not using the Pegasus, since I built my observatory back in 2015 and went to
Digital Loggers Power Switch
to turn on/off the equipment when the observatory is started/closed. To answer you question:
1. Yes, it's possible, you can use indi_setprop to toggle UPB ports on/off. Though that means that A) Pegasus has to be powered at all times, and indiserver running UPB must be up and running.
2. Yes, as described above.
Unfortunately, I don't have such a script ready since I use the web power switch to do this and not Pegasus. Figuring out how to use indi_setprop is probably the easy part. In order to start the drivers for your equipment *after* you power them up, you also need to ask INDI server to start the respective drivers. So it goes something like this.
I have attached some pics. The observatory is pretty much set up and the rig is waiting in a box to be put up in the obsy. But first I have to make sure, that it is rain tight The design of the housing is a close adoption of Magnus Eriksens project (Thanks Magnus for the great blog on Stargazers Lounge).
I am a little worried about polar alignment (the lid of the obsy is blocking the view of the north celestial pole -> so I guess I have to use the legacy polar alignment tool), but that is a different story ...
Yes, I was thinking the same. Ekos will run on a Raspberry Pi 4 and hopefully the UPB can cope with being powered on all the time.
Okay, let me make sure I get this right. I will start Ekos (graphically on the RPi 4). Then I will feed the scheduler with a sequence file, weather data and startup script. When the target is visible and weather is appropriate, the startup script starts indiserver in fifo mode and connects 1) the UPB, 2) turns on the 12V outlets of the UPB to power on the other devices and 3) starts the drivers for the other devices, right?
Above you say something about opening another console. How is that taken care of in a startup script? Just by using a new "os.system(echo "start indi_***_***" > /tmp/indififo)" call in my python script?
2) I started the scheduler with a simple esq file and the startup script. I did not start Ekos (hit the play button on the Ekos setup page) before launching the scheduler, because I wanted the startup script to start indiserver and the (simulation) drivers.
3) This is the output:
<code>2021-01-09T12:51:38 Mount already unparked.
2021-01-09T12:51:36 INDI devices connected.
2021-01-09T12:51:35 Ekos started.
2021-01-09T12:51:05 Start ccd simulator driver
2021-01-09T12:49:34 Start mount simulator driver
2021-01-09T12:49:29 Start indiserver in FIFO mode...
2021-01-09T12:49:29 Executing script /home/sternwarte/Schreibtisch/startup_script.py...
2021-01-09T12:49:27 Scheduler started.</code>
4) So the startup script is starting the indiserver in FIFO mode and the drivers. But after executing the startup script, Ekos is starting the selected profile and tells me, that another indiserver is already running (the one I started with the script, I guess).
5) The devices are only showing up in the INDI Control panel after Ekos starts the profile and not when I start the devices in the startup script.
Can anyone please tell me what I am doing wrong? Thanks a lot!
When I start indi_pegasus_upb driver via command line
I can't manipulate the Power switches. Is there anything else I need to do besides starting the indi_pegaus_upb driver using the indiserver command?
Another question I have is, if it is possible to stop the indiserver in the startup script, so that the scheduler can start the proper profile with all the drivers, after I turn on my equipment via startup script.
When I start the Pegasus UPB via EKOS in Kstars, the power switch is NOT turned on. I guess that killing the indiserver makes the UPB turn off that switch again. This does not happen when I start and stop the UPB driver from EKOS within Kstars, even when turning the switch on via indi_setprop in the command line.
Any ideas what I could do to make the UPB keep that power switch in the On-state?