Skip to main content

indipydriver

Enable drivers to be written for instrument control using the INDI protocol.

INDI - Instrument Neutral Distributed Interface.

See https://en.wikipedia.org/wiki/Instrument_Neutral_Distributed_Interface

The protocol defines the format of the data sent, such as light, number, text, switch or BLOB (Binary Large Object) and the client can send commands to control the instrument. The client takes the display format of switches, numbers etc., from the protocol.

INDI is often used with astronomical instruments, but is a general purpose protocol which can be used for any instrument control.

Indipydriver provides classes of 'members', 'vectors' and 'devices', where members hold instrument values, such as switch and number values. Vectors group members together, with labels and group strings, which inform the client how to display the values. 'Devices' hold a number of vectors, so a single device can display several groups of controls.

The 'IPyDriver' class holds one or more devices, and provides methods you can use to send and receive data, which you would use to interface with your own code.

This is one of associated packages.

Indipydriver provides classes to work with your own code to control instruments and produce the INDI protocol.

Indipyserver provides an 'IPyServer' class to run drivers and serve the INDI protocol on a port.

Indipyweb is an INDI client and a web server, it connects to the serving INDI port and provides a web view of instruments.

Indipyterm is a terminal client, which connects to the serving port and can be run to view the instrument controls.

Indipyterm can be remote, or could work on the same machine. As it is a terminal client, it could be run from an SSH connection, conveniently allowing headless operation.

These packages are available on Pypi, and should interwork with other services that follow the INDI specification.

The image below shows the indipyterm terminal connected to a server running an example driver (switching on or off an LED on a RaspberryyPi). The example is described at:

https://indipydriver.readthedocs.io/en/latest/usage/firstexample.html#firstexample

Terminal screenshot

To write a driver, you would create a subclass of IPyDriver and override the following methods.

async def rxevent(self, event)

This is automatically called whenever data is received from the client to set an instrument parameter. The event object describes the received data, and you provide the code which then controls your instrument.

async def hardware(self)

This is called when the driver starts, and as default does nothing, typically it could be a contuously running coroutine which you can use to operate your instruments, and if required send updates to the client.

async def snoopevent(self, event)

This is only used if the device is monitoring (snooping) on other devices.

Having created a driver, you could await its asyncrun() method, which will then communicate by stdin and stdout.

import asyncio
import ... your own modules creating 'mydriver'

asyncio.run(mydriver.asyncrun())

If you made such a script executable, then this driver could be run with third party INDI servers, which expect a driver to be an executable program using stdin and stdout.

Alternatively you could serve your driver, or drivers, by importing IPyServer from indipyserver:

import asyncio
from indipyserver import IPyServer
import ... your own modules creating driver1, driver2 ...

server = IPyServer(driver1, driver2, host="localhost", port=7624, maxconnections=5)
asyncio.run(server.asyncrun())

A connected client can then control all the drivers. The above illustrates multiple drivers can be served.

Documentation at https://indipydriver.readthedocs.io

Installation from https://pypi.org/project/indipydriver

indipyserver available from https://pypi.org/project/indipyserver

indipyweb available from https://pypi.org/project/indipyweb

indipyterm available from https://pypi.org/project/indipyterm

Metadata

Release files for indipydriver 3.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for indipydriver 3.1.2
File Size Uploaded
indipydriver-3.1.2.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for indipydriver 3.1.2
File Interpreter ABI Platform
indipydriver-3.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / indipydriver-3.1.2.tar.gz

Download URL indipydriver-3.1.2.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7f62e21a20563bf9766ae39dc952e88e0a2eccc1a247780242afc59c5698007f
BLAKE2b-256 checksum
How to use checksums
2db031561a56efb6900c3ec7161841f5eb8a20fa81fff1992de1a62ccf2b3a6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / indipydriver-3.1.2-py3-none-any.whl

Download URL indipydriver-3.1.2-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a45122060f47972f739b8a14cc81a275263df66a167ae4b608fbbdaaffb1ddd7
BLAKE2b-256 checksum
How to use checksums
9943c2a1e4b50079e89d2a6b5ddda517cf6d4a8141510a39723ff5349b128b87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release history Release notifications | RSS feed

This release

3.1.2 This release

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.5.0

2 release files

2.4.9

2 release files

2.4.8

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.4

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.9.0

2 release files

1.8.9

2 release files

1.8.8

2 release files

1.8.7

2 release files

1.8.6

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page