docs: Planungsdokumente erstellen
- Marktanalyse (Wettbewerber, Lücken, USPs) - Anforderungskatalog (Must-Have, Should-Have, Nice-to-Have) - MVP Definition (Features, Datenmodell, Zeitplan) - Technische Architektur (Stack, API, DB-Schema) - Waagen-Integration (Hersteller, Protokolle, Strategie)
This commit is contained in:
169
docs/WAAGEN-INTEGRATION.md
Normal file
169
docs/WAAGEN-INTEGRATION.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# SchüttGo - Waagen-Integration
|
||||
|
||||
## 1. Übersicht Waagen-Hersteller
|
||||
|
||||
### 1.1 Mettler Toledo
|
||||
- **Marktführer** bei Industriewaagen
|
||||
- **Modelle:** IND780, IND570, IND500
|
||||
- **Schnittstellen:**
|
||||
- RS232 (seriell)
|
||||
- Ethernet/TCP-IP
|
||||
- Modbus TCP/RTU
|
||||
- **Protokoll:** MT-SICS (Standard)
|
||||
- **Doku:** Gut verfügbar
|
||||
|
||||
### 1.2 Bizerba
|
||||
- **Fokus:** Industriewägetechnik
|
||||
- **Modelle:** ST-EX Serie, iS Serie
|
||||
- **Schnittstellen:**
|
||||
- RS232
|
||||
- USB
|
||||
- Ethernet
|
||||
- **Protokoll:** Bizerba Protocol / ASCII
|
||||
- **Doku:** Auf Anfrage
|
||||
|
||||
### 1.3 KERN
|
||||
- **Fokus:** Preis-Leistung
|
||||
- **Modelle:** IFS, IFB, EOB Serie
|
||||
- **Schnittstellen:**
|
||||
- RS232
|
||||
- USB (optional)
|
||||
- **Protokoll:** ASCII (einfach)
|
||||
- **Doku:** Gut verfügbar
|
||||
|
||||
### 1.4 Sartorius
|
||||
- **Fokus:** Präzisionswaagen
|
||||
- **Modelle:** Combics, Signum
|
||||
- **Schnittstellen:**
|
||||
- RS232
|
||||
- Ethernet
|
||||
- **Protokoll:** Sartorius SBI
|
||||
- **Doku:** Gut verfügbar
|
||||
|
||||
## 2. Schnittstellen-Typen
|
||||
|
||||
### 2.1 RS232 (Seriell)
|
||||
```
|
||||
┌──────────┐ RS232 ┌──────────┐
|
||||
│ Waage │ ────────────── │ PC │
|
||||
└──────────┘ 9-pin/25-pin └──────────┘
|
||||
```
|
||||
- **Vorteile:** Einfach, zuverlässig, Standard
|
||||
- **Nachteile:** Kurze Kabelwege (max 15m), 1:1 Verbindung
|
||||
- **Baudrate:** Typisch 9600 oder 19200
|
||||
- **Datenformat:** 8N1 (8 Datenbits, keine Parität, 1 Stoppbit)
|
||||
|
||||
### 2.2 Ethernet/TCP-IP
|
||||
```
|
||||
┌──────────┐ TCP/IP ┌──────────┐
|
||||
│ Waage │ ────────────── │ Server │
|
||||
└──────────┘ Netzwerk └──────────┘
|
||||
```
|
||||
- **Vorteile:** Lange Distanzen, mehrere Clients, flexibel
|
||||
- **Nachteile:** Komplexer, Netzwerk-Abhängigkeit
|
||||
- **Port:** Herstellerspezifisch (z.B. 4001)
|
||||
|
||||
### 2.3 USB
|
||||
- **Emuliert meist RS232** (virtueller COM-Port)
|
||||
- Treiber erforderlich
|
||||
|
||||
## 3. Protokoll-Beispiele
|
||||
|
||||
### 3.1 MT-SICS (Mettler Toledo)
|
||||
```
|
||||
Befehl: S # Stable weight
|
||||
Antwort: S S 123.456 kg
|
||||
|
||||
Befehl: SI # Send immediately
|
||||
Antwort: S D 123.456 kg (D=dynamic/unstabil)
|
||||
|
||||
Befehl: Z # Zero/Tare
|
||||
Antwort: Z A # Acknowledged
|
||||
```
|
||||
|
||||
### 3.2 ASCII Standard (KERN u.a.)
|
||||
```
|
||||
Anfrage: <ENQ> # ASCII 05
|
||||
Antwort: + 123.45 kg\r\n
|
||||
|
||||
Format: [Vorzeichen][Leerzeichen][Gewicht][Einheit][CR][LF]
|
||||
```
|
||||
|
||||
### 3.3 Modbus RTU
|
||||
- Binäres Protokoll
|
||||
- Register-basiert
|
||||
- CRC-Prüfsumme
|
||||
- Komplexer zu implementieren
|
||||
|
||||
## 4. Implementierungsstrategie
|
||||
|
||||
### 4.1 Phase 1: Manuelle Eingabe (MVP)
|
||||
```
|
||||
┌─────────────────────────────────────┐
|
||||
│ Gewicht: [___________] kg 📥 │
|
||||
│ │
|
||||
│ [Waage ablesen] → Manuell eingeben │
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
- Kein Hardware-Aufwand
|
||||
- Sofort einsetzbar
|
||||
- Fehleranfällig
|
||||
|
||||
### 4.2 Phase 2: Lokaler Waagen-Agent
|
||||
```
|
||||
┌──────────┐ ┌─────────────┐ ┌──────────┐
|
||||
│ Waage │─────│ Waagen-Agent │─────│ SchüttGo │
|
||||
│ RS232 │ │ (lokal PC) │ WS │ Cloud │
|
||||
└──────────┘ └─────────────┘ └──────────┘
|
||||
```
|
||||
- Kleines Programm auf Waagen-PC
|
||||
- WebSocket-Verbindung zur Cloud
|
||||
- Gewicht wird automatisch übertragen
|
||||
|
||||
### 4.3 Waagen-Agent Architektur
|
||||
```javascript
|
||||
// Pseudo-Code Waagen-Agent
|
||||
const serial = new SerialPort('/dev/ttyUSB0', { baudRate: 9600 });
|
||||
const ws = new WebSocket('wss://api.schuettgo.../waage/connect');
|
||||
|
||||
serial.on('data', (data) => {
|
||||
const weight = parseWeight(data);
|
||||
ws.send(JSON.stringify({
|
||||
type: 'weight',
|
||||
value: weight,
|
||||
unit: 'kg',
|
||||
stable: true
|
||||
}));
|
||||
});
|
||||
|
||||
ws.on('message', (msg) => {
|
||||
if (msg.type === 'request_weight') {
|
||||
serial.write('S\r\n'); // Gewicht anfordern
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## 5. Empfohlene Hardware für Pilotphase
|
||||
|
||||
### 5.1 Budget-Option (< 500€)
|
||||
- **KERN EOB 150K50** (150kg/50g)
|
||||
- RS232 Schnittstelle
|
||||
- Einfaches ASCII-Protokoll
|
||||
- Ideal zum Testen
|
||||
|
||||
### 5.2 Profi-Option (1.500-3.000€)
|
||||
- **Mettler Toledo IND570**
|
||||
- Ethernet + RS232
|
||||
- MT-SICS Protokoll
|
||||
- Robust, industrietauglich
|
||||
|
||||
## 6. Nächste Schritte
|
||||
|
||||
1. [ ] Testwaage beschaffen (KERN oder gebraucht)
|
||||
2. [ ] Waagen-Agent Prototyp entwickeln
|
||||
3. [ ] WebSocket API im Backend implementieren
|
||||
4. [ ] Frontend-Integration (Live-Gewicht-Anzeige)
|
||||
5. [ ] Protokolle für 2-3 Hersteller implementieren
|
||||
|
||||
---
|
||||
*Erstellt: 2026-02-19*
|
||||
Reference in New Issue
Block a user