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