|
Some checks failed
Build Docker Image (Podman) / build (push) Has been cancelled
|
||
|---|---|---|
| .gitea/workflows | ||
| .vscode | ||
| src | ||
| static | ||
| templates | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| concept.md | ||
| Dockerfile | ||
| LICENSE | ||
| paramod.yaml | ||
| README.md | ||
| VERSION | ||
Paramod
Rust-Webserver zur Anzeige und Bearbeitung von Modbus-Tabellen mit Persistierung in paramod.yaml.
Funktionen
- Tabellen für
modbus_input_register,modbus_holding_registerundmodbus_coils - Web-UI zum Bearbeiten und Speichern der Tabellen
- Einstellungsseite für
default,modbus,mqttundinfluxdb - MQTT/Influx-Integration gemäß Konfiguration
- Speicherung aller Änderungen in
paramod.yaml
Lokale Entwicklung
Voraussetzungen
- Rust + Cargo
Start
cargo run
Server: http://localhost:8080
Docker (Podman)
Image bauen
podman build -t paramod:latest .
Container starten
podman run --rm -p 8080:8080 -v "$(pwd)/paramod.yaml:/app/paramod.yaml" paramod:latest
API Endpoints
GET /GET /table/modbus_input_registerGET /table/modbus_holding_registerGET /table/modbus_coilsGET /settingsGET /api/configPOST /api/savePOST /api/save-settings
API-Beispiel: Tabelle speichern
Beispiel für Holding-Register:
curl -X POST http://localhost:8080/api/save \
-H "Content-Type: application/json" \
-d '{
"table_id": "modbus_holding_register",
"rows": [
{
"TVsoll": {
"addr": 2,
"type": "INT16",
"factor": 0.1,
"write": true,
"mqtt": true,
"influxdb": true,
"comment": "Vorlauf Soll"
}
}
]
}'
Beispiel für Coils:
curl -X POST http://localhost:8080/api/save \
-H "Content-Type: application/json" \
-d '{
"table_id": "modbus_coils",
"rows": [
{
"MgtSystem": {
"addr": 0,
"write": true,
"mqtt": true,
"influxdb": false,
"comment": "Leitsystem aktiv"
}
}
]
}'
Konfiguration
Die komplette Konfiguration liegt in paramod.yaml.
Lizenz
MIT