Welcome, Guest
Username: Password: Remember me
27 Feb 2017
INDI development team is happy to announce the release of INDI Library v1.4.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers. Several improvements and enhancements are included in this release including native support for Cygwin and MacOS platforms in addition to Linux, BSD, and Windows (Client only).
Read More...
  • Page:
  • 1

TOPIC: PHD2 and scheduler shutdown...

PHD2 and scheduler shutdown... 1 week 20 hours ago #17322

  • maudy
  • maudy's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 181
  • Karma: 1
  • Thank you received: 13
Is there a way that the Scheduler can continue image captures, even if PHD2 is reporting lost star, until the sequence and scheduler rules complete?

In my last session, it was not possible to use the Scheduler with PHD2. The skies were not great. They were good enough so that every second 120s sub would be okay. Unfortunately that is just the way the weather is here right now.

PHD2 would recover on its own to start the guiding nicely again; however, Ekos would shutdown if guiding was checked off in the scheduler.

Unchecking guiding was fine, and PHD2 would do its thing and the scheduler finished in the end.

The missing part is that Ekos would not shutdown PHD2 once the sequence completed. Ekos would shut down everything else, and PHD2 would continue looping the camera. Ideally, Ekos could tell PHD2 to somehow stop when the sequence stops, if it is running.

Please let me known if this might be possible somehow.

Thank you

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

Last Edit: by maudy.

PHD2 and scheduler shutdown... 1 week 18 hours ago #17325

You could perhaps shutdown PHD2 in the shutdown script?
The following user(s) said Thank You: maudy

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

PHD2 and scheduler shutdown... 1 week 1 hour ago #17327

  • maudy
  • maudy's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 181
  • Karma: 1
  • Thank you received: 13
I did not think of that. Great idea.

I have not used the startup/such down scripts yet. Is it as simple entering the complete path to a shell script to kill the PHD2 process?

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

PHD2 and scheduler shutdown... 4 days 15 hours ago #17347

  • maudy
  • maudy's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 181
  • Karma: 1
  • Thank you received: 13
Okay. It seems shell scripts will not work. I tried the below example and it failed. Is it the sudo causing the failure or perhaps a shell script cannot work.

2017-06-20T18:54:05 Manual shutdown procedure terminated due to errors.
2017-06-20T18:54:05 Shutdown script failed, aborting...
2017-06-20T18:54:04 Executing script /home/astroberry/bin/ekos_shutdown_script.sh ...
2017-06-20T18:54:03 Warning! Executing shutdown procedure manually...

e.g. Not pretty but a quick test.

psid=`ps axww | grep -i "phd2" | awk '{print $1}'`
sudo kill -9 $psid

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

PHD2 and scheduler shutdown... 4 days 14 hours ago #17350

Why run sudo? is PHD2 running as root? This is a simpler script:
#!/bin/bash
pkill phd2 | true

This script will always return 0 whether PHD2 was running or not but it will kill it if it is running. Try that.
The following user(s) said Thank You: maudy

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

PHD2 and scheduler shutdown... 4 days 13 hours ago #17353

  • maudy
  • maudy's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 181
  • Karma: 1
  • Thank you received: 13
This worked perfectly!! Thank you

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

PHD2 and scheduler shutdown... 4 days 6 hours ago #17362

  • pch
  • pch's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 29
This work but phd2 do not close nicely because the signal is not handled within phd2. This may lead to memory leak.

You can use the server interface instead:
nc localhost 4400 <<EOF
{"method": "shutdown"}
EOF

Other server command are described here:
github.com/OpenPHDGuiding/phd2/wiki/Even...er-method-invocation
The following user(s) said Thank You: maudy

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

PHD2 and scheduler shutdown... 3 days 18 hours ago #17368

  • maudy
  • maudy's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 181
  • Karma: 1
  • Thank you received: 13
This is excellent.

I have another issues in that instructing PHD2 to dither when running separate, yet connected to IND, does not happen as mentioned above. Perhaps there is a script solution for this with the CCD.... something to try. I can post back if successful.

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

PHD2 and scheduler shutdown... 3 days 6 hours ago #17381

  • pch
  • pch's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 29
You can dither with the following netcat command:
nc -N localhost 4400 <<EOF
{"method": "dither", "params":[5, false, {"pixels": 1.0, "time": 5, "timeout": 30}]}
EOF
-N option is require to exit netcat after the command is send
5 is the dither range
false is to not force RA only
The remaining parameters are the settle options:
wait to settle to 1 pixel
for a minimum of 5 second
for a maximum of 30 second

To know when the dither is completed it is possible to wait for the "SettleDone" event send by phd2 when settle is completed but this can be difficult by using only netcat, in this case a python script using a socket object is probably more easy to do. Or just make your script to sleep for the maximum settle timeout.
The following user(s) said Thank You: maudy

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

PHD2 and scheduler shutdown... 2 days 3 hours ago #17388

  • maudy
  • maudy's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 181
  • Karma: 1
  • Thank you received: 13
I will definitely give this a try.

Perhaps some day I will be able to get leaving the guiding as part of the scheduler, checked off in the scheduler. Until this perhaps this can help get dither working for me :)

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

  • Page:
  • 1
Time to create page: 0.221 seconds

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!

Gallery

Replica

Why INDI

Replica