noctua.devices package

Submodules

noctua.devices.alpaca module

class noctua.devices.alpaca.AlpacaDevice(url, dev=None)[source]

Bases: BaseDevice

Base wrapper class for ASCOM Alpaca devices

property actions

List the actions supported by the device.

property addr

Get or set the device URL address.

command(val, cmd='commandstring')[source]
commandblind(val)[source]
property connection

Get or set the connection status of the device.

get(**kwargs)

Modifies the func() method.

property name

Get the name of the device.

put(**kwargs)

Modifies the func() method.

class noctua.devices.alpaca.Dome(url)[source]

Bases: AlpacaDevice

Wrapper for ASCOM Alpaca devices of “dome” type.

abort()[source]

Abort the motion of the dome.

property azimuth

Get or set the dome azimuth.

property is_moving

Check if the dome is slewing.

property is_parked

Check if the dome is at its park position.

property open

Get the dome shutter position, or open/close it.

park()[source]

Put the dome in its park position.

property shutter

Get the status of the dome shutter.

property slave

Check if the dome position is slaved to the telescope, or slave/unslave it.

sync(az)[source]

Force the value of the dome azimuth to assume a specific value.

class noctua.devices.alpaca.Focuser(url)[source]

Bases: AlpacaDevice

property is_moving
property position
class noctua.devices.alpaca.Rotator(url)[source]

Bases: AlpacaDevice

property is_moving
property position
class noctua.devices.alpaca.Switch(url, id=3)[source]

Bases: AlpacaDevice

Wrapper for ASCOM Alpaca devices of “switch” type.

property description

Describe the switch.

property state

Get or set the switch state.

class noctua.devices.alpaca.Telescope(url)[source]

Bases: AlpacaDevice

abort()[source]
property altaz
clear(n)[source]
property clock
property cover
property is_moving
property offset
property open
property park
property radec
property state
property status
property targetradec
property temperature
track()[source]
property tracking

noctua.devices.astelco module

Interface with an Astelco OpenTSI-based device

class noctua.devices.astelco.Focuser(url)[source]

Bases: OpenTSI

Implementation of the Focuser commands mocking my Alpaca Telescope wrapper.

property absolute

Get Absolute focuser position from telnet

property is_moving

TBD with the right telnet commands

property position

Get Relative focuser position from telnet

class noctua.devices.astelco.OpenTSI(url)[source]

Bases: BaseDevice

Base wrapper class for astelco OpenTSI stuff

get(message)[source]

Send a telnet message to the cabinet to retrieve a value or a set of values.

put(key, val)[source]

Send to telnet a key to set a a value. keys and values can be both lists with the same element number.

class noctua.devices.astelco.Rotator(url)[source]

Bases: OpenTSI

Implementation of the Rotator commands mocking my Alpaca Telescope wrapper.

property absolute

Get Absolute rotator position from telnet

property is_moving

TBD with the right telnet commands

property position

Get Relative rotator position from telnet

class noctua.devices.astelco.Sensor(url, temp_id, hum_id)[source]

Bases: OpenTSI

Implementation of a Sensor class.

property humidity

Does it have humidity sensors?

property temperature

Mirrors temperature

class noctua.devices.astelco.Telescope(url)[source]

Bases: OpenTSI

Implementation of the Telescope commands mocking my Alpaca Telescope wrapper.

abort()[source]

Direct way to stop tracking

property altaz
clear(n)[source]
property clock

in UNIX time

property coordinates

Ask simultaneously RA2000, DEC2000, ALT, AZ, LST, UTC. Answer is given as a dict of decimal numbers. UTC is given as unix time.

property cover
property is_moving

Check the motion state of the telescope

property offset

Get Telescope offset

property open
property park

Get if the telescope is in parked position

property radec

Get Right Ascension / Declination

property state
property status

need to check exit and error from get function

property targetradec

Get target Right Ascension / Declination

track()[source]

More direct way to start tracking

property tracking

Tracking status

noctua.devices.basedevice module

Base device. Other devices inherit from this

class noctua.devices.basedevice.BaseDevice(url)[source]

Bases: object

Base device class for our devices

get(message)[source]

Implement a getter method to obtain info from your device.

put(message)[source]

Implement a setter method to send info to your device.

property test_attribute

res = self.get(“”) self._test_attribute = res return self._test_attribute

test_method()[source]

noctua.devices.domotics module

class noctua.devices.domotics.Sensor(url, temp_id, hum_id)[source]

Bases: Sonoff

property humidity
property temperature
class noctua.devices.domotics.Sonoff(url, id)[source]

Bases: object

property all
property clock
get(**kwargs)

Modifies the func() method.

property last_update
property name
put(**kwargs)

Modifies the func() method.

class noctua.devices.domotics.Switch(url, id)[source]

Bases: Sonoff

reboot()[source]
property state

noctua.devices.ipcam module

class noctua.devices.ipcam.DlinkDCSCamera(url)[source]

Bases: BaseDevice

Base wrapper class for Dlink DCS 5020l cameras.

get(**kwargs)

Modifies the func() method.

put(**kwargs)

Modifies the func() method.

class noctua.devices.ipcam.Webcam(url)[source]

Bases: DlinkDCSCamera

Implementation of the Telescope commands mocking my Alpaca Telescope wrapper.

property altaz

Get the IP Camera Network Pan Tilt Zoom.

property clock

Get IP Camera Data Time settings.

property daynight

Get the IP Camera Day Night Mode settings.

property description

Get IP Camera Information.

property email

Get the IP Camera Email notification settings.

property image

Get IP Camera image in raw format.

property inetwork

Get the IP Camera Network information.

property is_moving

Get the IP Camera Motion Detection settings.

property isystem

Get the IP Camera System information.

property network

Get the IP Camera Network settings.

property ptzpresets

Get the IP Camera Network Pan Tilt Zoom Preset List

property save_image

Save a IP Camera image snapshot.

property sound_detection

Get the IP Camera Sound Detection settings.

property stream_info

Get the IP Camera Video stream info.

property upload

Get the IP Camera FTP Upload settings.

property user

Get the IP Camera user setttings.

property user_list

Get the list of IP Camera users.

property version

Get IP Camera CGI version.

property video

Get IP Camera video as mjpeg stream.

property wireless

Get the IP Camera Wireless information.

noctua.devices.meteo module

class noctua.devices.meteo.Meteo(url)[source]

Bases: object

archive()[source]
connect(**kwargs)

Modifies the func() method.

property data
property original
summary()[source]
synctime()[source]
property time
noctua.devices.meteo.main()[source]

noctua.devices.siemens module

class noctua.devices.siemens.Switch(url, id=0)[source]

Bases: object

Base wrapper class for the Siemens PLC switch managing the Telescope cabinet.

property all

Requesting all the avaible status information.

get(**kwargs)

Modifies the func() method.

put(**kwargs)

Modifies the func() method.

property state

the cabinet is on or off?

Type:

Requesting just the state information

noctua.devices.stx module

Interface with a SBIG STX camera device

class noctua.devices.stx.Camera(url)[source]

Bases: STX

Camera device based on STX cameras.

abort()[source]
abort2(**kwargs)

Modifies the func() method.

property all
property ambient
property binning
property center
property cooler
property description
download()[source]
property fan
property filter
full_frame()[source]
half_frame()[source]
property is_moving
property max_range
property ready
property setpoint
small_frame()[source]
start(duration, frametype, datetime='2025-06-19T08:23:00.005151')[source]
property state
property temperature
property version
property xrange
property xyend
property xystart
property yrange
class noctua.devices.stx.STX(url)[source]

Bases: BaseDevice

Base wrapper class for SBIG STX cameras.

property connection

Setup a telnet connection to the cabinet. No decorator to silence errors. If error, not connected.

get(**kwargs)

Modifies the func() method.

put(**kwargs)

Modifies the func() method.

noctua.devices.stx2 module

Interface with a SBIG STX camera device

class noctua.devices.stx2.Camera(url)[source]

Bases: STX

High-level interface for the SBIG STX camera imaging CCD.

abort()[source]

Aborts the current exposure.

property all

A comprehensive dictionary of the current camera state.

Type:

dict

property ambient

The ambient temperature in degrees Celsius.

Type:

float

property binning

The current [X, Y] binning factor.

Type:

list of int

property center

The sensor’s [X, Y] center coordinates for current binning.

Type:

list of int

property cooler

The current state of the CCD cooler (True=On, False=Off).

Type:

bool

property description

The camera model description string.

Type:

str

download(filepath='temp.fits')[source]

Downloads the last completed image from the camera buffer.

Parameters:

filepath (str, optional) – The local path to save the FITS file to.

property fan

The current cooler power level in percent.

Type:

int

property filter

The currently selected filter position (1-8).

Type:

int

full_frame()[source]

Sets the camera to use the full sensor area.

half_frame()[source]

Sets the camera to use a centered 50% sub-frame.

property is_moving

The current state of the filter wheel. 0=Idle, 1=Moving, 2=Error.

Type:

int

property max_range

The maximum sensor dimensions [X, Y] for current binning.

Type:

list of int

property ready

The status of the image buffer. 1 if an image is ready for download, 0 otherwise.

Type:

int

set_window(start_x, start_y, width, height)[source]

Sets the imaging sub-frame in a single, safe command. Coordinates are for a 1x1 binned frame.

Parameters:
  • start_x (int) – The starting X pixel.

  • start_y (int) – The starting Y pixel.

  • width (int) – The width of the sub-frame in pixels.

  • height (int) – The height of the sub-frame in pixels.

property setpoint

The current CCD temperature setpoint in degrees Celsius.

Type:

float

small_frame()[source]

Sets the camera to use a centered 10% sub-frame.

start(duration, frametype, dt=None)[source]

Starts an exposure if the camera is idle.

Parameters:
  • duration (float) – Exposure time in seconds.

  • frametype (int) – The type of frame (0=Dark, 1=Light, 2=Bias, 3=Flat).

  • dt (str, optional) – ISO-formatted datetime string for the FITS header. If None, the current UTC time is used.

property state

The current state of the imaging CCD. 0=Idle, 2=Exposing, 3=Reading, 5=Error.

Type:

int

property temperature

The current CCD temperature in degrees Celsius.

Type:

float

property version

Camera firmware and API version numbers.

Type:

list of str

property xrange

The current [start, end] X-axis window for current binning.

Type:

list of int

property xyend

The current [X, Y] end coordinates for current binning.

Type:

list of int

property xystart

The current [X, Y] start coordinates for current binning.

Type:

list of int

property yrange

The current [start, end] Y-axis window for current binning.

Type:

list of int

class noctua.devices.stx2.STX(url)[source]

Bases: BaseDevice

Base wrapper class for SBIG STX cameras. Handles low-level communication and timing constraints.

property connection

Checks the connection to the camera.

Returns:

True if the camera responds to a version query, False otherwise.

Return type:

bool

get(**kwargs)

Modifies the func() method.

put(**kwargs)

Modifies the func() method.

Module contents

Import devices using configuration files

noctua.devices.dynamic_import(this, dev)[source]

Dynamically import into this module the devices from the nodes.ini and devices.ini files. Old way:

# from config.addresses import ASCOM_REMOTE # from devices import ascom # lamp = ascom.Switch(ASCOM_REMOTE, 2)