_images/alpaca128.png

Alpaca Device Server Management

Provides information about an Alpaca device server found via Alpaca Device Server Discovery, and the devices which are provided by that server. For more information see the Alpaca API Reference (external).

Example using the Management functions:

svrs = discovery.search_ipv4()
print(svrs)
for svr in svrs:
    print(f"At {svr}")
    print (f"  V{management.apiversions(svr)} server")
    print (f"  {management.description(svr)['ServerName']}")
    devs = management.configureddevices(svr)
    for dev in devs:
        print(f"    {dev['DeviceType']}[{dev['DeviceNumber']}]: {dev['DeviceName']}")

Output:

['127.0.0.1:32323', '127.0.0.1:11111']
At 127.0.0.1:32323
    V[1] server
    ASCOM Alpaca Simulators
        Camera[0]: Alpaca Camera Sim
        CoverCalibrator[0]: Alpaca CoverCalibrator Simulator
        Dome[0]: Alpaca Dome Sim
        FilterWheel[0]: Alpaca Filter Wheel Sim
        Focuser[0]: Alpaca Focuser Sim
        ObservingConditions[0]: Alpaca Observing Conditions Sim
        Rotator[0]: Alpaca Rotator Sim
        SafetyMonitor[0]: Alpaca SafetyMonitor Sim
        Switch[0]: Alpaca Switch V2 Sim
        Telescope[0]: Alpaca Telescope Sim
At 127.0.0.1:11111
    V[1] server
    ASCOM Remote Server
        Rotator[0]: Rotator Simulator
        Telescope[0]: Telescope Simulator for .NET
        Focuser[0]: ASCOM Simulator Focuser Driver
alpaca.management.apiversions(addr: str) List[int]

Returns a list of supported Alpaca API version numbers

Parameters:

addr – An address:port string from discovery

Raises:

AlpacaRequestException – Method or parameter error, internal Alpaca server error

Note

  • Currently (April 2022) this will be [1]

alpaca.management.configureddevices(addr: str) List[dict]

Return a list of dictionaries describing each device served by this Alpaca Server

Each element of the returned list is a dictionary of properties of each Alpaca device served by the server at addr. The dictionaries consist of the following elements:

DeviceName:

The name of the device

DeviceType:

The ASCOM standard name for the type of device

DeviceNumber:

The index of the device among devices of the same type. See Notes.

UniqueID:

A “globally unique ID” identifying this device

Parameters:

addr – An address:port string from discovery

Raises:

AlpacaRequestException – Method or parameter error, internal Alpaca server error

alpaca.management.description(addr: str) str

Return a description of the device as a whole (the server)

Parameters:

addr – An address:port string from discovery

Raises:

AlpacaRequestException – Method or parameter error, internal Alpaca server error

Note

  • This is the description of the server at the given address:port, which may serve multiple Alpaca devices.