uwscli 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uwscli-0.1.0/src/uwscli.egg-info → uwscli-0.3.0}/PKG-INFO +36 -11
- {uwscli-0.1.0 → uwscli-0.3.0}/README.md +35 -10
- {uwscli-0.1.0 → uwscli-0.3.0}/pyproject.toml +12 -1
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/__init__.py +4 -1
- uwscli-0.3.0/src/uwscli/cli.py +801 -0
- uwscli-0.3.0/src/uwscli/data/__init__.py +0 -0
- uwscli-0.3.0/src/uwscli/data/twinkle.bin +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/lcd.py +57 -21
- uwscli-0.3.0/src/uwscli/led.py +7 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/structs.py +2 -2
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/system_usb.py +18 -8
- uwscli-0.3.0/src/uwscli/tinyuz.py +192 -0
- uwscli-0.3.0/src/uwscli/tl_effects.py +1355 -0
- uwscli-0.3.0/src/uwscli/tlcontroller.py +129 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/usbutil.py +17 -5
- uwscli-0.3.0/src/uwscli/wireless.py +916 -0
- {uwscli-0.1.0 → uwscli-0.3.0/src/uwscli.egg-info}/PKG-INFO +36 -11
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/SOURCES.txt +9 -1
- {uwscli-0.1.0 → uwscli-0.3.0}/tests/test_cli_errors.py +22 -13
- uwscli-0.3.0/tests/test_cli_output.py +749 -0
- uwscli-0.3.0/tests/test_led_compression.py +97 -0
- uwscli-0.3.0/tests/test_wireless_integration.py +321 -0
- uwscli-0.3.0/tests/test_wireless_led_packets.py +85 -0
- uwscli-0.1.0/src/uwscli/cli.py +0 -416
- uwscli-0.1.0/src/uwscli/wireless.py +0 -362
- uwscli-0.1.0/tests/test_cli_output.py +0 -186
- uwscli-0.1.0/tests/test_wireless_integration.py +0 -92
- {uwscli-0.1.0 → uwscli-0.3.0}/LICENSE +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/setup.cfg +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/logging_utils.py +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/dependency_links.txt +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/entry_points.txt +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/requires.txt +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/top_level.txt +0 -0
- {uwscli-0.1.0 → uwscli-0.3.0}/tests/test_usbutil.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uwscli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Uni-Wireless-Sync: wireless control toolkit for TL LCD fan hubs
|
|
5
5
|
Author: Study Hsueh
|
|
6
6
|
License: MIT License
|
|
@@ -55,13 +55,13 @@ Provides-Extra: images
|
|
|
55
55
|
Requires-Dist: Pillow>=10.0; extra == "images"
|
|
56
56
|
Dynamic: license-file
|
|
57
57
|
|
|
58
|
-
#
|
|
58
|
+
# Uni Wireless Sync CLI
|
|
59
59
|
|
|
60
60
|
Warning: This is an unofficial implementation; use at your own risk.
|
|
61
61
|
|
|
62
62
|
## Overview
|
|
63
63
|
|
|
64
|
-
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.
|
|
64
|
+
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.
|
|
65
65
|
|
|
66
66
|
## Supported Hardware
|
|
67
67
|
|
|
@@ -80,10 +80,7 @@ Other Uni Fan series are currently not supported.
|
|
|
80
80
|
- Send one-shot PWM commands to TL wireless fans over the 2.4 GHz dongle.
|
|
81
81
|
- Bind or unbind wireless hubs against the active master controller.
|
|
82
82
|
- Toggle motherboard PWM sync mode for one hub or every bound hub.
|
|
83
|
-
|
|
84
|
-
## Roadmap
|
|
85
|
-
|
|
86
|
-
- Broadcast static RGB payloads to wireless hubs (CLI command not yet implemented).
|
|
83
|
+
- Broadcast static RGB payloads to wireless hubs (experimental).
|
|
87
84
|
|
|
88
85
|
## Installation
|
|
89
86
|
|
|
@@ -115,8 +112,8 @@ uws lcd keep-alive --serial <usb-serial> --interval 5
|
|
|
115
112
|
uws fan set-fan --mac aa:bb:cc:dd:ee:ff --pwm 120
|
|
116
113
|
uws fan bind --mac aa:bb:cc:dd:ee:ff
|
|
117
114
|
uws fan unbind --mac aa:bb:cc:dd:ee:ff
|
|
118
|
-
uws fan pwm-sync --all
|
|
119
|
-
uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --
|
|
115
|
+
uws fan pwm-sync --all
|
|
116
|
+
uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --once
|
|
120
117
|
```
|
|
121
118
|
|
|
122
119
|
`uws lcd list` prints JSON rows that include a `serial` field—copy that value when invoking other LCD subcommands.
|
|
@@ -127,10 +124,33 @@ uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --disable --fallback-pwm 120
|
|
|
127
124
|
- `uws lcd info --serial <usb-serial>` – read firmware and handshake data.
|
|
128
125
|
- `uws lcd send-jpg --serial <usb-serial> --file <image.jpg>` – stream a JPEG asset.
|
|
129
126
|
- `uws lcd keep-alive --serial <usb-serial> [--interval seconds]` – emit periodic handshakes to prevent the wireless panel from dimming.
|
|
130
|
-
- `uws lcd control --serial <usb-serial> [--mode show-jpg|show-app-sync|lcd-test] [--index N] [--brightness 0-100] [--fps N] [--rotation 0|90|180|270] [--test-color R,G,B]` – send an `LCDControlSetting` payload.
|
|
127
|
+
- `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.
|
|
131
128
|
- `uws fan list` – fetch a snapshot of bound wireless devices via the RF receiver.
|
|
132
129
|
- `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.
|
|
133
|
-
- `uws fan
|
|
130
|
+
- `uws fan set-led --mac <aa:bb:..> --mode static|rainbow|frames|effect|random-effect` – apply wireless LED effects (**experimental**).
|
|
131
|
+
|
|
132
|
+
### `uws fan set-led` modes
|
|
133
|
+
|
|
134
|
+
- `static`: requires `--color R,G,B` or `--color-list R,G,B;...` to paint the LED strip once.
|
|
135
|
+
- `rainbow`: procedural rainbow; optional `--frames N` (default 24) and `--interval-ms` (default 50).
|
|
136
|
+
- `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).
|
|
137
|
+
- `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`).
|
|
138
|
+
- `random-effect`: picks a random preset each time; accepts the same brightness/direction/scope flags as `effect`.
|
|
139
|
+
|
|
140
|
+
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`.
|
|
141
|
+
|
|
142
|
+
Example:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode effect --effect twinkle --effect-brightness 180 --effect-direction 0 --effect-scope both
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Random example:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode random-effect --effect-brightness 200 --effect-direction 1
|
|
152
|
+
```
|
|
153
|
+
- `uws fan pwm-sync --all|--mac [--once]` – mirror motherboard PWM output to bound hubs (looping by default, single iteration with `--once`).
|
|
134
154
|
|
|
135
155
|
## Dependencies
|
|
136
156
|
|
|
@@ -155,6 +175,11 @@ SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="8041", M
|
|
|
155
175
|
SUBSYSTEM=="usb", ATTR{idVendor}=="0416", ATTR{idProduct}=="8040", MODE="0666", GROUP="plugdev"
|
|
156
176
|
SUBSYSTEM=="usb_device", ATTR{idVendor}=="0416", ATTR{idProduct}=="8040", MODE="0666", GROUP="plugdev"
|
|
157
177
|
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="8040", MODE="0666", GROUP="plugdev"
|
|
178
|
+
|
|
179
|
+
# Luminary Micro TL-LCD Wireless-1.3
|
|
180
|
+
SUBSYSTEM=="usb", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="0006", MODE="0666", GROUP="plugdev"
|
|
181
|
+
SUBSYSTEM=="usb_device", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="0006", MODE="0666", GROUP="plugdev"
|
|
182
|
+
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="0006", MODE="0666", GROUP="plugdev"
|
|
158
183
|
```
|
|
159
184
|
|
|
160
185
|
Reload the rules and replug the dongles:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Uni Wireless Sync CLI
|
|
2
2
|
|
|
3
3
|
Warning: This is an unofficial implementation; use at your own risk.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
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.
|
|
7
|
+
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.
|
|
8
8
|
|
|
9
9
|
## Supported Hardware
|
|
10
10
|
|
|
@@ -23,10 +23,7 @@ Other Uni Fan series are currently not supported.
|
|
|
23
23
|
- Send one-shot PWM commands to TL wireless fans over the 2.4 GHz dongle.
|
|
24
24
|
- Bind or unbind wireless hubs against the active master controller.
|
|
25
25
|
- Toggle motherboard PWM sync mode for one hub or every bound hub.
|
|
26
|
-
|
|
27
|
-
## Roadmap
|
|
28
|
-
|
|
29
|
-
- Broadcast static RGB payloads to wireless hubs (CLI command not yet implemented).
|
|
26
|
+
- Broadcast static RGB payloads to wireless hubs (experimental).
|
|
30
27
|
|
|
31
28
|
## Installation
|
|
32
29
|
|
|
@@ -58,8 +55,8 @@ uws lcd keep-alive --serial <usb-serial> --interval 5
|
|
|
58
55
|
uws fan set-fan --mac aa:bb:cc:dd:ee:ff --pwm 120
|
|
59
56
|
uws fan bind --mac aa:bb:cc:dd:ee:ff
|
|
60
57
|
uws fan unbind --mac aa:bb:cc:dd:ee:ff
|
|
61
|
-
uws fan pwm-sync --all
|
|
62
|
-
uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --
|
|
58
|
+
uws fan pwm-sync --all
|
|
59
|
+
uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --once
|
|
63
60
|
```
|
|
64
61
|
|
|
65
62
|
`uws lcd list` prints JSON rows that include a `serial` field—copy that value when invoking other LCD subcommands.
|
|
@@ -70,10 +67,33 @@ uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --disable --fallback-pwm 120
|
|
|
70
67
|
- `uws lcd info --serial <usb-serial>` – read firmware and handshake data.
|
|
71
68
|
- `uws lcd send-jpg --serial <usb-serial> --file <image.jpg>` – stream a JPEG asset.
|
|
72
69
|
- `uws lcd keep-alive --serial <usb-serial> [--interval seconds]` – emit periodic handshakes to prevent the wireless panel from dimming.
|
|
73
|
-
- `uws lcd control --serial <usb-serial> [--mode show-jpg|show-app-sync|lcd-test] [--index N] [--brightness 0-100] [--fps N] [--rotation 0|90|180|270] [--test-color R,G,B]` – send an `LCDControlSetting` payload.
|
|
70
|
+
- `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.
|
|
74
71
|
- `uws fan list` – fetch a snapshot of bound wireless devices via the RF receiver.
|
|
75
72
|
- `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.
|
|
76
|
-
- `uws fan
|
|
73
|
+
- `uws fan set-led --mac <aa:bb:..> --mode static|rainbow|frames|effect|random-effect` – apply wireless LED effects (**experimental**).
|
|
74
|
+
|
|
75
|
+
### `uws fan set-led` modes
|
|
76
|
+
|
|
77
|
+
- `static`: requires `--color R,G,B` or `--color-list R,G,B;...` to paint the LED strip once.
|
|
78
|
+
- `rainbow`: procedural rainbow; optional `--frames N` (default 24) and `--interval-ms` (default 50).
|
|
79
|
+
- `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).
|
|
80
|
+
- `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`).
|
|
81
|
+
- `random-effect`: picks a random preset each time; accepts the same brightness/direction/scope flags as `effect`.
|
|
82
|
+
|
|
83
|
+
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`.
|
|
84
|
+
|
|
85
|
+
Example:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode effect --effect twinkle --effect-brightness 180 --effect-direction 0 --effect-scope both
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Random example:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
uws fan set-led --mac aa:bb:cc:dd:ee:ff --mode random-effect --effect-brightness 200 --effect-direction 1
|
|
95
|
+
```
|
|
96
|
+
- `uws fan pwm-sync --all|--mac [--once]` – mirror motherboard PWM output to bound hubs (looping by default, single iteration with `--once`).
|
|
77
97
|
|
|
78
98
|
## Dependencies
|
|
79
99
|
|
|
@@ -98,6 +118,11 @@ SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="8041", M
|
|
|
98
118
|
SUBSYSTEM=="usb", ATTR{idVendor}=="0416", ATTR{idProduct}=="8040", MODE="0666", GROUP="plugdev"
|
|
99
119
|
SUBSYSTEM=="usb_device", ATTR{idVendor}=="0416", ATTR{idProduct}=="8040", MODE="0666", GROUP="plugdev"
|
|
100
120
|
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="8040", MODE="0666", GROUP="plugdev"
|
|
121
|
+
|
|
122
|
+
# Luminary Micro TL-LCD Wireless-1.3
|
|
123
|
+
SUBSYSTEM=="usb", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="0006", MODE="0666", GROUP="plugdev"
|
|
124
|
+
SUBSYSTEM=="usb_device", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="0006", MODE="0666", GROUP="plugdev"
|
|
125
|
+
SUBSYSTEM=="usb_interface", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="0006", MODE="0666", GROUP="plugdev"
|
|
101
126
|
```
|
|
102
127
|
|
|
103
128
|
Reload the rules and replug the dongles:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "uwscli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "Uni-Wireless-Sync: wireless control toolkit for TL LCD fan hubs"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -48,10 +48,21 @@ uws = "uwscli.cli:main"
|
|
|
48
48
|
where = ["src"]
|
|
49
49
|
include = ["uwscli", "uwscli.*"]
|
|
50
50
|
|
|
51
|
+
[tool.setuptools.package-data]
|
|
52
|
+
"uwscli" = ["data/twinkle.bin"]
|
|
53
|
+
|
|
51
54
|
[tool.pytest.ini_options]
|
|
52
55
|
pythonpath = ["src"]
|
|
53
56
|
addopts = "-ra"
|
|
54
57
|
|
|
58
|
+
[tool.mypy]
|
|
59
|
+
python_version = "3.10"
|
|
60
|
+
ignore_missing_imports = true
|
|
61
|
+
strict_optional = true
|
|
62
|
+
warn_redundant_casts = true
|
|
63
|
+
warn_unused_ignores = true
|
|
64
|
+
show_error_codes = true
|
|
65
|
+
|
|
55
66
|
[build-system]
|
|
56
67
|
requires = ["setuptools>=68", "wheel"]
|
|
57
68
|
build-backend = "setuptools.build_meta"
|