Dokumentation

This commit is contained in:
chk
2026-06-12 23:43:21 +02:00
parent 6de258bc01
commit b19489d836
4 changed files with 342 additions and 2 deletions

View File

@@ -103,6 +103,12 @@ Die Eingaben kommen per WebSocket an den HTTPS-Server und werden in `server/Inpu
- Statischer Bearer-Token für `PUT /api/robot`. Fehlt die Variable, generiert
`RobotConfigService` beim ersten Start einen zufälligen Key und speichert ihn in
`data/robot/.apikey` (nicht im Repo). Der Key wird beim Start einmalig geloggt.
- `SHELLY_URL`
- URL für den Shelly Smart Plug Emergency-Stop: `http://<IP>/rpc/Switch.Set?id=0&on=false`
- Überschreibt `controllers.emergencyStop.url` aus `robot.json` (analog zu `GRBL_BASE_IP`).
- **Wichtig in Docker:** `.local`-mDNS-Hostnamen werden im Container nicht aufgelöst —
stattdessen die echte IP verwenden (z.B. `http://192.168.0.99/rpc/Switch.Set?id=0&on=false`).
- Details: `doc/15_EmergencyStop_done.md`
### HTTPS-Konfiguration
@@ -125,7 +131,13 @@ Relevante Abschnitte für den Driver:
"controllers": {
"base": { "ip": "fluidNcBase.local", "port": 2300, "protocol": "telnet", "axes": ["x","y","z"], "heartbeatInterval": 10000 },
"elbow": { "ip": "fluidNcEllbow.local", "port": 5000, "protocol": "telnet", "axes": ["a",null,null], "heartbeatInterval": 10000 },
"hand": { "ip": "fluidNcHand.local", "port": 5000, "protocol": "telnet", "axes": ["c","e","b"], "heartbeatInterval": 10000 }
"hand": { "ip": "fluidNcHand.local", "port": 5000, "protocol": "telnet", "axes": ["c","e","b"], "heartbeatInterval": 10000 },
"emergencyStop": {
"protocol": "shelly",
"url": "http://<SHELLY-IP>/rpc/Switch.Set?id=0&on=false",
"urlOn": "http://<SHELLY-IP>/rpc/Switch.Set?id=0&on=true",
"urlStatus": "http://<SHELLY-IP>/rpc/Switch.GetStatus?id=0"
}
}
}
```
@@ -172,11 +184,15 @@ Socket geschlossen und der bestehende Reconnect-Mechanismus startet automatisch.
- `/style.css`
- `/allApps.css`
- API-Endpunkte:
- `/api/status`
- `/api/status` — Sender-Status inkl. `isGCodeReceiver`-Flag
- `/api/position`
- `/api/robot``GET`: aktuelle `robot.json`; `PUT`: überschreibt sie (Auth erforderlich)
- `/api/robot/history` — Liste aller Snapshots
- `/api/robot/history/:ts` — einen bestimmten Snapshot abrufen
- `/api/power-status` — Shelly-Schaltzustand (`armed: true/false`, Spannung, Leistung)
- `/api/emergency-stop``POST`: Feed Hold `!` an alle FluidNC + Shelly Strom AUS
- `/api/power-on``POST`: Shelly Strom EIN
- `/api/alarm-unlock``POST`: `$X` an alle FluidNC (nach Strom-Neustart)
## Wichtige Dateien
@@ -194,6 +210,7 @@ Socket geschlossen und der bestehende Reconnect-Mechanismus startet automatisch.
- `robot/RobotController.js` — wendet geparste Befehle auf das Modell an (Steuerlogik)
- `robot/GCode.js` — Fassade + Datei-Befehle
- `robot/TelnetSenderGRBL.js`
- `robot/ShellyEmergencyStop.js` — steuert Shelly Smart Plug als Emergency-Stop-Aktor (HTTP GET, kein GCode)
- `robot/fluidnc/FluidNCClient.js` — alternative WebSocket-basierte FluidNC-Anbindung mit Reconnect-Logik (noch nicht integriert)
- `GCodeFiles/` — enthalten Beispiel- und Log-G-Code-Dateien
@@ -224,6 +241,7 @@ Architektur- und Refactoring-Aufgaben sind in `doc/ToDo_*.md` dokumentiert:
| `doc/ToDo_10_VerbindungsVerlust.md` | Verbindungsverlust erkennen, Watchdog, UI-Statusanzeige | offen |
| `doc/ToDo_12_InverseKinematikConfig_ROADMAP.md` | Austauschbare Kinematik: RobotBase, KinematicsFactory, Grab-It | ✅ erledigt |
| `doc/ToDo_14_robot_json_service.md` | robot.json als REST-Service, RobotConfigService, RobotConfig | teilweise (Schritte 14 in appRobotDriver ✅, Schritte 57 offen) |
| `doc/15_EmergencyStop_done.md` | Emergency Stop: Shelly + FluidNC Feed Hold, API, UI, Restart-Ablauf | ✅ erledigt |
| `doc/ToDo_49_Cleanup.md` | Pre-Release-Cleanup: tote Code, Zertifikate, ToDos, README | offen |
### Empfohlene Bearbeitungsreihenfolge