Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Managing devices with alpyca

  • Please log in to reply
4 replies to this topic

#1 pe78420

pe78420

    Lift Off

  • -----
  • topic starter
  • Posts: 6
  • Joined: 01 Sep 2019

Posted 13 March 2025 - 09:27 AM

Hi folks,
 

I have some questions about the Python module alpyca (3.0.0) for managing devices (maybe a silly question?):

First, I started the ASCOM Remote Server (v7.02) on the PC where the devices are attached, but without launching it automatically with devices connected or driver loaded (server configuration option: "Start with Devices Connected" unchecked).

When I accessed the ASCOM Remote Server from another PC via "http://w.x.y.z:ppppp...figureddevices", I was able to retrieve the list of all devices configured on that server, including the DeviceType "Focuser" with DeviceNumber 0.

However, when I attempted to interact with this focuser via alpyca (e.g., checking its connection status, retrieving its description, driver info, etc.), I received the error: "Device focuser/0 is not configured on the Remote Server."

foc = Focuser("w.x.y.z:ppppp", 0)
try:
       foc.connected = True
       # or print(foc.description)
except AlpacaRequestException as e:
        print(e)

I don’t understand why, I thought this device was properly configured...

What am I doing wrong?

Many thanks in advance.

Best regards,

Philippe



#2 Bob Denny

Bob Denny

    ASCOM Initiative

  • -----
  • Organization
  • Posts: 1,176
  • Joined: 17 Mar 2009
  • Loc: Mesa AZ USA

Posted 13 March 2025 - 11:12 AM

Did you have a real focuser connected on the other (COM/Windows) side of ASCOM Remote Server? If not (my guess based on the error message), then there is no focuser. ASCOM Remote is just a gateway from one world to the other. 

 

Since you have ASCOM Platform 7 installed on your Windows System, just go start up the Omni Simulators instead. These simulators make both classic/COM ASCOM devices as well as Alpaca devices. Talk to the Omni Simulators Focuser via Alpaca from your Alpyca Python program. Forget ASCOM Remote. 

 

I assume you've looked at the info on Management at Alpaca Device Server Management.


Edited by Bob Denny, 13 March 2025 - 11:13 AM.


#3 pe78420

pe78420

    Lift Off

  • -----
  • topic starter
  • Posts: 6
  • Joined: 01 Sep 2019

Posted 13 March 2025 - 11:44 AM

Hi Bob,

Thanks for your reply.

Yes, I have a focuser connected (a ZWO EAF).

When I click 'Connect' on the ASCOM Remote Server Console and retry my Python script, it works.

However, the previous error message is misleading: 'Device focuser/0 is not configured on the Remote Server,' even though all devices are properly configured as confirmed by the response received from the URL: http://w.x.y.z/manag...nfigureddevices

Is there any additional API to use in order to load a driver before connecting it?

Best regards,

Philippe



#4 Bob Denny

Bob Denny

    ASCOM Initiative

  • -----
  • Organization
  • Posts: 1,176
  • Joined: 17 Mar 2009
  • Loc: Mesa AZ USA

Posted 13 March 2025 - 01:12 PM

Philippe --

 

When I click 'Connect' on the ASCOM Remote Server Console and retry my Python script, it works.

However, the previous error message is misleading: 'Device focuser/0 is not configured on the Remote Server,' even though all devices are properly configured as confirmed by the response received from the URL: http://w.x.y.z/manag...nfigureddevices

Is there any additional API to use in order to load a driver before connecting it?

Ok then all is well. Perhaps the error message could be changed from "Device focuser/0 is not configured on the Remote Server" to something like "Device focuser/0 is not configured, or no focuser is connected, on the Remote Server". However, this is pretty low priority and the author of that tool, Peter Simpson, is quite busy on other things. 

 

No there is not an API in Alpaca to tell a Remote Server to connect a focuser or ???. That's all supposed to be set up and running before providing  Alpaca clients with access to classic ASCOM devices. 

 

I still recommend you do your initial development with the simulated Focuser provided by the Omni Simulator then switch to the real ZWO focuser and ASCOM Remote later. 


Edited by Bob Denny, 13 March 2025 - 01:14 PM.


#5 pe78420

pe78420

    Lift Off

  • -----
  • topic starter
  • Posts: 6
  • Joined: 01 Sep 2019

Posted 14 March 2025 - 10:30 AM

Thank you for your response, I somewhat expected the answer... wink.gif


  • Bob Denny likes this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics