Extend JSON API


#1

I’ve been writing a simple web page so I can check on the status of my current session status but I wonder if it would be possible to extend the information provided. For example :

  • Provide the current CCD temperature, camera model, firmware level in the camera properties.
  • Provide the current equipment (aperture etc) and site profile currently in use.
  • Provide the current sequence in use including time duration elapsed, time duration requested, filter, sub type, requested sub count, current sub count, binning, running pre/post events etc
  • Info on guide camera model etc
  • Status info when plate solving, autofocusing etc

I understand that this request is asking for more info than the API and the core SGPro was envisaged to provide.

Regards

Mark


#2

Agree – I think Ken/Jared have commented they would love to have a full API that allows complete control, but has been understandably low priority and requires a bit of thought to execute properly. But it would be great to have this functionality for a lightweight client.


#3

Yes, I agree that this is low priority and enhancements for the core SGPro program should come first.


#4

I think there is an argument to be made for making the API a relatively high priority. There are numerous requests that come in that could be implemented by third parties if an API were available. There are plenty of requests that Jared and Ken will probably never get to because they are only important to a minority of their customers, but having an API would make those features possible without relying on Ken and Jared. For example, if the API allowed manipulating sequences, some of these recent feature requests could be implemented by others taking the burden off of Ken and Jared:

  • Automatically planning astrometry targets
  • generating mosaics based on the PI widefield mosaic script
  • automatically generating flats targets for sequences with a camera rotator at varying angles
  • sky flats
  • planning targets for acquisition based on rise/set and transit times

Features related to observatory automation are often very equipment-specific, but could be implemented if an API were available:

  • coordinating equipment power on and power off with running the sequence
  • integrating control of roof and dome shutter with sequence (opening the roof early to start cool-down)
  • re-starting an aborted sequence when weather stations report good conditions

These are just some ideas that immediately come to mind. I’m sure that new and interesting ideas would come up over time if an API was available.

To the degree that an API simply exposes existing features of the software (like manipulating sequences) it should not impose a heavy support toll on the developers.

Andy


2.4.3.13: end time in the past... why?
#5

Another reason to have the JSON API re-examined is because whilst my ATIK camera is idle and cooling the API states that it is capturing. I would rather the correct state of idle and cooling with the current temperature.

Mark


#6

My biggest request in this area is to be able to retrieve basic sequence status via an API. I’d love to be able to write an Android app, for example, to show the sequence progress. I would be fine if these APIs required licensing the Notification add-in. I don’t want to undermine sales of that, I just want to access the information in a different way.

Kyle


#7

Forgive me here as this is all a bit technical for me. But if youre looking to remote in to see the status - can you not just use team viewer or something similar? I remote into my laptop to check on the status from my phone - and have full control of the laptop from there (it’s great for warming up the camera before getting out of bed!), and I can see the images rolling in.

If this isn’t what you’re looking for and I’ve completely missed the point, my apologies !


#8

Yes, I could just see the status via team viewer, but the user experience would be much better with a native android app. You also could do things like send a push notification on certain events, collect history data so you could browse past sessions and compare image statistics, or whatever else you wanted to do. There’s many possibilities that having access to something like this would allow.


#9

I was looking for sequence status in the API to write an iOS app to monitor imaging progress in dark sky locations with local wifi but no internet access. I agree with the comment above that team viewer or similar remote desktop utilities work but are not user friendly from mobile devices. Imagine how nice it would be to have a mobile app showing “big status” along with getting notifications when something goes wrong as @KGoodwin suggested. I thought of using the log file that can be generated by the optional notification system as a workaround but an API call would be much better. Unfortunately I can’t use text or e-mail notifications from SGP as I don’t have internet access in my dark sky location. Everything has to work over a local network.


#10

Yes, I agree with all these sentiments. Right now the API is “gear-centric” (to allow stuff like PEMPro, CCD Inspector etc to work with SGPro), but we are slowly adding sequence status and control as we move forward.


#11

@Ken @Andy I’m still very interested in this. I would love to be able to make a webapp and mobile apps to give an overview of what’s going on, basic sequence status and such at least. Something full blown like the ACP web interface would be made possible with a comprehensive API as well and I’m sure there would be plenty of people interested (myself included) in building tools like that on top of SGP in that case. I think it would be beneficial to SGP and its sales to have an active ecosystem around it.


www.mainsequencesoftware.com