Allow users to define the port used for ANSVR (Local)

Allow users to change the default port used for ANSVR (Local Astrometry.NET). Not everyone uses the 8080 default. I’m sure this is a simple change to whatever browser link SGP uses to call the settings page (just like ANSVR uses in the Windows start menu). I looked for it in all the SGP folders, including appdata, but couldn’t find it.

Sure, I know you can simply type in the address manually, but that isn’t a very elegant solution.

Cheers

I guess I don’t understand what is “inelegant” about this or what change you’d recommend. It allows a lot of flexibility. You can even have ANSVR setup on a completely different machine in your observatory if you want. The majority of people will run ANSVR with a default port of 8080, those that don’t understand the implications of what they’re doing and can easily change SGP to suit their needs.

image

Jared

1 Like

Howdy Jared,

No insult was intended. I hope you didn’t take it as such. Frankly I figured you’d just stick this at the bottom of a list that has more important items on it.

I’ve never been able to use 8080. Not really sure why. Something else must occupy that port on both my laptop and desktop.

What I envisioned as a more elegant option was to allow SGP users to hardcode whichever line you use to call the local settings web page. For example, since I don’t use 8080 I can’t use the setting link provided by the ANSVR local install in windows. I have to navigate to the install folder, right-click on the web link, then edit the default address to use the port I installed it with. Once I do that once I can simply use the shortcut in the start menu to get there without always changing the address to include the port I installed it on.

I was just suggesting you allow SGP users to do the same so for every new sequence the astrometry.NET (Local) pull down you provide uses the port the SGP user installed it on.

Regards,
Eric

No insult was taken :wink:

I’m still unsure how the existing SGP solution is inadequate though. If you setup the port and IP (like I have above) then using the Settings button will take you to that page with the port in place.

To make this automatic SGP would need to scan all of the open ports on your machine and send a request that we would expect ANSVR to answer.

Unless I’m not understanding your request…this is exactly what I showed above.

Jared

Inadequate is a strong word. Where do you code that astrometry.net (local) pull down tab? Is it compiled with the rest of the SGP code, or does it call a webpage link? If it’s compiled then what I’m suggesting won’t work easily. If it calls a webpage link (like ANSVR does, see photos), then what I’m suggesting is possible.

The only “negative” with the existing solution is that I must type out “http://127.0.0.1:8014/api” when I create a new equipment profile. I know, such horrible first world problems… :smile:

It is compiled but you can override it like in my example. The “Local” and the “Remote” versions are always there…you can add your own endpoint should you choose. SGP uses that to know where to find the API and if you launch the settings from SGP it will automatically add “api/config” to the endpoint. You’d need to set this up anyways so SGP would know where to find your local variant.

Also, if you have a weak mount machine but a beefy machine elsewhere on your network, you can use this to use the remote machine as a platesolver vs your weak machine.

But yes, you’d need to set “http://127.0.0.1:8081” in your equipment profile so SGP knows where to find the ANSVR Server as we communicate with it via the IP and Port that is specified.

Jared

“ Also, if you have a weak mount machine but a beefy machine elsewhere on your network, you can use this to use the remote machine as a platesolver vs your weak machine.”

Great idea! This alone was worth this thread.

Thanks Jared. Your work is appreciated very much.

Actually, not as simple as simply typing in the port of the more powerful machine on the network. I get a refusal to connect error on my browser. I’ll need to look into this further unless you can point me to specific directions on how to use a remote machine for plate solving. The ANSVR developer notes for using HTTP interface were no help.

Also, and no big deal, but I have to type the /api at the end of http://127.0.0.1:xxxx. SGP only auto populates the /config. I’m using 4.657 64-bit.

Figured it out. Thanks for that tip!

Sounds like you got it figured out. But you’ll likely need to open up some ports on the remote machine and then specify the IP/Hostname of the remote machine to be able to access ANSVR on that port.

Jared

Yes, it was pretty easy once I played around with it. I needed to ensure Perl.exe wasn’t blocked by my firewall. Then it was simply a matter of entering the following as the end point in SGP:

http://192.xxx.x.xxx:80xx/api, where the IP:Port is the remote “fast” machine.

It’s very syntax sensitive. Only that precise address will work. As a side note, I can’t get to the /config for the remote “fast” machine from SGP on my “slow” machine. With that address above as the end point the “settings” button remains greyed out. But I can enter that address in a browser on the “slow” machine and get to the remote “fast” machine’s config page.

This is really a nice feature. My “slow” machine is a i9 laptop, but the “fast” is a 3990x ThreadRipper monster. It crushes that math about 3x faster than the i9. Getting 12s blind solves remotely now.

Can this be implemented for PlateSolve2 or any of the others that SGP supports?

Regards,
Eric