This commit is contained in:
@ -5,16 +5,12 @@
|
|||||||
},
|
},
|
||||||
"topicMappings": [
|
"topicMappings": [
|
||||||
{
|
{
|
||||||
"topics": [ "shellyplusht/+/status/temperature:0" ],
|
"topics": [ "ttn/#" ],
|
||||||
"handler": "SVEJ",
|
"handler": "TTN",
|
||||||
"id": "SVE3",
|
"id": "TTN0",
|
||||||
"config": {
|
"config": {
|
||||||
"databaseConnStr": "",
|
"databaseConnStr": "",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"application": "Temperature Shelly Plus HT",
|
|
||||||
"deviceSelector": "T:1",
|
|
||||||
"valueSelector": "J:$.tC",
|
|
||||||
"unitSelector": "C:°C"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package ttn
|
|||||||
|
|
||||||
import "log"
|
import "log"
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
import "udi/config"
|
||||||
import "udi/handlers/handler"
|
import "udi/handlers/handler"
|
||||||
|
|
||||||
var idSeq int = 0
|
var idSeq int = 0
|
||||||
@ -10,7 +11,8 @@ type TTNHandler struct {
|
|||||||
id int
|
id int
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTTNHandler() handler.Handler {
|
|
||||||
|
func NewTTNHandler(config config.HandlerConfigT) handler.Handler {
|
||||||
t := &TTNHandler {
|
t := &TTNHandler {
|
||||||
id: idSeq,
|
id: idSeq,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user