INDI Library v1.9.4 Released (17 Jan 2022)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones. Some highlights:

Power and connect devices via startup script

  • Posts: 25
  • Thank you received: 1

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 ;-)

1 year 3 weeks ago #65383

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

Hello Simon,

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 B) 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.

mkfifo /tmp/indififo
indiserver -v -f /tmp/indififo

This starts INDI server in FIFO mode.

Then open another console

echo "start indi_pegasus_upb" > /tmp/indififo

This would case the INDI server to start this driver. Next you'd use indi_setprop to toggle the 12v for them on/off. Say, you turned power for the QHY camera, then you'd this:

echo "start indi_qhy_ccd" > /tmp/indififo

Then that would start is on the server and so forth. I hope this helps.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 weeks ago #65415

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

  • Posts: 25
  • Thank you received: 1
Hi Jasem,

thanks for your reply!

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?

Thank you for the help. This is really exciting.
1 year 2 weeks ago #65434

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

  • Posts: 25
  • Thank you received: 1
Ok, I experimented with the startup script and scheduler but still need some help. This is what I did:

1) Created a startup script:

<code># -*- coding: utf-8 -*-

import os
import time
import sys

print "Start indiserver in FIFO mode..."
os.system('mkfifo /tmp/myFIFO')
os.system('indiserver -v -f /tmp/myFIFO')

print "Start mount simulator driver"
os.system('echo "start indi_simulator_telescope" > /tmp/myFIFO')

print "Start ccd simulator driver"
os.system('echo "start indi_simulator_ccd" > /tmp/myFIFO')


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!

Last edit: 1 year 2 weeks ago by Simon.
1 year 2 weeks ago #65679

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

Time to create page: 0.351 seconds