Skip to content

Commit 77cd7d2

Browse files
committed
Add room-join monitor alerts with tests and e2e coverage
1 parent 76e060e commit 77cd7d2

4 files changed

Lines changed: 764 additions & 49 deletions

File tree

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,46 @@ Note: NDI support for publishing is yet to be added. H264/OPUS is tested mainly.
735735

736736
**Important:** The `--record-room` and `--room-ndi` features require a VDO.Ninja-compatible server that tracks room membership. These features will not work with custom websocket relay servers (when using `--puuid`).
737737

738+
#### Room Join Alerts (Webhook / Notify Topic / GPIO)
739+
740+
If you need an alert when someone joins a room, you can run Raspberry Ninja in room monitor mode:
741+
742+
```bash
743+
python3 publish.py --room myroom123 --room-monitor --join-webhook https://your.endpoint/hook
744+
```
745+
746+
Additional alert outputs:
747+
748+
- VDO.Ninja notify topic (compatible with `notify.vdo.ninja`):
749+
```bash
750+
python3 publish.py --room myroom123 --room-monitor --join-notify-topic my_topic_name
751+
```
752+
- VDO-style post API payload (`{update:{streamID,action,value}}`):
753+
```bash
754+
python3 publish.py --room myroom123 --room-monitor --join-postapi https://your.endpoint/postapi
755+
```
756+
- Raspberry Pi GPIO pulse on room join (BOARD pin numbering):
757+
```bash
758+
python3 publish.py --room myroom123 --room-monitor --join-gpio-pin 12 --join-gpio-pulse 0.4
759+
```
760+
761+
Notes:
762+
- You can combine multiple outputs in one command.
763+
- The same join alert outputs also work when using `--record-room` or `--room-ndi`.
764+
- GPIO uses BOARD pin numbering and supports `--join-gpio-active-low`.
765+
766+
Quick validation:
767+
- Unit tests:
768+
```bash
769+
python3 -m unittest discover -s tests -v
770+
```
771+
- Live E2E room-join webhook test (uses Playwright + Chromium):
772+
```bash
773+
npm install playwright --no-save
774+
npx playwright install chromium
775+
node tests/e2e/room_join_notification_e2e.js
776+
```
777+
738778
### OpenCV / Tensorflow / FFMPEG / FDSink / Framebuffer support
739779

740780
There's support for OpenCV/Framebuffer (--framebuffer STREAMIDHERE) and FDSink now. There's a Youtube video link below demoing how to use Raspberry.Ninja to bring raw BGR video frames into Numpy.

0 commit comments

Comments
 (0)