Overview
Every robot, looked after
The whole fleet
Every robot RIFT knows, checked every few seconds: answering or not, and how fast. Two misses in a row and she says it's offline; she says when it's back, too.
Causes, not just symptoms
Each problem comes with a likely reason: “NORA isn't answering — this PC is on another network”, or “NORA rebooted — check what was just switched on”.
Out loud
The important things are spoken with Windows text-to-speech and written to RIFT's mission log, so nothing slips by while you're working on a robot.
A closer look at the hub
NORA runs the network, so NINA watches her uptime for reboots, her drive mode and who changed it, and how long her web page takes to send.
Hands off the boards
Serial ports are listed, never opened: opening a port resets an Arduino and fights the program that owns it. She guesses which board each one is.
One of the robots
She registers with RIFT like everyone else, so she's on the dashboard and in MILA's list, and she joins the Brainfuck conversations in her own pitch.
How are you?
She asks every robot how it is — moving or still, turning, wheels locked, music, mode — and watches its distance sensors. One stuck on a value gets a checkup: are you standing still? Moving: she tells you. Still: she moves it a little and measures, like a doctor.
Keeps TINA posted
Everything she notices goes to TINA as it happens, with a snapshot of the fleet every 30 s, so TINA starts every job knowing who’s up and how they are.
Says when she's lost
If registering with RIFT stops working she says so — a 404 means something else is on RIFT’s port.
Checks
What she looks at, and why
| What | How | What it catches |
|---|---|---|
| Fleet | RIFT /fleet, then each robot's /ping | Offline, back online, slow to answer (over 2 s) |
| NORA uptime | :5002/talk → now | Reboots: uptime falling back to zero, e.g. a power dip from the UV light or motors |
| NORA mode | :5002/sensors → mode, msrc | Mode changes, and ones no web page, Bluetooth app or remote made |
| NORA's page | :5002/ once a minute | A page so slow her loop freezes while it sends, so RIFT thinks she's offline |
| This PC's WiFi | netsh wlan show interfaces | Windows hopping off NORA's network to one with internet |
| Serial ports | pyserial list_ports (never opened) | Boards plugged in and unplugged, with a guess at which robot |
Quick start
Running in a minute
NINA runs on the PC next to RIFT. run.bat creates her venv the first time and starts her; run_all.bat in the GitHub folder starts her with the rest of the fleet.
> run.bat # sets up venv, then starts NINA > options.bat # her settings, as an options menu # Her page: the fleet, and everything she's noticed http://127.0.0.1:5012/
Settings
config.json, or the options menu
| Setting | Default | What it does |
|---|---|---|
| Port | 5012 | Her page and API |
| RiftHost / RiftPort | 127.0.0.1 / 5000 | Where RIFT runs |
| NoraHost / NoraSsid | 192.168.4.1 / NORA | NORA's address and WiFi name |
| CheckSeconds | 5 | How often she looks |
| SlowMs | 2000 | Slower than this is worth a warning |
| Speak / Voice / VoicePitch | on / Zira / 0.85 | Her voice, and her chirp pitch |
| MissionLog | on | Write problems to RIFT's mission log |
| TinaUrl | http://127.0.0.1:5013 | Where TINA is, for her fleet news |
| StuckMinutes | 10 | A sensor on one value this long gets a checkup |
| Passwords | empty | NORA's wheel-lock password and MILA's PIN, so she may move them a little to test a sensor |
API
For RIFT and anything else
GET /status
Everything she knows: robots, NORA, this PC's WiFi, serial ports and recent events, as JSON.
GET /events
Her log, newest first: time, level (info / warn / problem), what happened and why.
GET /chirp?u=0-13
Says a Brainfuck phrase on the PC speaker, like the robots' buzzers. RIFT's conversations use it.
GET /checkups
How each robot says it is (moving, turning, wheels locked, music, mode) and its distance readings.
POST /report
A robot sends its own readings: {"name", "state": {...}, "sensors": {"front": 23.5}}.
GET /ping
NINA alive, for anyone checking on the caretaker.