indipydriver


Nameindipydriver JSON
Version 3.0.2 PyPI version JSON
download
home_pageNone
SummaryEnable drivers to be written for instrument control using the INDI protocol.
upload_time2025-10-20 13:21:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords indi driver astronomy instrument remote control
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 three 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.

**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/concept.html#first-example


![Terminal screenshot](https://github.com/bernie-skipole/indipydriver/raw/main/docs/source/usage/images/image3.png)


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

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "indipydriver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "indi, driver, astronomy, instrument, remote, control",
    "author": null,
    "author_email": "Bernard Czenkusz <bernie@skipole.co.uk>",
    "download_url": "https://files.pythonhosted.org/packages/35/3a/84676f8f23c74d79be064aeb64fcf4357a5fa36424bbefa3af0fb42b617f/indipydriver-3.0.2.tar.gz",
    "platform": null,
    "description": "# indipydriver\n\nEnable drivers to be written for instrument control using the INDI protocol.\n\nINDI - Instrument Neutral Distributed Interface.\n\nSee https://en.wikipedia.org/wiki/Instrument_Neutral_Distributed_Interface\n\nThe 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.\n\nINDI is often used with astronomical instruments, but is a general purpose protocol which can be used for any instrument control.\n\nIndipydriver 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.\n\nThe '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.\n\nThis is one of three associated packages.\n\n**Indipydriver** provides classes to work with your own code to control instruments and produce the INDI protocol.\n\n**Indipyserver** provides an 'IPyServer' class to run drivers and serve the INDI protocol on a port.\n\n**Indipyterm** is a terminal client, which connects to the serving port and can be run to view the instrument controls.\n\n\nIndipyterm 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.\n\nThese packages are available on Pypi, and should interwork with other services that follow the INDI specification.\n\nThe 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:\n\nhttps://indipydriver.readthedocs.io/en/latest/usage/concept.html#first-example\n\n\n![Terminal screenshot](https://github.com/bernie-skipole/indipydriver/raw/main/docs/source/usage/images/image3.png)\n\n\nTo write a driver, you would create a subclass of IPyDriver and override the following methods.\n\n**async def rxevent(self, event)**\n\nThis 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.\n\n**async def hardware(self)**\n\nThis 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.\n\n**async def snoopevent(self, event)**\n\nThis is only used if the device is monitoring (snooping) on other devices.\n\nHaving created a driver, you could await its asyncrun() method, which will then communicate by stdin and stdout.\n\n    import asyncio\n    import ... your own modules creating 'mydriver'\n\n    asyncio.run(mydriver.asyncrun())\n\nIf 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.\n\nAlternatively you could serve your driver, or drivers, by importing IPyServer from indipyserver:\n\n    import asyncio\n    from indipyserver import IPyServer\n    import ... your own modules creating driver1, driver2 ...\n\n    server = IPyServer(driver1, driver2, host=\"localhost\", port=7624, maxconnections=5)\n    asyncio.run(server.asyncrun())\n\nA connected client can then control all the drivers. The above illustrates multiple drivers can be served.\n\nDocumentation at https://indipydriver.readthedocs.io\n\nInstallation from https://pypi.org/project/indipydriver\n\nindipyserver available from https://pypi.org/project/indipyserver\n\nindipyterm available from https://pypi.org/project/indipyterm\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Enable drivers to be written for instrument control using the INDI protocol.",
    "version": "3.0.2",
    "project_urls": {
        "Documentation": "https://indipydriver.readthedocs.io",
        "Source": "https://github.com/bernie-skipole/indipydriver"
    },
    "split_keywords": [
        "indi",
        " driver",
        " astronomy",
        " instrument",
        " remote",
        " control"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "16d41b013e64be66ed3fda3f83a94a148a69f560d3e0136f4cf33b788c140ed7",
                "md5": "686a4198cdc1c63a7ca6d9d5d2945526",
                "sha256": "c2a46208e0c762eb07e7d3bc946d75ffcfda6d8bae83592c4f728178ff1f84e9"
            },
            "downloads": -1,
            "filename": "indipydriver-3.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "686a4198cdc1c63a7ca6d9d5d2945526",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 24338,
            "upload_time": "2025-10-20T13:21:31",
            "upload_time_iso_8601": "2025-10-20T13:21:31.197390Z",
            "url": "https://files.pythonhosted.org/packages/16/d4/1b013e64be66ed3fda3f83a94a148a69f560d3e0136f4cf33b788c140ed7/indipydriver-3.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "353a84676f8f23c74d79be064aeb64fcf4357a5fa36424bbefa3af0fb42b617f",
                "md5": "fee213b7764285805873264d1d15d2c6",
                "sha256": "c85398c30a48d034908bd4750ad63ceaa28f157bc93b9e6a3a5bd5752ca0719b"
            },
            "downloads": -1,
            "filename": "indipydriver-3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fee213b7764285805873264d1d15d2c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 23139,
            "upload_time": "2025-10-20T13:21:32",
            "upload_time_iso_8601": "2025-10-20T13:21:32.687690Z",
            "url": "https://files.pythonhosted.org/packages/35/3a/84676f8f23c74d79be064aeb64fcf4357a5fa36424bbefa3af0fb42b617f/indipydriver-3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-20 13:21:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bernie-skipole",
    "github_project": "indipydriver",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "indipydriver"
}
        
Elapsed time: 5.01274s