OpenShock-AutoFlasher 0.2.4__tar.gz → 0.4.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 (42) hide show
  1. openshock_autoflasher-0.4.0/OpenShock_AutoFlasher.egg-info/PKG-INFO +175 -0
  2. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/OpenShock_AutoFlasher.egg-info/SOURCES.txt +9 -1
  3. openshock_autoflasher-0.4.0/OpenShock_AutoFlasher.egg-info/requires.txt +22 -0
  4. openshock_autoflasher-0.4.0/PKG-INFO +175 -0
  5. openshock_autoflasher-0.4.0/README.md +118 -0
  6. openshock_autoflasher-0.4.0/openshock_autoflasher/cli.py +318 -0
  7. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/openshock_autoflasher/flasher.py +351 -33
  8. openshock_autoflasher-0.4.0/openshock_autoflasher/hardware_tests.py +448 -0
  9. openshock_autoflasher-0.4.0/openshock_autoflasher/report.py +342 -0
  10. openshock_autoflasher-0.4.0/openshock_autoflasher/wifi.py +152 -0
  11. openshock_autoflasher-0.4.0/openshock_autoflasher/wifi_native.py +163 -0
  12. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/pyproject.toml +18 -16
  13. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/requirements-dev.txt +5 -5
  14. openshock_autoflasher-0.4.0/requirements.txt +7 -0
  15. openshock_autoflasher-0.4.0/tests/test_cli.py +422 -0
  16. openshock_autoflasher-0.4.0/tests/test_flasher.py +791 -0
  17. openshock_autoflasher-0.4.0/tests/test_hardware_tests.py +660 -0
  18. openshock_autoflasher-0.4.0/tests/test_report.py +262 -0
  19. openshock_autoflasher-0.4.0/tests/test_wifi.py +157 -0
  20. openshock_autoflasher-0.4.0/tests/test_wifi_native.py +130 -0
  21. openshock_autoflasher-0.2.4/OpenShock_AutoFlasher.egg-info/PKG-INFO +0 -353
  22. openshock_autoflasher-0.2.4/OpenShock_AutoFlasher.egg-info/requires.txt +0 -12
  23. openshock_autoflasher-0.2.4/PKG-INFO +0 -353
  24. openshock_autoflasher-0.2.4/README.md +0 -302
  25. openshock_autoflasher-0.2.4/openshock_autoflasher/cli.py +0 -162
  26. openshock_autoflasher-0.2.4/requirements.txt +0 -4
  27. openshock_autoflasher-0.2.4/tests/test_cli.py +0 -217
  28. openshock_autoflasher-0.2.4/tests/test_flasher.py +0 -413
  29. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/LICENSE +0 -0
  30. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/MANIFEST.in +0 -0
  31. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/OpenShock_AutoFlasher.egg-info/dependency_links.txt +0 -0
  32. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/OpenShock_AutoFlasher.egg-info/entry_points.txt +0 -0
  33. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/OpenShock_AutoFlasher.egg-info/top_level.txt +0 -0
  34. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/openshock_autoflasher/__init__.py +0 -0
  35. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/openshock_autoflasher/__main__.py +0 -0
  36. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/openshock_autoflasher/constants.py +0 -0
  37. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/openshock_autoflasher/py.typed +0 -0
  38. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/openshock_autoflasher/styles.py +0 -0
  39. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/setup.cfg +0 -0
  40. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/tests/__init__.py +0 -0
  41. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/tests/test_constants.py +0 -0
  42. {openshock_autoflasher-0.2.4 → openshock_autoflasher-0.4.0}/tests/test_styles.py +0 -0
@@ -0,0 +1,175 @@
1
+ Metadata-Version: 2.4
2
+ Name: OpenShock-AutoFlasher
3
+ Version: 0.4.0
4
+ Summary: Automatically flash OpenShock firmware to ESP32 devices
5
+ Author: NanashiTheNameless
6
+ Author-email: NanashiTheNameless <NanashiTheNameless@NamelessNanashi.dev>
7
+ Maintainer: NanashiTheNameless
8
+ Maintainer-email: NanashiTheNameless <NanashiTheNameless@NamelessNanashi.dev>
9
+ License: AGPL-3.0
10
+ Project-URL: Repository, https://github.com/NanashiTheNameless/OpenShock-AutoFlasher
11
+ Project-URL: Homepage, https://github.com/NanashiTheNameless/OpenShock-AutoFlasher
12
+ Project-URL: Issues, https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/issues
13
+ Project-URL: GitHub Sponsor, https://github.com/sponsors/NanashiTheNameless
14
+ Project-URL: Buy Me a Coffee, https://buymeacoffee.com/NamelessNanashi
15
+ Project-URL: Author, https://github.com/NanashiTheNameless
16
+ Project-URL: Liberapay, https://liberapay.com/NamelessNanashi
17
+ Keywords: openshock,esp32,firmware,flasher
18
+ Classifier: Development Status :: 4 - Beta
19
+ Classifier: Environment :: Console
20
+ Classifier: Topic :: System :: Hardware :: Universal Serial Bus (USB)
21
+ Classifier: Intended Audience :: Developers
22
+ Classifier: Intended Audience :: End Users/Desktop
23
+ Classifier: Intended Audience :: System Administrators
24
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
25
+ Classifier: Natural Language :: English
26
+ Classifier: Operating System :: MacOS
27
+ Classifier: Operating System :: Microsoft :: Windows
28
+ Classifier: Operating System :: POSIX :: Linux
29
+ Classifier: Programming Language :: Python :: 3 :: Only
30
+ Classifier: Programming Language :: Python :: 3.12
31
+ Classifier: Programming Language :: Python :: 3.13
32
+ Classifier: Programming Language :: Python :: 3.14
33
+ Classifier: Programming Language :: Python :: Implementation :: CPython
34
+ Classifier: Topic :: Software Development :: Embedded Systems
35
+ Classifier: Topic :: System :: Hardware
36
+ Classifier: Topic :: Utilities
37
+ Classifier: Typing :: Typed
38
+ Requires-Python: >=3.12
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE
41
+ Requires-Dist: esptool>=5.4.0
42
+ Requires-Dist: pyserial>=3.5
43
+ Requires-Dist: requests>=2.34.2
44
+ Requires-Dist: rich>=15.0.0
45
+ Requires-Dist: pywifi>=1.1.12; sys_platform == "linux" or sys_platform == "win32"
46
+ Requires-Dist: comtypes>=1.4.16; sys_platform == "win32"
47
+ Requires-Dist: pyobjc-framework-CoreWLAN>=12.2.2; sys_platform == "darwin"
48
+ Provides-Extra: dev
49
+ Requires-Dist: pytest>=9.1.1; extra == "dev"
50
+ Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
51
+ Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
52
+ Requires-Dist: black>=26.5.1; extra == "dev"
53
+ Requires-Dist: flake8>=7.3.0; extra == "dev"
54
+ Requires-Dist: mypy>=2.3.1; extra == "dev"
55
+ Requires-Dist: types-requests>=2.33.0.20260906; extra == "dev"
56
+ Dynamic: license-file
57
+
58
+ # OpenShock Auto-Flasher [![Ask DeepWiki](<https://deepwiki.com/badge.svg>)](<https://deepwiki.com/NanashiTheNameless/OpenShock-AutoFlasher>)
59
+
60
+ [![PyPI - Version](https://img.shields.io/pypi/v/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
61
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
62
+ [![PyPI - Implementation](https://img.shields.io/pypi/implementation/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
63
+ [![PyPI - Types](https://img.shields.io/pypi/types/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
64
+
65
+ [![Tests](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/workflows/Tests/badge.svg)](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/actions/workflows/test.yml)
66
+ [![GitHub License](https://img.shields.io/github/license/NanashiTheNameless/OpenShock-AutoFlasher)](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/LICENSE)
67
+
68
+ Automatically flash OpenShock hubs as they are plugged in, verify firmware checksums,
69
+ and optionally test their WiFi AP and RF transmitter. Terminal colors show progress
70
+ and pass/fail results.
71
+
72
+ ## Install
73
+
74
+ Requires Python 3.12+, pipx, and a USB connection to your hub. Runs on Linux,
75
+ macOS, and Windows.
76
+
77
+ ```bash
78
+ pipx install --force 'git+https://github.com/NanashiTheNameless/OpenShock-AutoFlasher@main'
79
+ ```
80
+
81
+ For PyPI or source installation, see the
82
+ [advanced guide](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#alternative-installation).
83
+
84
+ ## Flash hubs
85
+
86
+ Start with hubs disconnected, run the command, then plug in a hub:
87
+
88
+ ```bash
89
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32
90
+ ```
91
+
92
+ The flasher processes each newly connected hub and waits for the next one.
93
+ Press Ctrl+C to stop. Replace the board name with yours; list available boards with:
94
+
95
+ ```bash
96
+ OPSH-AutoFlash --help
97
+ ```
98
+
99
+ Add `--erase` to clear flash first, `--alert` for a completion beep, or
100
+ `--channel beta` to use beta firmware.
101
+
102
+ ## Test WiFi and RF
103
+
104
+ - **WiFi:** the host computer scans for the hub's exact
105
+ `OpenShock-XX:XX:XX:XX:XX:XX` AP using its WiFi adapter. Scanning supports
106
+ Linux, Windows, and macOS. See [platform requirements](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#wifi-ap-testing)
107
+ for WiFi services and permissions.
108
+ - **RF:** prepare a separate USB tester with a 433 MHz receiver running
109
+ [CaiXianlinRemoteIDMonitor](https://github.com/NanashiTheNameless/CaiXianlinRemoteIDMonitor).
110
+ Follow the [tester setup guide](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#rf-tester-setup).
111
+
112
+ Start the command with hubs disconnected. **Plug the tester in first**, wait for
113
+ `RF tester detected ...; reserved for testing.`, then connect hubs one at a time.
114
+ Close other serial monitors before testing.
115
+
116
+ **Erase, flash, test, and factory-reset each hub:**
117
+
118
+ ```bash
119
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32 --erase --alert \
120
+ --test-wifi --test-rf --factory-reset-after-test
121
+ ```
122
+
123
+ Factory reset clears saved hub settings after testing, whether tests pass or fail.
124
+ Omit `--factory-reset-after-test` to keep the settings after testing.
125
+
126
+ **Test existing firmware without flashing:**
127
+
128
+ ```bash
129
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32 --test-only --test-wifi --test-rf
130
+ ```
131
+
132
+ No hub port is required: test-only mode detects newly connected hubs and continues
133
+ after each result. Enable either WiFi or RF alone by omitting the other test flag.
134
+ RF testing checks Beep, Vibrate, and Stop with different IDs; Light and Shock are
135
+ not transmitted. Results appear in the terminal.
136
+
137
+ To process one already-connected hub and exit, add `--port /dev/ttyUSB1` (or a
138
+ Windows port such as `COM3`). For an explicit tester port, use
139
+ `--test-rf-port /dev/ttyUSB0` instead of `--test-rf`; the hub and tester must use
140
+ separate ports.
141
+
142
+ ## Session report
143
+
144
+ One dark-mode HTML file records every hub attempt in the session, including MAC address,
145
+ USB serial number when available, flash status, and detailed test results.
146
+ The file is updated throughout the run, and its path is printed at startup.
147
+ Use `--report batch.html` to choose a filename, or `--no-report` to disable it.
148
+ See [report details](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#session-report).
149
+
150
+ ## More information
151
+
152
+ See [README-advanced.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md) for all flags, firmware versions,
153
+ custom pins, WiFi scanning, RF validation, Linux permissions, troubleshooting,
154
+ and development instructions.
155
+
156
+ For contributions, see [CONTRIBUTING.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/CONTRIBUTING.md). Report vulnerabilities
157
+ using [SECURITY.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/SECURITY.md).
158
+
159
+ ## License
160
+
161
+ Licensed under [GNU AGPL-3.0](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/LICENSE).
162
+
163
+ ## Disclaimer
164
+
165
+ This tool is provided as-is. Use at your own risk. Always ensure you have backups of any important configurations before flashing firmware.
166
+
167
+ ## Support My Work
168
+
169
+ If this project is useful to you, you can support it here:
170
+
171
+ - [<https://github.com/sponsors/NanashiTheNameless>](<https://github.com/sponsors/NanashiTheNameless>)
172
+ - [<https://buymeacoffee.com/NamelessNanashi>](<https://buymeacoffee.com/NamelessNanashi>)
173
+ - [<https://ko-fi.com/NanashiTheNameless>](<https://ko-fi.com/NanashiTheNameless>)
174
+ - [<https://liberapay.com/NamelessNanashi>](<https://liberapay.com/NamelessNanashi>)
175
+ - [<https://throne.com/NamelessNanashi>](<https://throne.com/NamelessNanashi>)
@@ -15,10 +15,18 @@ openshock_autoflasher/__main__.py
15
15
  openshock_autoflasher/cli.py
16
16
  openshock_autoflasher/constants.py
17
17
  openshock_autoflasher/flasher.py
18
+ openshock_autoflasher/hardware_tests.py
18
19
  openshock_autoflasher/py.typed
20
+ openshock_autoflasher/report.py
19
21
  openshock_autoflasher/styles.py
22
+ openshock_autoflasher/wifi.py
23
+ openshock_autoflasher/wifi_native.py
20
24
  tests/__init__.py
21
25
  tests/test_cli.py
22
26
  tests/test_constants.py
23
27
  tests/test_flasher.py
24
- tests/test_styles.py
28
+ tests/test_hardware_tests.py
29
+ tests/test_report.py
30
+ tests/test_styles.py
31
+ tests/test_wifi.py
32
+ tests/test_wifi_native.py
@@ -0,0 +1,22 @@
1
+ esptool>=5.4.0
2
+ pyserial>=3.5
3
+ requests>=2.34.2
4
+ rich>=15.0.0
5
+
6
+ [:sys_platform == "darwin"]
7
+ pyobjc-framework-CoreWLAN>=12.2.2
8
+
9
+ [:sys_platform == "linux" or sys_platform == "win32"]
10
+ pywifi>=1.1.12
11
+
12
+ [:sys_platform == "win32"]
13
+ comtypes>=1.4.16
14
+
15
+ [dev]
16
+ pytest>=9.1.1
17
+ pytest-cov>=7.1.0
18
+ pytest-mock>=3.15.1
19
+ black>=26.5.1
20
+ flake8>=7.3.0
21
+ mypy>=2.3.1
22
+ types-requests>=2.33.0.20260906
@@ -0,0 +1,175 @@
1
+ Metadata-Version: 2.4
2
+ Name: OpenShock-AutoFlasher
3
+ Version: 0.4.0
4
+ Summary: Automatically flash OpenShock firmware to ESP32 devices
5
+ Author: NanashiTheNameless
6
+ Author-email: NanashiTheNameless <NanashiTheNameless@NamelessNanashi.dev>
7
+ Maintainer: NanashiTheNameless
8
+ Maintainer-email: NanashiTheNameless <NanashiTheNameless@NamelessNanashi.dev>
9
+ License: AGPL-3.0
10
+ Project-URL: Repository, https://github.com/NanashiTheNameless/OpenShock-AutoFlasher
11
+ Project-URL: Homepage, https://github.com/NanashiTheNameless/OpenShock-AutoFlasher
12
+ Project-URL: Issues, https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/issues
13
+ Project-URL: GitHub Sponsor, https://github.com/sponsors/NanashiTheNameless
14
+ Project-URL: Buy Me a Coffee, https://buymeacoffee.com/NamelessNanashi
15
+ Project-URL: Author, https://github.com/NanashiTheNameless
16
+ Project-URL: Liberapay, https://liberapay.com/NamelessNanashi
17
+ Keywords: openshock,esp32,firmware,flasher
18
+ Classifier: Development Status :: 4 - Beta
19
+ Classifier: Environment :: Console
20
+ Classifier: Topic :: System :: Hardware :: Universal Serial Bus (USB)
21
+ Classifier: Intended Audience :: Developers
22
+ Classifier: Intended Audience :: End Users/Desktop
23
+ Classifier: Intended Audience :: System Administrators
24
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
25
+ Classifier: Natural Language :: English
26
+ Classifier: Operating System :: MacOS
27
+ Classifier: Operating System :: Microsoft :: Windows
28
+ Classifier: Operating System :: POSIX :: Linux
29
+ Classifier: Programming Language :: Python :: 3 :: Only
30
+ Classifier: Programming Language :: Python :: 3.12
31
+ Classifier: Programming Language :: Python :: 3.13
32
+ Classifier: Programming Language :: Python :: 3.14
33
+ Classifier: Programming Language :: Python :: Implementation :: CPython
34
+ Classifier: Topic :: Software Development :: Embedded Systems
35
+ Classifier: Topic :: System :: Hardware
36
+ Classifier: Topic :: Utilities
37
+ Classifier: Typing :: Typed
38
+ Requires-Python: >=3.12
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE
41
+ Requires-Dist: esptool>=5.4.0
42
+ Requires-Dist: pyserial>=3.5
43
+ Requires-Dist: requests>=2.34.2
44
+ Requires-Dist: rich>=15.0.0
45
+ Requires-Dist: pywifi>=1.1.12; sys_platform == "linux" or sys_platform == "win32"
46
+ Requires-Dist: comtypes>=1.4.16; sys_platform == "win32"
47
+ Requires-Dist: pyobjc-framework-CoreWLAN>=12.2.2; sys_platform == "darwin"
48
+ Provides-Extra: dev
49
+ Requires-Dist: pytest>=9.1.1; extra == "dev"
50
+ Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
51
+ Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
52
+ Requires-Dist: black>=26.5.1; extra == "dev"
53
+ Requires-Dist: flake8>=7.3.0; extra == "dev"
54
+ Requires-Dist: mypy>=2.3.1; extra == "dev"
55
+ Requires-Dist: types-requests>=2.33.0.20260906; extra == "dev"
56
+ Dynamic: license-file
57
+
58
+ # OpenShock Auto-Flasher [![Ask DeepWiki](<https://deepwiki.com/badge.svg>)](<https://deepwiki.com/NanashiTheNameless/OpenShock-AutoFlasher>)
59
+
60
+ [![PyPI - Version](https://img.shields.io/pypi/v/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
61
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
62
+ [![PyPI - Implementation](https://img.shields.io/pypi/implementation/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
63
+ [![PyPI - Types](https://img.shields.io/pypi/types/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
64
+
65
+ [![Tests](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/workflows/Tests/badge.svg)](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/actions/workflows/test.yml)
66
+ [![GitHub License](https://img.shields.io/github/license/NanashiTheNameless/OpenShock-AutoFlasher)](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/LICENSE)
67
+
68
+ Automatically flash OpenShock hubs as they are plugged in, verify firmware checksums,
69
+ and optionally test their WiFi AP and RF transmitter. Terminal colors show progress
70
+ and pass/fail results.
71
+
72
+ ## Install
73
+
74
+ Requires Python 3.12+, pipx, and a USB connection to your hub. Runs on Linux,
75
+ macOS, and Windows.
76
+
77
+ ```bash
78
+ pipx install --force 'git+https://github.com/NanashiTheNameless/OpenShock-AutoFlasher@main'
79
+ ```
80
+
81
+ For PyPI or source installation, see the
82
+ [advanced guide](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#alternative-installation).
83
+
84
+ ## Flash hubs
85
+
86
+ Start with hubs disconnected, run the command, then plug in a hub:
87
+
88
+ ```bash
89
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32
90
+ ```
91
+
92
+ The flasher processes each newly connected hub and waits for the next one.
93
+ Press Ctrl+C to stop. Replace the board name with yours; list available boards with:
94
+
95
+ ```bash
96
+ OPSH-AutoFlash --help
97
+ ```
98
+
99
+ Add `--erase` to clear flash first, `--alert` for a completion beep, or
100
+ `--channel beta` to use beta firmware.
101
+
102
+ ## Test WiFi and RF
103
+
104
+ - **WiFi:** the host computer scans for the hub's exact
105
+ `OpenShock-XX:XX:XX:XX:XX:XX` AP using its WiFi adapter. Scanning supports
106
+ Linux, Windows, and macOS. See [platform requirements](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#wifi-ap-testing)
107
+ for WiFi services and permissions.
108
+ - **RF:** prepare a separate USB tester with a 433 MHz receiver running
109
+ [CaiXianlinRemoteIDMonitor](https://github.com/NanashiTheNameless/CaiXianlinRemoteIDMonitor).
110
+ Follow the [tester setup guide](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#rf-tester-setup).
111
+
112
+ Start the command with hubs disconnected. **Plug the tester in first**, wait for
113
+ `RF tester detected ...; reserved for testing.`, then connect hubs one at a time.
114
+ Close other serial monitors before testing.
115
+
116
+ **Erase, flash, test, and factory-reset each hub:**
117
+
118
+ ```bash
119
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32 --erase --alert \
120
+ --test-wifi --test-rf --factory-reset-after-test
121
+ ```
122
+
123
+ Factory reset clears saved hub settings after testing, whether tests pass or fail.
124
+ Omit `--factory-reset-after-test` to keep the settings after testing.
125
+
126
+ **Test existing firmware without flashing:**
127
+
128
+ ```bash
129
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32 --test-only --test-wifi --test-rf
130
+ ```
131
+
132
+ No hub port is required: test-only mode detects newly connected hubs and continues
133
+ after each result. Enable either WiFi or RF alone by omitting the other test flag.
134
+ RF testing checks Beep, Vibrate, and Stop with different IDs; Light and Shock are
135
+ not transmitted. Results appear in the terminal.
136
+
137
+ To process one already-connected hub and exit, add `--port /dev/ttyUSB1` (or a
138
+ Windows port such as `COM3`). For an explicit tester port, use
139
+ `--test-rf-port /dev/ttyUSB0` instead of `--test-rf`; the hub and tester must use
140
+ separate ports.
141
+
142
+ ## Session report
143
+
144
+ One dark-mode HTML file records every hub attempt in the session, including MAC address,
145
+ USB serial number when available, flash status, and detailed test results.
146
+ The file is updated throughout the run, and its path is printed at startup.
147
+ Use `--report batch.html` to choose a filename, or `--no-report` to disable it.
148
+ See [report details](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#session-report).
149
+
150
+ ## More information
151
+
152
+ See [README-advanced.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md) for all flags, firmware versions,
153
+ custom pins, WiFi scanning, RF validation, Linux permissions, troubleshooting,
154
+ and development instructions.
155
+
156
+ For contributions, see [CONTRIBUTING.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/CONTRIBUTING.md). Report vulnerabilities
157
+ using [SECURITY.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/SECURITY.md).
158
+
159
+ ## License
160
+
161
+ Licensed under [GNU AGPL-3.0](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/LICENSE).
162
+
163
+ ## Disclaimer
164
+
165
+ This tool is provided as-is. Use at your own risk. Always ensure you have backups of any important configurations before flashing firmware.
166
+
167
+ ## Support My Work
168
+
169
+ If this project is useful to you, you can support it here:
170
+
171
+ - [<https://github.com/sponsors/NanashiTheNameless>](<https://github.com/sponsors/NanashiTheNameless>)
172
+ - [<https://buymeacoffee.com/NamelessNanashi>](<https://buymeacoffee.com/NamelessNanashi>)
173
+ - [<https://ko-fi.com/NanashiTheNameless>](<https://ko-fi.com/NanashiTheNameless>)
174
+ - [<https://liberapay.com/NamelessNanashi>](<https://liberapay.com/NamelessNanashi>)
175
+ - [<https://throne.com/NamelessNanashi>](<https://throne.com/NamelessNanashi>)
@@ -0,0 +1,118 @@
1
+ # OpenShock Auto-Flasher [![Ask DeepWiki](<https://deepwiki.com/badge.svg>)](<https://deepwiki.com/NanashiTheNameless/OpenShock-AutoFlasher>)
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
5
+ [![PyPI - Implementation](https://img.shields.io/pypi/implementation/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
6
+ [![PyPI - Types](https://img.shields.io/pypi/types/OpenShock-AutoFlasher)](https://pypi.org/project/OpenShock-AutoFlasher/)
7
+
8
+ [![Tests](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/workflows/Tests/badge.svg)](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/actions/workflows/test.yml)
9
+ [![GitHub License](https://img.shields.io/github/license/NanashiTheNameless/OpenShock-AutoFlasher)](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/LICENSE)
10
+
11
+ Automatically flash OpenShock hubs as they are plugged in, verify firmware checksums,
12
+ and optionally test their WiFi AP and RF transmitter. Terminal colors show progress
13
+ and pass/fail results.
14
+
15
+ ## Install
16
+
17
+ Requires Python 3.12+, pipx, and a USB connection to your hub. Runs on Linux,
18
+ macOS, and Windows.
19
+
20
+ ```bash
21
+ pipx install --force 'git+https://github.com/NanashiTheNameless/OpenShock-AutoFlasher@main'
22
+ ```
23
+
24
+ For PyPI or source installation, see the
25
+ [advanced guide](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#alternative-installation).
26
+
27
+ ## Flash hubs
28
+
29
+ Start with hubs disconnected, run the command, then plug in a hub:
30
+
31
+ ```bash
32
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32
33
+ ```
34
+
35
+ The flasher processes each newly connected hub and waits for the next one.
36
+ Press Ctrl+C to stop. Replace the board name with yours; list available boards with:
37
+
38
+ ```bash
39
+ OPSH-AutoFlash --help
40
+ ```
41
+
42
+ Add `--erase` to clear flash first, `--alert` for a completion beep, or
43
+ `--channel beta` to use beta firmware.
44
+
45
+ ## Test WiFi and RF
46
+
47
+ - **WiFi:** the host computer scans for the hub's exact
48
+ `OpenShock-XX:XX:XX:XX:XX:XX` AP using its WiFi adapter. Scanning supports
49
+ Linux, Windows, and macOS. See [platform requirements](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#wifi-ap-testing)
50
+ for WiFi services and permissions.
51
+ - **RF:** prepare a separate USB tester with a 433 MHz receiver running
52
+ [CaiXianlinRemoteIDMonitor](https://github.com/NanashiTheNameless/CaiXianlinRemoteIDMonitor).
53
+ Follow the [tester setup guide](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#rf-tester-setup).
54
+
55
+ Start the command with hubs disconnected. **Plug the tester in first**, wait for
56
+ `RF tester detected ...; reserved for testing.`, then connect hubs one at a time.
57
+ Close other serial monitors before testing.
58
+
59
+ **Erase, flash, test, and factory-reset each hub:**
60
+
61
+ ```bash
62
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32 --erase --alert \
63
+ --test-wifi --test-rf --factory-reset-after-test
64
+ ```
65
+
66
+ Factory reset clears saved hub settings after testing, whether tests pass or fail.
67
+ Omit `--factory-reset-after-test` to keep the settings after testing.
68
+
69
+ **Test existing firmware without flashing:**
70
+
71
+ ```bash
72
+ OPSH-AutoFlash --board Wemos-D1-Mini-ESP32 --test-only --test-wifi --test-rf
73
+ ```
74
+
75
+ No hub port is required: test-only mode detects newly connected hubs and continues
76
+ after each result. Enable either WiFi or RF alone by omitting the other test flag.
77
+ RF testing checks Beep, Vibrate, and Stop with different IDs; Light and Shock are
78
+ not transmitted. Results appear in the terminal.
79
+
80
+ To process one already-connected hub and exit, add `--port /dev/ttyUSB1` (or a
81
+ Windows port such as `COM3`). For an explicit tester port, use
82
+ `--test-rf-port /dev/ttyUSB0` instead of `--test-rf`; the hub and tester must use
83
+ separate ports.
84
+
85
+ ## Session report
86
+
87
+ One dark-mode HTML file records every hub attempt in the session, including MAC address,
88
+ USB serial number when available, flash status, and detailed test results.
89
+ The file is updated throughout the run, and its path is printed at startup.
90
+ Use `--report batch.html` to choose a filename, or `--no-report` to disable it.
91
+ See [report details](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md#session-report).
92
+
93
+ ## More information
94
+
95
+ See [README-advanced.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/README-advanced.md) for all flags, firmware versions,
96
+ custom pins, WiFi scanning, RF validation, Linux permissions, troubleshooting,
97
+ and development instructions.
98
+
99
+ For contributions, see [CONTRIBUTING.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/CONTRIBUTING.md). Report vulnerabilities
100
+ using [SECURITY.md](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/SECURITY.md).
101
+
102
+ ## License
103
+
104
+ Licensed under [GNU AGPL-3.0](https://github.com/NanashiTheNameless/OpenShock-AutoFlasher/blob/main/LICENSE).
105
+
106
+ ## Disclaimer
107
+
108
+ This tool is provided as-is. Use at your own risk. Always ensure you have backups of any important configurations before flashing firmware.
109
+
110
+ ## Support My Work
111
+
112
+ If this project is useful to you, you can support it here:
113
+
114
+ - [<https://github.com/sponsors/NanashiTheNameless>](<https://github.com/sponsors/NanashiTheNameless>)
115
+ - [<https://buymeacoffee.com/NamelessNanashi>](<https://buymeacoffee.com/NamelessNanashi>)
116
+ - [<https://ko-fi.com/NanashiTheNameless>](<https://ko-fi.com/NanashiTheNameless>)
117
+ - [<https://liberapay.com/NamelessNanashi>](<https://liberapay.com/NamelessNanashi>)
118
+ - [<https://throne.com/NamelessNanashi>](<https://throne.com/NamelessNanashi>)