Zum Hauptinhalt springen

Standort-Server

Der Standort-Server (de.profipos.server, .NET 8) ist die Drehscheibe jedes ProfiPOS-Standorts.

Aufgaben

  • MQTT-Broker (Mosquitto) als zentrale Echtzeit-Schaltstelle
  • Geraete-Provisionierung ueber UDP-Discovery + TCP-Hello
  • Cloud-Sync (REST, bidirektional, mit Offline-Faehigkeit)
  • Hardware-Anbindung: ESC/POS-Drucker (TCP/9100), ZVT-Terminals (TCP/22000), LED-Module (MQTT), MDB-Terminals
  • Lokale REST-API fuer Geraete (Stammdaten-Cache, Berichte)
  • TSE-Integration (Swissbit als Default)
  • Backup + Auto-Update

Subsysteme

KlasseAufgabe
MqttBridgeServiceVerbindung zu Mosquitto, zentrales Subscribe profipos/#
ServerIdentityServiceGeneriert + persistiert lokale Server-UUID + Keypair
UdpDiscoveryServiceUDP-Broadcast-Listener auf Port 34567 (Magic PROFIPOS-DISCOVER-V6)
TcpProvisioningServiceTCP-Hello auf Port 34568, gibt MQTT-Credentials raus
CloudSyncServicePeriodischer Pull/Push gegen https://profipos.de/api/v6
LedDisplayServiceMQTT-Publisher fuer LED-Module
EscPosPrinterTCP-Client fuer Bondrucker
ZvtTerminalClientTCP-Client fuer EC-Terminals

Provisionierungs-Flow (Geraete)

Geraet              Standort-Server         Cloud
│ │ │
│── UDP Broadcast ─────▶│ │
│ PROFIPOS-DISCOVER-V6│ │
│ │ │
│◀── UDP Reply ─────────│ │
│ host+port │ │
│ │ │
│── TCP hello {hw_id} ─▶│ │
│ │ │
│ │── POST /devices ─▶│
│ │ discovered │
│ │ │
│ │ Backoffice claim │
│ │◀─ POST /devices/ │
│ │ claim │
│ │ │
│◀── TCP {creds} ───────│ │
│ MQTT-User/Pass │ │
│ │ │
│── MQTT connect ──────▶│ │
│ profipos/.../.../...│ │

Konfiguration

appsettings.json enthaelt die Sektionen Datenbank, Mqtt, Cloud, Provisioning, RestApi, Backup, AutoUpdate und Tse.

Deploy

  • Windows: Inno-Setup-Installer aus setup/server-setup.iss, EV-signed
  • Linux: setup/install.sh (systemd-unit)

MQTT-Topics

Siehe MQTT-Topic-Schema.