add LED blink and Morse code scripts
This commit is contained in:
32
README.md
32
README.md
@@ -35,7 +35,33 @@ wrapping the private UniFi Protect API.
|
||||
## Scripts
|
||||
|
||||
```sh
|
||||
uv run play_speaker.py # play hello.wav through the camera speaker
|
||||
uv run record_mic.py # record from the camera mic (Ctrl+C to stop)
|
||||
uv run dump_camera.py # dump camera data from integration + private API
|
||||
uv run dump_camera.py # dump camera data from integration + private API
|
||||
uv run play_speaker.py # play hello.wav through the camera speaker
|
||||
uv run record_mic.py # record from the camera mic (Ctrl+C to stop)
|
||||
uv run blink_led.py # blink the status LED
|
||||
uv run morse.py "HELLO WORLD" # transmit Morse code on speaker + LED in sync
|
||||
```
|
||||
|
||||
### `blink_led.py`
|
||||
|
||||
Toggles the status LED on and off, then restores its original state on exit.
|
||||
|
||||
```sh
|
||||
uv run blink_led.py # 10 blinks at 0.5s interval (default)
|
||||
uv run blink_led.py --count 20 --interval 0.3
|
||||
```
|
||||
|
||||
### `morse.py`
|
||||
|
||||
Encodes a message as Morse code, plays a 700 Hz tone through the talkback speaker,
|
||||
and blinks the status LED in sync.
|
||||
|
||||
```sh
|
||||
uv run morse.py "SOS" # default: SOS at 0.2s unit
|
||||
uv run morse.py "BACK HOME" --unit 0.25 # slower speed
|
||||
uv run morse.py "SOS" --volume 80 # set speaker volume first (0-100)
|
||||
uv run morse.py "SOS" --lead-in 0.8 # longer silence before morse starts
|
||||
```
|
||||
|
||||
Standard Morse timing: dot = 1 unit, dash = 3 units, symbol gap = 1 unit,
|
||||
letter gap = 3 units, word gap = 7 units.
|
||||
|
||||
Reference in New Issue
Block a user