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.0

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.0
File Size Uploaded
indipydriver-3.1.0.tar.gz 23.4 kB Details

Built distribution (wheel)

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

Total release size: 47.9 kB

Release files / indipydriver-3.1.0.tar.gz

Download URL indipydriver-3.1.0.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
755ed0f74585430633a3b43d2654edf40509bca25d1e9a4082a7ca7768e337f8
BLAKE2b-256 checksum
How to use checksums
fd526c00e5eae491e05ba86a308b07fcf72a3682468db8035c2d0583a715e067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

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

Download URL indipydriver-3.1.0-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d0e706826b76ea816463470616be3be862c4b4b299d9c238e22ea24ea74261f
BLAKE2b-256 checksum
How to use checksums
643436682e14e74ab5abae7d004cc19a5df99c6aa2b8a0de80604b11e57af7cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release history Release notifications | RSS feed

3.1.2

2 release files

3.1.1

2 release files

This release

3.1.0 This release

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