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.
Files changed (35) hide show
  1. {uwscli-0.1.0/src/uwscli.egg-info → uwscli-0.3.0}/PKG-INFO +36 -11
  2. {uwscli-0.1.0 → uwscli-0.3.0}/README.md +35 -10
  3. {uwscli-0.1.0 → uwscli-0.3.0}/pyproject.toml +12 -1
  4. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/__init__.py +4 -1
  5. uwscli-0.3.0/src/uwscli/cli.py +801 -0
  6. uwscli-0.3.0/src/uwscli/data/__init__.py +0 -0
  7. uwscli-0.3.0/src/uwscli/data/twinkle.bin +0 -0
  8. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/lcd.py +57 -21
  9. uwscli-0.3.0/src/uwscli/led.py +7 -0
  10. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/structs.py +2 -2
  11. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/system_usb.py +18 -8
  12. uwscli-0.3.0/src/uwscli/tinyuz.py +192 -0
  13. uwscli-0.3.0/src/uwscli/tl_effects.py +1355 -0
  14. uwscli-0.3.0/src/uwscli/tlcontroller.py +129 -0
  15. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/usbutil.py +17 -5
  16. uwscli-0.3.0/src/uwscli/wireless.py +916 -0
  17. {uwscli-0.1.0 → uwscli-0.3.0/src/uwscli.egg-info}/PKG-INFO +36 -11
  18. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/SOURCES.txt +9 -1
  19. {uwscli-0.1.0 → uwscli-0.3.0}/tests/test_cli_errors.py +22 -13
  20. uwscli-0.3.0/tests/test_cli_output.py +749 -0
  21. uwscli-0.3.0/tests/test_led_compression.py +97 -0
  22. uwscli-0.3.0/tests/test_wireless_integration.py +321 -0
  23. uwscli-0.3.0/tests/test_wireless_led_packets.py +85 -0
  24. uwscli-0.1.0/src/uwscli/cli.py +0 -416
  25. uwscli-0.1.0/src/uwscli/wireless.py +0 -362
  26. uwscli-0.1.0/tests/test_cli_output.py +0 -186
  27. uwscli-0.1.0/tests/test_wireless_integration.py +0 -92
  28. {uwscli-0.1.0 → uwscli-0.3.0}/LICENSE +0 -0
  29. {uwscli-0.1.0 → uwscli-0.3.0}/setup.cfg +0 -0
  30. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli/logging_utils.py +0 -0
  31. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/dependency_links.txt +0 -0
  32. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/entry_points.txt +0 -0
  33. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/requires.txt +0 -0
  34. {uwscli-0.1.0 → uwscli-0.3.0}/src/uwscli.egg-info/top_level.txt +0 -0
  35. {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.1.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
- # UWS CLI
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 --enable
119
- uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --disable --fallback-pwm 120
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 pwm-sync --all|--mac` – enable or disable motherboard PWM sync for bound hubs.
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
- # UWS CLI
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 --enable
62
- uws fan pwm-sync --mac aa:bb:cc:dd:ee:ff --disable --fallback-pwm 120
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 pwm-sync --all|--mac` – enable or disable motherboard PWM sync for bound hubs.
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.1.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"
@@ -1,11 +1,14 @@
1
1
  """UWS CLI package."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.3.0"
4
4
 
5
5
  __all__ = [
6
6
  "cli",
7
7
  "lcd",
8
+ "led",
9
+ "tinyuz",
8
10
  "wireless",
9
11
  "structs",
10
12
  "usbutil",
13
+ "tl_effects",
11
14
  ]