Another API Question - Guide Method

71 views
Skip to first unread message

Sean Curry

unread,
Jun 20, 2023, 4:14:20 PM6/20/23
to Open PHD Guiding
My Python Spectroscopy Automation software using PHD2 is coming along nicely. However, I still have a problem where the "guide" method hangs occasionally - no error message and seemingly not trappable in the debugger. PHD2 shows as "Not Responding" in the Windows environment where we are developing using Python 3.10 and Visual Studio Code.

Looking at the documentation, the "guide" method with an ROI looks like this:

{"method": "guide", "params": {"settle": {"pixels": 1.5, "time": 8, "timeout": 40}, "recalibrate": false, "roi": [20, -50, 1280, 960]}, "id": 42}

However, when using the guider.py module to call PHD2 with my ROI, the "guide" method is sent from Call() as:

{"method":"guide","id":1,"params":[{"pixels":2.0,"time":10.0,"timeout":100.0},false,[400,50,200,200]]}

Note the differences from the documentation - no tags "settle", "recalibrate" or "roi". I modified guider.py to send:

{"method":"guide","id":1,"params":{"settle": {"pixels":2.0,"time":10.0,"timeout":100.0},"recalibrate": false, "roi":[400, 50, 200, 200]}}

which is the same as the documentation, and am testing it now.

Any ideas of whether or not this makes a difference to PHD2? I'm still testing the new version and am not yet sure whether or not this is the source of our problem. Any suggestions are welcome.

Thanks, Sean


bw_m...@earthlink.net

unread,
Jun 20, 2023, 11:55:20 PM6/20/23
to open-phd...@googlegroups.com

You should look in the PHD2 debug log file and see what’s going on.  If you do a text search on “evsrv”, you can see all the traffic between your app and PHD2. This interface is used all the time by every automation app that uses PHD2 and it works correctly.  I don’t know anything about guider.py but using a timeout period of 100 seconds seems very long to me.

 

Bruce

--
You received this message because you are subscribed to the Google Groups "Open PHD Guiding" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-phd-guidi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-phd-guiding/b7a13788-1213-4f4f-afa3-5bf8c43d349fn%40googlegroups.com.

Sean Curry

unread,
Jun 21, 2023, 11:33:09 AM6/21/23
to Open PHD Guiding
Thanks Bruce, I'll check the debug log file as you suggest, and see what's going on when it fails. I don't think it ever reaches the timeout, but will see if reducing that value helps.

For those who aren't Python developers, guider.py is Andy Galasso's sample Python PHD2 client, which wraps the API calls and sends JSONRPC to PHD2. It makes it very straightforward to talk to PHD2 from Python.

Sean
Reply all
Reply to author
Forward
0 new messages