This is actually a really clever approach; I hadn't considered querying the Ekos engine "just-in-time" via API after launching the script to get parameters from it. The timing might be a bit tricky; you'd need to set it up as a pre-capture script and have it fork so control returns from the script, then wait a short amount for the exposure to start and then query the value, then ensure the script finishes at approximately the same time as the fake main exposure, but with a bit of tweaking this would likely do the trick.

I'm not currently using the RTS trick described in this post as I've switched over to a camera with proper driver support so I can plate solve, but if I end up running my old camera piggyback for widefield exposures on the same mount then this approach should let me synchronize exposures between the two units with minimal additional configuration. Thanks for the great idea!

Read More...

Are you confirming that these fields no longer support parameters being passed, then, when the previous post-capture script field did?
I would consider it perfectly adequate to be able to pass a single string parameter; as you say, it's possible to pack an arbitrary number of fields/variables into a structure like JSON that's passed this way if needed, and if you're writing the receiving script yourself you can build it to decode whatever is passed pretty easily. This would only be slightly less convenient for people trying to trigger a pre-built command provided by somebody else without having to write their own wrapper, but if it's easier to support a single parameter than an arbitrary number then that wouldn't be a showstopper

Read More...

In a previous version of Ekos, I had been using the post-capture script with a command like the following:

rts_shutter.py 120
to run a small python script that will trigger a camera shutter via a serial port RTS line toggle, with the passed parameter equal to the exposure time requested.

This worked great, but after updating to the latest Ekos I now see that the scripting functionality has been expanded to support Pre/Post job and Pre/Post capture scripts in its own "Scripts Manager" section under tools. I have not been able to get my previous approach to work under this, however - whenever I pass it a script with a parameter, the logs just give the following no file or directory error:
2021-05-16T01:33:43 Executing post capture script rts_shutter.py 120
2021-05-16T01:33:43 execvp: No such file or directory
2021-05-16T01:33:43 Post capture script finished with code -1.
(Order reversed from the presentation in Ekos for readability)

Removing the parameters lets Ekos find the script fine, so I worked around this last time I imaged by making a hardcoded version of the script with that night's exposure duration explicitly set in the script, requiring no parameters. This is, however, pretty inflexible as I'd need a pile of scripts with various potential exposure values to cover all possibilities.
Was the loss of the ability to pass parameters in these scripting fields an unintentional regression, a change in behaviour, am I missing some syntax or something else?
As an additional ask, do these fields have any support for passing "dynamic" variables obtained from the Ekos GUI such as the configured capture count, delay, gain, ISO, etc? I don't currently need this functionality, but I can envision future scenarios where such options would be quite helpful for further customizing external script behaviour.

Read More...