×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Optec Flip-Flat Automation?

  • Posts: 179
  • Thank you received: 16
It's working now. I ran a couple of jobs overnight (first clear night in a long time!), and in the morning while I was transferring images, I started experimenting with the indi_getprop and indi_setprop on the command line. I don't know if that cleared out some buffer or initialized something, but it's working now. The script execution is reported in the status and the path stays in the Scripts Manager. The Pre-Capture script works for Previews, too. (In the case below, the script actually fails because I wasn't running the Simulators, but you can see the error in the status) Thanks for your help, Jasem!

1 year 11 months ago #82197
Attachments:

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

  • Posts: 179
  • Thank you received: 16
Here's the script I put together to check if the Flip Flap is open, close it if it is, and wait for it to report closed. I also have the companion to open it if it's closed.

BTW, a side note about the Flip Flat: Don't use it to generate flats immediately after a set of lights during a job if you have an OAG. Don't ask why I know this...
#!/bin/bash
 
#Shell script to close/park the Flip Flat if the cap is open
#AirBourn 2022
 
debug=false
 
coverProp="Flip Flat.Status.Cover"
motorProp="Flip Flat.Status.Motor"
 
#Delineator
IFS='='
 
coverStatus=$(indi_getprop "$coverProp")
read -ra cArr <<< "$coverStatus"
coverString=${cArr[1]}
if $debug; then echo "  cStatus: ${coverStatus}"; fi
if $debug; then echo "  cString: ${coverString}"; fi
 
motorStatus=$(indi_getprop "$motorProp")
read -ra mArr <<< "$motorStatus"
motorString=${mArr[1]}
if $debug; then echo "  mStatus: ${motorStatus}"; fi
if $debug; then echo "  mString: ${motorString}"; fi
 
if [[ "$coverString" == "Open" ]]
then
	if $debug; then echo "  Sending Close Command"; fi
	indi_setprop "Flip Flat.CAP_PARK.PARK=On"
	indi_setprop "Flip Flat.CAP_PARK.UNPARK=Off"
 
	while [ $coverString != "Closed" ]
	do
		coverStatus=$(/usr/bin/indi_getprop "$coverProp")
		#echo "Cover: ${coverStatus}"
		read -ra cArr <<< "$coverStatus"
		coverString=${cArr[1]}
		if $debug; then echo "  Cover: ${coverString}"; fi
 
		motorStatus=$(/usr/bin/indi_getprop "$motorProp")
		#echo "Motor: ${motorStatus}"
		read -ra mArr <<< "$motorStatus"
		motorString=${mArr[1]}
		if $debug; then echo "  Motor: ${motorString}"; fi
	done
fi
 
if $debug; then echo "  Cover is ${coverString}"; fi
 
exit 0
1 year 11 months ago #82231

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

  • Posts: 11
  • Thank you received: 1
Hi, I'm having trouble with the same problem of scripts disappearing from the Manager.
I wondered if you could help with how you resolved this.
BW
9 months 1 week ago #93530

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

Time to create page: 0.365 seconds