dt1t
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Wolfgang Hottgenroth 2023-12-20 14:14:55 +01:00
parent caffafdfbc
commit 3779547a95
Signed by: wn
GPG Key ID: 836E9E1192A6B132
3 changed files with 5 additions and 107 deletions

View File

@ -1,6 +1,6 @@
PGUSER="udi" PGUSER="uditest"
PGHOST=`kubectl get services traefik -n system -o jsonpath="{.status.loadBalancer.ingress[0].ip}"` PGHOST=`kubectl get services traefik -n system -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
PGPASSWORD=`kubectl get secrets udi-db-cred -n udi -o jsonpath="{.data.PGPASSWORD}" | base64 --decode` PGPASSWORD=`kubectl get secrets uditest-db-cred -n udi-test -o jsonpath="{.data.PGPASSWORD}" | base64 --decode`
PGSSLMODE=require PGSSLMODE=require
PGDATABASE="uditest" PGDATABASE="uditest"
export PGUSER PGHOST PGPASSWORD PGSSLMODE PGDATABASE export PGUSER PGHOST PGPASSWORD PGSSLMODE PGDATABASE

View File

@ -1,105 +0,0 @@
{
"mqtt": {
"broker": "mqtt://172.23.1.102:1883",
"tlsEnable": "false"
},
"topicMappings": [
{
"topics": [ "IoT/PV/Values" ],
"handler": "PV",
"id": "PV",
"config": {
"databaseConnStr": "",
"attributes": {
}
}
},
{
"topics": [ "IoT/MBGW3/Measurement" ],
"handler": "MBGW3",
"id": "MBGW3",
"config": {
"databaseConnStr": "",
"attributes": {
}
}
},
{
"topics": [ "IoT/OneWireGW/Bus 1/#" ],
"handler": "SVER",
"id": "SVER0",
"config": {
"databaseConnStr": "",
"attributes": {
"application": "Temperature Heating",
"payloadRegex": "(\\d+(\\.\\d+)?)\\s*([^0-9\\s]\\S*)",
"deviceFrom": "topic",
"devicePart": "3",
"valueFrom": "payload",
"valuePart": "1",
"unitFrom": "payload",
"unitPart": "3"
}
}
},
{
"topics": [ "NR/Multisensor/+/Temperatur" ],
"handler": "SVEJ",
"id": "SVEJ0",
"config": {
"databaseConnStr": "",
"attributes": {
"application": "Temperature Multisensor",
"deviceSelector": "T:2",
"valueSelector": "J:$.CurrentTemperature",
"unitSelector": "C:°C"
}
}
},
{
"topics": [ "NR/Multisensor/+/Feuchte" ],
"handler": "SVEJ",
"id": "SVEJ1",
"config": {
"databaseConnStr": "",
"attributes": {
"application": "Humidity Multisensor",
"deviceSelector": "T:2",
"valueSelector": "J:$.CurrentRelativeHumidity",
"unitSelector": "C:%"
}
}
},
{
"topics": [ "shellyplusht/+/status/temperature:0" ],
"handler": "SVEJ",
"id": "SVEJ2",
"config": {
"databaseConnStr": "",
"attributes": {
"application": "Temperature Shelly Plus HT",
"deviceSelector": "T:1",
"valueSelector": "J:$.tC",
"unitSelector": "C:°C"
}
}
},
{
"topics": [ "shellyplusht/+/status/humidity:0" ],
"handler": "SVEJ",
"id": "SVE4",
"config": {
"databaseConnStr": "",
"attributes": {
"application": "Humidity Shelly Plus HT",
"deviceSelector": "T:1",
"valueSelector": "J:$.rh",
"unitSelector": "C:%"
}
}
}
],
"archiver": {
"dir": "./tmp/udi"
}
}

View File

@ -14,6 +14,7 @@ import "udi/handlers/pv"
import "udi/handlers/mbgw3" import "udi/handlers/mbgw3"
import "udi/handlers/sver" import "udi/handlers/sver"
import "udi/handlers/svej" import "udi/handlers/svej"
import "udi/handlers/dt1t"
var handlerMap map[string]handler.Handler = make(map[string]handler.Handler) var handlerMap map[string]handler.Handler = make(map[string]handler.Handler)
@ -40,6 +41,8 @@ func InitDispatcher() {
factory = sver.NewSverHandler factory = sver.NewSverHandler
case "SVEJ": case "SVEJ":
factory = svej.NewSvejHandler factory = svej.NewSvejHandler
case "DT1T":
factory = dt1t.NewDt1tHandler
default: default:
factory = nil factory = nil
log.Printf("No handler %s found, ignore mapping", mapping.Handler) log.Printf("No handler %s found, ignore mapping", mapping.Handler)