communication with influxdb is working, schema of data in influxdb is unusable so far, too many spare columns

This commit is contained in:
2026-02-04 17:19:12 +01:00
parent 97679561d8
commit a1ea1b230e
22 changed files with 22 additions and 57 deletions

View File

@@ -0,0 +1,25 @@
package rawPayloadPrinter
import (
"log"
"fmt"
"encoding/base64"
"encoding/hex"
"udi/database"
)
func Parse(fPort int, _ []byte, frmPayload string, variables *map[string]database.VariableType, _ *map[string]interface{}, _ *database.Device) error {
if fPort != 2 {
return fmt.Errorf("Unexpected fPort %d", fPort)
}
bytes, err := base64.StdEncoding.DecodeString(frmPayload)
if err != nil {
return fmt.Errorf("Unable to base64-decode payload: %v", err)
}
hexString := hex.EncodeToString(bytes)
log.Printf("Payload: %s", hexString)
return nil
}