pylitejet


Namepylitejet JSON
Version 0.6.2 PyPI version JSON
download
home_page
SummaryA library for controlling a LiteJet lighting system.
upload_time2023-12-22 06:53:24
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License
keywords litejet
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This project provides a pure Python3 library for interfacing with the LiteJet lighting system.

## Setup
1. You will need the LiteJet programming software from the [Dragon Technologies](https://www.dragontechinc.com/) Programming page.
2. Your LiteJet MCP should be configured for 19.2 K baud.
   1. For firmware versions 5.00 and higher, this setting is configured using the LiteJet software's Settings screen.
   2. For firmware versions 4.90 and lower, this setting is configured by setting DIP Switch 4 to OFF. Press the RESET button after changing this.
2. In the LiteJet software's Settings screen configure it to send "Third Party Carriage Return".
3. In the LiteJet software's Lights screen configure each load to announce changes. This is the "Load RS232" checkbox on each load's middle panel.
4. Connect the LiteJet's RS232-2 port to your computer.

If you have LiteJet 48 then the RS232-2 port is used to connect the two boards together. So you will need to configure RS232-1 for third party mode by setting DIP Switch 8 to ON and DIP Switch 3 to OFF. Press the RESET button after changing this. (To change RS232-1 back to programming mode, set DIP Switch 8 to OFF.)

## Test

1. List all buttons and loads: `python3 ./test.py --path /dev/serial0 list -l -b`
2. Monitor button presses and load changes: `python3 ./test.py --path /dev/serial0 monitor`
3. Control a load: `python3 ./test.py --path /dev/serial0 load 1 on`

## Sample

```python
import asyncio
import pylitejet

async def main():
    try:
        lj = await pylitejet.open("/dev/serial0")
    except pylitejet.LiteJetError as exc:
        print(f"Cannot connect: {exc}")
        return

    await lj.activate_load(1) # on

    await lj.deactivate_load(1) # off

    await lj.activate_load_at(1, 50, 8) # 50% over 8 seconds

    await lj.close()

asyncio.run(main())
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pylitejet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "litejet",
    "author": "",
    "author_email": "Jon Caruana <jon@joncaruana.com>",
    "download_url": "https://files.pythonhosted.org/packages/5d/1a/8a8bc6db333b0bb6c7bc3e1f2f064d0729d552041053198fa46fb776e04f/pylitejet-0.6.2.tar.gz",
    "platform": null,
    "description": "This project provides a pure Python3 library for interfacing with the LiteJet lighting system.\n\n## Setup\n1. You will need the LiteJet programming software from the [Dragon Technologies](https://www.dragontechinc.com/) Programming page.\n2. Your LiteJet MCP should be configured for 19.2 K baud.\n   1. For firmware versions 5.00 and higher, this setting is configured using the LiteJet software's Settings screen.\n   2. For firmware versions 4.90 and lower, this setting is configured by setting DIP Switch 4 to OFF. Press the RESET button after changing this.\n2. In the LiteJet software's Settings screen configure it to send \"Third Party Carriage Return\".\n3. In the LiteJet software's Lights screen configure each load to announce changes. This is the \"Load RS232\" checkbox on each load's middle panel.\n4. Connect the LiteJet's RS232-2 port to your computer.\n\nIf you have LiteJet 48 then the RS232-2 port is used to connect the two boards together. So you will need to configure RS232-1 for third party mode by setting DIP Switch 8 to ON and DIP Switch 3 to OFF. Press the RESET button after changing this. (To change RS232-1 back to programming mode, set DIP Switch 8 to OFF.)\n\n## Test\n\n1. List all buttons and loads: `python3 ./test.py --path /dev/serial0 list -l -b`\n2. Monitor button presses and load changes: `python3 ./test.py --path /dev/serial0 monitor`\n3. Control a load: `python3 ./test.py --path /dev/serial0 load 1 on`\n\n## Sample\n\n```python\nimport asyncio\nimport pylitejet\n\nasync def main():\n    try:\n        lj = await pylitejet.open(\"/dev/serial0\")\n    except pylitejet.LiteJetError as exc:\n        print(f\"Cannot connect: {exc}\")\n        return\n\n    await lj.activate_load(1) # on\n\n    await lj.deactivate_load(1) # off\n\n    await lj.activate_load_at(1, 50, 8) # 50% over 8 seconds\n\n    await lj.close()\n\nasyncio.run(main())\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A library for controlling a LiteJet lighting system.",
    "version": "0.6.2",
    "project_urls": {
        "repository": "https://github.com/joncar/pylitejet.git"
    },
    "split_keywords": [
        "litejet"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69980daa6877560690b070764cc3754eb0aa5c3b536bbe99f465bb53f3197fd0",
                "md5": "00753f2f07e36e70204d8306497dada4",
                "sha256": "5f09257a89cd9e473cdef4e3777d5ed96a05e4093e86b641f2583cc1d8b21cbc"
            },
            "downloads": -1,
            "filename": "pylitejet-0.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "00753f2f07e36e70204d8306497dada4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6977,
            "upload_time": "2023-12-22T06:53:22",
            "upload_time_iso_8601": "2023-12-22T06:53:22.750425Z",
            "url": "https://files.pythonhosted.org/packages/69/98/0daa6877560690b070764cc3754eb0aa5c3b536bbe99f465bb53f3197fd0/pylitejet-0.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d1a8a8bc6db333b0bb6c7bc3e1f2f064d0729d552041053198fa46fb776e04f",
                "md5": "d26f5fab941f2c2c162435aab7883e00",
                "sha256": "91dad1eb99248e8211d81d8be5e4c29e31226c8661a13ecd3b88c5c3d8e024bb"
            },
            "downloads": -1,
            "filename": "pylitejet-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d26f5fab941f2c2c162435aab7883e00",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 12969,
            "upload_time": "2023-12-22T06:53:24",
            "upload_time_iso_8601": "2023-12-22T06:53:24.252760Z",
            "url": "https://files.pythonhosted.org/packages/5d/1a/8a8bc6db333b0bb6c7bc3e1f2f064d0729d552041053198fa46fb776e04f/pylitejet-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-22 06:53:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "joncar",
    "github_project": "pylitejet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pylitejet"
}
        
Elapsed time: 0.15532s