uwscli


Nameuwscli JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryUni-Wireless-Sync: wireless control toolkit for TL LCD fan hubs
upload_time2025-10-27 02:37:03
maintainerNone
docs_urlNone
authorStudy Hsueh
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Study Hsueh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords lian-li uni-fan wireless lcd
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Uni Wireless Sync CLI

Warning: This is an unofficial implementation; use at your own risk.

## Overview

Uni Wireless Sync (UWS) CLI provides command-line utilities for managing Uni Fan Wireless controllers, L-Wireless receivers, and LCD panels. Each command re-opens the required USB or RF device so no background daemon is left running, and lower-level HID/USB errors are surfaced directly to simplify scripting.

## Supported Hardware

- UNI FAN TL wireless LCD panels
- UNI FAN TL wireless fan hubs (non-LCD)

Other Uni Fan series are currently not supported.

## Features

- Discover TL LCD USB devices and 2.4 GHz wireless fan controllers.
- Query LCD firmware and handshake data.
- Send JPEG frames or apply control settings (mode, brightness, rotation) to the LCD.
- Keep the wireless TL LCD awake by emitting periodic handshakes.
- List wireless fan hubs with metadata (MAC, master MAC, channel, device type, fan speeds, PWM targets).
- Send one-shot PWM commands to TL wireless fans over the 2.4 GHz dongle.
- Bind or unbind wireless hubs against the active master controller.
- Toggle motherboard PWM sync mode for one hub or every bound hub.
- Broadcast static RGB payloads to wireless hubs (experimental).

## Installation

```bash
pip install uwscli
# optional image helpers
pip install uwscli[images]

python -m venv .venv
source .venv/bin/activate
pip install -e .
# or include dev extras
pip install -e .[dev]
```

## Usage Examples

```bash
# Enumerate connected devices
uws lcd list
uws fan list

# Display operations
uws lcd info --serial <usb-serial>
uws lcd send-jpg --serial <usb-serial> --file assets/sample_lcd.jpg
uws lcd keep-alive --serial <usb-serial> --interval 5

# Fan hub operations
uws fan set-fan --mac aa:bb:cc:dd:ee:ff --pwm 120
uws fan bind --mac aa:bb:cc:dd:ee:ff
uws fan unbind --mac aa:bb:cc:dd:ee:ff
uws fan pwm-sync --all
uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --once
```

`uws lcd list` prints JSON rows that include a `serial` field—copy that value when invoking other LCD subcommands.

## Command Reference

- `uws lcd list` – enumerate TL LCD devices and show their USB serial numbers.
- `uws lcd info --serial <usb-serial>` – read firmware and handshake data.
- `uws lcd send-jpg --serial <usb-serial> --file <image.jpg>` – stream a JPEG asset.
- `uws lcd keep-alive --serial <usb-serial> [--interval seconds]` – emit periodic handshakes to prevent the wireless panel from dimming.
- `uws lcd control --serial <usb-serial> [--mode show-jpg|show-app-sync|lcd-test] [--jpg-index N] [--brightness 0-100] [--fps N] [--rotation 0|90|180|270] [--test-color R,G,B]` – send an `LCDControlSetting` payload.
- `uws fan list` – fetch a snapshot of bound wireless devices via the RF receiver.
- `uws fan set-fan --mac <aa:bb:..> --pwm <0-255>` – send a single shot PWM update to the matching wireless hub using the RF sender.
- `uws fan set-led --mac <aa:bb:..> --mode static|rainbow|frames|effect|random-effect` – apply wireless LED effects (**experimental**).

### `uws fan set-led` modes

- `static`: requires `--color R,G,B` or `--color-list R,G,B;...` to paint the LED strip once.
- `rainbow`: procedural rainbow; optional `--frames N` (default 24) and `--interval-ms` (default 50).
- `frames`: feed a JSON animation via `--frames-file`. Each frame is an array of `[R, G, B]` triples; see `examples/tl_frames_sample.json` for a minimal illustration (the CLI will pad or truncate per device LED count).
- `effect`: drives any of the 29 TL presets. Choose an effect with `--effect <name>` (e.g. `twinkle`, `meteor_shower`), adjust brightness 0‑255 via `--effect-brightness`, pick direction with `--effect-direction 0|1`, and select which segment to update using `--effect-scope front|behind|both` (default `both`).
- `random-effect`: picks a random preset each time; accepts the same brightness/direction/scope flags as `effect`.

  Available effect names (case-insensitive): `rainbow`, `rainbow_morph`, `static_color`, `breathing`, `runway`, `meteor`, `color_cycle`, `staggered`, `tide`, `mixing`, `voice`, `door`, `render`, `ripple`, `reflect`, `tail_chasing`, `paint`, `ping_pong`, `stack`, `cover_cycle`, `wave`, `racing`, `lottery`, `intertwine`, `meteor_shower`, `collide`, `electric_current`, `kaleidoscope`, `twinkle`.

  Example:

  ```
  uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode effect --effect twinkle --effect-brightness 180 --effect-direction 0 --effect-scope both
  ```

  Random example:

  ```
  uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode random-effect --effect-brightness 200 --effect-direction 1
  ```
- `uws fan pwm-sync --all|--mac [--once]` – mirror motherboard PWM output to bound hubs (looping by default, single iteration with `--once`).

## Dependencies

- `hidapi` (via `hid`) for TL LCD HID access.
- `pyusb` for the RF sender/receiver WinUSB endpoints.
- `pycryptodomex` for the DES-CBC transport used by the wireless LCD hub.
- `Pillow` is optional for JPEG frame validation.

Each command expects the TL LCD USB display (vendor 0x04FC or 0x1CBE) and the wireless transmitter/receiver pair (vendor 0x0416) to be attached when the command executes.

## Linux udev Permissions

Grant non-root access to the TL wireless dongles by adding `/etc/udev/rules.d/99-tl-wireless.rules` with:

```
# Winbond SLV3RX_V1.6 (receiver)
SUBSYSTEM=="usb", ATTR{idVendor}=="0416", ATTR{idProduct}=="8041", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb_device", ATTR{idVendor}=="0416", ATTR{idProduct}=="8041", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="8041", MODE="0666", GROUP="plugdev"

# Winbond SLV3TX_V1.6 (transmitter)
SUBSYSTEM=="usb", ATTR{idVendor}=="0416", ATTR{idProduct}=="8040", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb_device", ATTR{idVendor}=="0416", ATTR{idProduct}=="8040", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="8040", MODE="0666", GROUP="plugdev"

# Luminary Micro TL-LCD Wireless-1.3
SUBSYSTEM=="usb", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="0006", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb_device", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="0006", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="0006", MODE="0666", GROUP="plugdev"
```

Reload the rules and replug the dongles:

```
sudo udevadm control --reload
sudo udevadm trigger
```

## License

Released under the MIT License. See `LICENSE` for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "uwscli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "lian-li, uni-fan, wireless, lcd",
    "author": "Study Hsueh",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/86/2c/4ac9ed8d6c96567b6dea4a07cabded3c37712090ad0f460163d148ffe05d/uwscli-0.3.0.tar.gz",
    "platform": null,
    "description": "# Uni Wireless Sync CLI\n\nWarning: This is an unofficial implementation; use at your own risk.\n\n## Overview\n\nUni Wireless Sync (UWS) CLI provides command-line utilities for managing Uni Fan Wireless controllers, L-Wireless receivers, and LCD panels. Each command re-opens the required USB or RF device so no background daemon is left running, and lower-level HID/USB errors are surfaced directly to simplify scripting.\n\n## Supported Hardware\n\n- UNI FAN TL wireless LCD panels\n- UNI FAN TL wireless fan hubs (non-LCD)\n\nOther Uni Fan series are currently not supported.\n\n## Features\n\n- Discover TL LCD USB devices and 2.4 GHz wireless fan controllers.\n- Query LCD firmware and handshake data.\n- Send JPEG frames or apply control settings (mode, brightness, rotation) to the LCD.\n- Keep the wireless TL LCD awake by emitting periodic handshakes.\n- List wireless fan hubs with metadata (MAC, master MAC, channel, device type, fan speeds, PWM targets).\n- Send one-shot PWM commands to TL wireless fans over the 2.4 GHz dongle.\n- Bind or unbind wireless hubs against the active master controller.\n- Toggle motherboard PWM sync mode for one hub or every bound hub.\n- Broadcast static RGB payloads to wireless hubs (experimental).\n\n## Installation\n\n```bash\npip install uwscli\n# optional image helpers\npip install uwscli[images]\n\npython -m venv .venv\nsource .venv/bin/activate\npip install -e .\n# or include dev extras\npip install -e .[dev]\n```\n\n## Usage Examples\n\n```bash\n# Enumerate connected devices\nuws lcd list\nuws fan list\n\n# Display operations\nuws lcd info --serial <usb-serial>\nuws lcd send-jpg --serial <usb-serial> --file assets/sample_lcd.jpg\nuws lcd keep-alive --serial <usb-serial> --interval 5\n\n# Fan hub operations\nuws fan set-fan --mac aa:bb:cc:dd:ee:ff --pwm 120\nuws fan bind --mac aa:bb:cc:dd:ee:ff\nuws fan unbind --mac aa:bb:cc:dd:ee:ff\nuws fan pwm-sync --all\nuws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --once\n```\n\n`uws lcd list` prints JSON rows that include a `serial` field\u2014copy that value when invoking other LCD subcommands.\n\n## Command Reference\n\n- `uws lcd list` \u2013 enumerate TL LCD devices and show their USB serial numbers.\n- `uws lcd info --serial <usb-serial>` \u2013 read firmware and handshake data.\n- `uws lcd send-jpg --serial <usb-serial> --file <image.jpg>` \u2013 stream a JPEG asset.\n- `uws lcd keep-alive --serial <usb-serial> [--interval seconds]` \u2013 emit periodic handshakes to prevent the wireless panel from dimming.\n- `uws lcd control --serial <usb-serial> [--mode show-jpg|show-app-sync|lcd-test] [--jpg-index N] [--brightness 0-100] [--fps N] [--rotation 0|90|180|270] [--test-color R,G,B]` \u2013 send an `LCDControlSetting` payload.\n- `uws fan list` \u2013 fetch a snapshot of bound wireless devices via the RF receiver.\n- `uws fan set-fan --mac <aa:bb:..> --pwm <0-255>` \u2013 send a single shot PWM update to the matching wireless hub using the RF sender.\n- `uws fan set-led --mac <aa:bb:..> --mode static|rainbow|frames|effect|random-effect` \u2013 apply wireless LED effects (**experimental**).\n\n### `uws fan set-led` modes\n\n- `static`: requires `--color R,G,B` or `--color-list R,G,B;...` to paint the LED strip once.\n- `rainbow`: procedural rainbow; optional `--frames N` (default 24) and `--interval-ms` (default 50).\n- `frames`: feed a JSON animation via `--frames-file`. Each frame is an array of `[R, G, B]` triples; see `examples/tl_frames_sample.json` for a minimal illustration (the CLI will pad or truncate per device LED count).\n- `effect`: drives any of the 29 TL presets. Choose an effect with `--effect <name>` (e.g. `twinkle`, `meteor_shower`), adjust brightness 0\u2011255 via `--effect-brightness`, pick direction with `--effect-direction 0|1`, and select which segment to update using `--effect-scope front|behind|both` (default `both`).\n- `random-effect`: picks a random preset each time; accepts the same brightness/direction/scope flags as `effect`.\n\n  Available effect names (case-insensitive): `rainbow`, `rainbow_morph`, `static_color`, `breathing`, `runway`, `meteor`, `color_cycle`, `staggered`, `tide`, `mixing`, `voice`, `door`, `render`, `ripple`, `reflect`, `tail_chasing`, `paint`, `ping_pong`, `stack`, `cover_cycle`, `wave`, `racing`, `lottery`, `intertwine`, `meteor_shower`, `collide`, `electric_current`, `kaleidoscope`, `twinkle`.\n\n  Example:\n\n  ```\n  uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode effect --effect twinkle --effect-brightness 180 --effect-direction 0 --effect-scope both\n  ```\n\n  Random example:\n\n  ```\n  uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode random-effect --effect-brightness 200 --effect-direction 1\n  ```\n- `uws fan pwm-sync --all|--mac [--once]` \u2013 mirror motherboard PWM output to bound hubs (looping by default, single iteration with `--once`).\n\n## Dependencies\n\n- `hidapi` (via `hid`) for TL LCD HID access.\n- `pyusb` for the RF sender/receiver WinUSB endpoints.\n- `pycryptodomex` for the DES-CBC transport used by the wireless LCD hub.\n- `Pillow` is optional for JPEG frame validation.\n\nEach command expects the TL LCD USB display (vendor 0x04FC or 0x1CBE) and the wireless transmitter/receiver pair (vendor 0x0416) to be attached when the command executes.\n\n## Linux udev Permissions\n\nGrant non-root access to the TL wireless dongles by adding `/etc/udev/rules.d/99-tl-wireless.rules` with:\n\n```\n# Winbond SLV3RX_V1.6 (receiver)\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"0416\", ATTR{idProduct}==\"8041\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb_device\", ATTR{idVendor}==\"0416\", ATTR{idProduct}==\"8041\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb_interface\", ATTRS{idVendor}==\"0416\", ATTRS{idProduct}==\"8041\", MODE=\"0666\", GROUP=\"plugdev\"\n\n# Winbond SLV3TX_V1.6 (transmitter)\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"0416\", ATTR{idProduct}==\"8040\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb_device\", ATTR{idVendor}==\"0416\", ATTR{idProduct}==\"8040\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb_interface\", ATTRS{idVendor}==\"0416\", ATTRS{idProduct}==\"8040\", MODE=\"0666\", GROUP=\"plugdev\"\n\n# Luminary Micro TL-LCD Wireless-1.3\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"1cbe\", ATTR{idProduct}==\"0006\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb_device\", ATTR{idVendor}==\"1cbe\", ATTR{idProduct}==\"0006\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb_interface\", ATTRS{idVendor}==\"1cbe\", ATTRS{idProduct}==\"0006\", MODE=\"0666\", GROUP=\"plugdev\"\n```\n\nReload the rules and replug the dongles:\n\n```\nsudo udevadm control --reload\nsudo udevadm trigger\n```\n\n## License\n\nReleased under the MIT License. See `LICENSE` for details.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Study Hsueh\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Uni-Wireless-Sync: wireless control toolkit for TL LCD fan hubs",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/phstudy/tlv2-lcd",
        "Issues": "https://github.com/phstudy/tlv2-lcd/issues"
    },
    "split_keywords": [
        "lian-li",
        " uni-fan",
        " wireless",
        " lcd"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4303bc4e8d7041bbd18d0f27caec04ff6c4b4d7b862f72caed08e409315e5d18",
                "md5": "36379ba436a1dd800a68c78621cc368d",
                "sha256": "a14daa1f63b8ac5a7807efd9990d0e2b8f7a15193001dc2207d0949f70ac2e43"
            },
            "downloads": -1,
            "filename": "uwscli-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36379ba436a1dd800a68c78621cc368d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 47956,
            "upload_time": "2025-10-27T02:37:02",
            "upload_time_iso_8601": "2025-10-27T02:37:02.240094Z",
            "url": "https://files.pythonhosted.org/packages/43/03/bc4e8d7041bbd18d0f27caec04ff6c4b4d7b862f72caed08e409315e5d18/uwscli-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "862c4ac9ed8d6c96567b6dea4a07cabded3c37712090ad0f460163d148ffe05d",
                "md5": "377b8b18d8a7dca1f3c7de4d5f2218da",
                "sha256": "b75440bed95b45380565700404a08f1aba4bf39f07913ade50c9347ef4c1a247"
            },
            "downloads": -1,
            "filename": "uwscli-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "377b8b18d8a7dca1f3c7de4d5f2218da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 55816,
            "upload_time": "2025-10-27T02:37:03",
            "upload_time_iso_8601": "2025-10-27T02:37:03.687797Z",
            "url": "https://files.pythonhosted.org/packages/86/2c/4ac9ed8d6c96567b6dea4a07cabded3c37712090ad0f460163d148ffe05d/uwscli-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-27 02:37:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "phstudy",
    "github_project": "tlv2-lcd",
    "github_not_found": true,
    "lcname": "uwscli"
}
        
Elapsed time: 0.73113s