Thank you for confirming this.
I'll keep it in mind when planning sequences.
 

Read More...

Hi there - looking for information or confirmation on 2 things I noticed when doing long exposure captures and triggering the shutter via pre-capture script.

Kstars 3.5.7 Stable on Linux
INDI drivers also recently updated with all the latest updates from the PPA

Questions:

  1. is the pre-capture script suppose to be executed BEFORE a meridian flip is initiated during a capture sequence? 
    1. MF was successfully completed after pre-capture script was executed and returned 0 (success) result - but unfortunately the shutter had already been opened by the pre-capture script
    2. I have log showing this if it is not the expected behaviour
  2. does a capture sequence check for a pending MF before starting a capture or does it simply wait until the current capture is completed and then check if MF is pending?
    1. If it does check before capture - how does it determine if a flip is pending and if it should perform MF or the capture?
    2. I was doing very long exposures (1700sec - approx 29min) and a capture was started about 7min before the MF was set to happen (as shown in the mount tab)
    3. after the capture was started - the mount tab changed status to "MF waiting"  and logs show this as well
    4. after the capture completed - the MF was completed successfully - but mount had already moved far past the 0.1h (6min) MF limit I had set on the mount tab
Log of the entire session available if either of these 2 are not expected behaviour and need investigation. (verbose logging of INDI, Capture & CCD were still enabled from a different issue I was trying to figure out)
More than happy to run the session again with any additional logging or settings enabled if required.
Since I had never done a capture requiring a MF - I made sure the capture was of an object near the horizon so there was never any danger to the equipment and I could allow the sequence to complete uninterupted.

Thanks 
Pete

Read More...

I got this working and it really wasn't tricky at all - and no timing issues so far.
And I would also like to say thank you for this thread - without it, I probably would never have though of using the d-bus interface to get the exposure parameter - it just kinda came to me after thinking - damn there's gotta be a way to get this info if I can't pass a parameter.
As for the question of what parameters would be useful to scripts - sorry I'm way to new to this to have much input, (2 months of playing with Ekos/INDI and I only got my 1st long exposure/multi exposure session last night)

Setup:

  • IR Led (with 220 ohm resistor soldered to anode (+) pin) connected to Rpi GPIO ground and trigger pin (I used physical pins 12 for trigger and 13 for ground)
  • Borrowed a c++ program for IR trigger (github.com/outofjungle/NikonRemote/blob/master/NikonRemote.cpp) and modified it to use "wiringPi" instead of "arduino". Then added a cmd line argument so it will trigger the IR led immediately or at a specific number of seconds.  (sub-second triggering is always handled by INDI Nikon driver, so I'm not to worried about accuracy of this trigger mechanism)
  • Created a Python script that queries d-bus for exposure time and if successful - triggers the NikonRemote IR program immediately (via subprocess.run()) and then creates a spawned child process (via subprocess.Popen()) to create a NikonRemote process that will trigger the shutter again after X seconds.  (I don't know how acurrate the timing is, so I never exceed 29 minutes as the camera has a 30min maximum shutter duration and I don't want the IR to trigger if the camera has already closed the shutter.). The python script then immediately returns control to Ekos while the 2nd NikonRemote process continues to run as a background process.

How it all works for a session is pretty simple - only one extra step (bullet 3):
  • My camera is always in full manual mode with "bulb" as the shutter speed. (NOTE: INDI driver will not use bulb mode for shutter speeds below 30sec - as far as I can tell from scanning the code - and testing seems to confirm this). However - I suppose that could change in the future...
  • Setup my rig with Nikon DSLR INDI driver (via PTP) - normal polar align, align, focus - all this is done with the camera in normal "capturemode" setting of "continuous low speed" allowing full control via normal INDI driver.
  • Once I'm ready to start sequencing - go to "INDI Control Panel" and in the Nikon Tab - under the "capturesettings" tab, find "capturemode" and change the dropdown to "Quick Response Remote"
    • it seems that if you change it here instead of on the camera - the 15min Remote timeout does not seem to be a limitation
    • I'm also running my camera with AC power - so I'm not concerned about battery drain caused by IR sensor waiting to be triggered - which is something the manual mentions
  • In Ekos under the "Camera" tab in the "Script Manager" dialog box - enter "NikonRemote.py" as the Pre-Capture script.
  • Set your exposure to any value above 30 sec (I wouldn't trust it for anything less 31 sec - driver might try to trigger shutter as well) and below say 1740sec (29 min) and fire away normally
  • and that's it
Capture preview works.
Sessions work
The only problem I had was the IR Led shifted because I didn't fasten it to the camera securely enough and I lost 3 of the last 15 images of my session (unfortunately - Ekos is not able to determine that a new image hasn't been captured and just keeps downloading the last image on the SD card. I could set the INDI driver to "delete" instead of "save" for captured images - but I'll have to think about that...)
I'm actually running the NikonRemote IR trigger executable on my Rpi attached to the mount and the Python script on my computer in the house, where I run Kstars/Ekos. I run the NikonRemote executable via SSH and Private keys from within the python script.

Is this a great solution - not really.
Does it work - you bet.
I've ordered a USB relay and Nikon remote trigger cable and will be changing this over to a better solution once they arrive in a couple weeks.
If you want any of the scripts or code - let me know.
Oh, and this is all Linux & Rpi based - so if you're using windows or mac you might have to do some coding work.

Cheers

Read More...

You could possibly get the info you need from d-bus.
For instance - if the job is already running (which it should be to trigger the pre-capture script), then the Exposure time could be determined from D-bus using the Kstars/Ekos/Capture methods "getActiveJobID" and "getJobExposureDuration".
However, if you need to know this before the capture is started - it won't work, because getJobExposureDuration needs an active Job ID to return the exposure value.

I tested this with python and pydbus and it works. (was looking for an alternate to monitoring RTS for something I'm working on and came across this thread)

from pydbus import SessionBus

# Connect to d-bus session bus
bus = SessionBus()

# Create an object for kstars/capture - allows access to properties and methods.
busObject = bus.get(
    "org.kde.kstars", # Bus name
    "/KStars/Ekos/Capture" # Object path
)

# Introspection returns an XML document containing information
# about the methods supported by a d-bus object 
#print("Introspection data:\n")
#print(busObject.Introspect())

#  get active job ID
id = busObject.getActiveJobID()
# print exposure value for active Job
print(busObject.getJobExposureDuration(id))

should be able to get same info in a shell script using dbus-send command line tool

Read More...

It's only 30 euro for the device in Canada as well. But estimated shipping charge to my location was another 29 euro and probably more for brokerage fees and duties.  There are other similar devices available locally much cheaper. But thanks again for the info and especailly for the idea.

The IR solution works - but has limitations - the IR remote setting for the camera has a time limit for how long it will wait for a signal to trigger the shutter. You can set it to 15 min. But if no IR signal is received after this - it will change back to normal shutter behavior.  And capturing the RTS signal from INDI driver to trigger the IR is not so easy. Not a deal breaker - but just more things that might go wrong...

I'll likely order a USB relay and shutter cable - and a USB hub since I'm out of USB ports on my RPi. But I'll keep playing with the IR until the parts arrive. My delivery time even with Amazon Prime is usually 2 weeks due to my remote location and unfortunately, paying for expedited shipping doesn't improve the delivery speed - it just costs more. Guess I have to pay for not having light polution some how :-)

I'm supposed to get a clear night on Saturday (only the 2nd one in the last 6 weeks), which is why I'm trying to cobble together a solution with available parts.

Cheers
Pete

Read More...

Upon re-reading your post - I'm guessing the wires you show going into the relay - are from the cut open shutter release cable. Is this correct?

Read More...

Thanks. Was not aware of these devices. The ones from Kmtronics - with shipping to my location are nearly $100 CAD - and at that price - I'd just get one of the DSUSB devices from the US.  I'll see if there's something else similar available locally.  Again - thanks for this suggestion.  Can you let me know the wiring connection from the camera remote shutter release cable to the USB relay controller - and did you need any protection circuitry like in this home made cable solution...www.cloudynights.com/topic/457536-usb-co...r-control-for-nikon/

I'm also kinda having fun playing with the IR circuitry and programming.  It's been a long time since I dabbled in this stuff. The only unfortunate part - is I'm 4hr round trip to the nearest electronics store. :-(
Pete

Read More...

So I built a small IR transmitter (using an IR LED salvaged from an old remote - so can't say what model IR LED it is) and hooked it to the GPIO pins of my Rpi 4.
Using info from several different web sites - I was able trigger the Nikon D90 shutter using this cobbled together IR remote.
In addition - I can confirm, that if you setup the D90 so the shutter is triggered by the IR remote and shutterspeed is set to "- -" (it doesn't say "bulb" in IR remote mode) you can open the shutter with the 1st press of the IR remote and close it using a second IR remote signal.  I was able to take a 67sec exposure using this trick.  Next I'll see if I can get the GPIO pin controlling the IR to trigger using the GPIO Serial input on the RPi.  If I it get it all working - I'll post the whole setup here. But that's gonna have to wait.  Cost so far - nothing but time and and old unused remote control.

Read More...

Thanks!  I'll definitely look into this and USB remote shutter release (which I also just became aware of).

Read More...

(hope this doesn't post twice - having problems with recaptch)
Hi there, thought I'd post this incase anyone else was thinking of purchasing a used Nikon D90 or wants to use an existing D90 with Ekos/INDI.

First off - INDI via the gphoto2lib does an excellent job of running this camera and in my opinion, it is a great camera considering the price of a used one ($125 CAD) at the local pawn shop.
Only problem I've come across in Ekos is that liveview (aka streaming) does not work if you do not trigger a photograph first. Once a single image (even 1sec exposure) is taken - preview or streaming works great.
Unfortunately - the Camera itself (or better said, it's firmware) has, what I consider, a major flaw for astrophotography.
<strong>The shutter cannot be triggered via software if the camera is set to bulb mode</strong>.  I have confirmed this exhaustively - even going to the point of borrowing a windows computer and downloading and running the Nikon Camera Control Pro 2 software. <strong>Even Nikon's own software cannot trigger the shutter of the D90 in bulb mode</strong> (and the camera firmware is up to date). Nikon's own software pops up a message telling you the camera is in bulb mode and you'll have to trigger the shutter manually via shutter button on the camera or using the Nikon optional remote shutter release.

So - if you want to use the Nikon D90 with Ekos/INDI, (or any other software), you will be limited to exposures of 30sec unless you trigger the shutter manually via the button on the camera - or via a remote shutter release.

It <strong>MAY</strong> be possible to use a programmable shutter release device to get longer exposures (I have NOT tried this) - but this kind of defeats the purpose of using Ekos/INDI for running your observation sessions. Amazon has some listed as compatible with the D90 that I may still look into, as I do like the camera and I'm not sure I'll send it back to the pawn shop.

Just thought I'd share this as I spent many hours trying to figure out why bulb mode wasn't working. I went so far as to sending PTP opcodes to the camera based on output from gphoto2 debug sessions and gphoto2 shell. Today I finally borrowed a windows computer and - well Nikon's own software output was the nail in the proverbial coffin for bulb mode on this camera...

Cheers - I'm off to try to find a new camera for DSO that won't break the bank.

Pete

Read More...

I just ran into this myself.  Not sure if there's a problem with the Raspbian Config editor, but I did manage to find a solution that seems to fix the issue across reboots and shutdowns. 
The configuration for Wifi Country is kept in the file

/etc/default/crda

Edit the line in the file and add your country (US in your case) after the equal sign on the last line of the file.

REGDOMAIN=US

save the file and reboot to see if it works.

This is a root owned file - so you'll need to use "sudo" when editing.  If you're not sure how to edit it - try this
sudo nano /etc/default/crda
(you'll be prompted for your password)
make your changes
then press [Ctrl]+[x] to exit and answer 'y' to save your changes.
 

Read More...