diff --git a/src/udi/config-pg.json b/src/udi/config-pg.json new file mode 100644 index 0000000..8043815 --- /dev/null +++ b/src/udi/config-pg.json @@ -0,0 +1,23 @@ +{ + "mqtt": { + "broker": "ssl://eu1.cloud.thethings.network:8883", + "username": "com-passavant-geiger-poc@ttn", + "password": "ENV", + "tlsEnable": "true" + }, + "topicMappings": [ + { + "topics": [ "v3/com-passavant-geiger-poc@ttn/devices/#" ], + "handler": "TTN", + "id": "TTN0", + "config": { + "databaseConnStr": "", + "attributes": { + } + } + } + ], + "archiver": { + "dir": "./tmp/udi" + } +} diff --git a/src/udi/config/config.go b/src/udi/config/config.go index 81843cd..64b633c 100644 --- a/src/udi/config/config.go +++ b/src/udi/config/config.go @@ -35,5 +35,9 @@ func LoadConfiguration() { if err != nil { log.Fatalf("Unable to parse configuration: %s", err) } + + if Config.Mqtt.Password == "ENV" { + Config.Mqtt.Password = os.Getenv("MQTT_PASSWORD") + } } diff --git a/src/udi/handlers/ttn/models/emuProfIILoRaCfg1/emuProfIILoRaCfg1.go b/src/udi/handlers/ttn/models/emuProfIILoRaCfg1/emuProfIILoRaCfg1.go index e631c10..0df6218 100644 --- a/src/udi/handlers/ttn/models/emuProfIILoRaCfg1/emuProfIILoRaCfg1.go +++ b/src/udi/handlers/ttn/models/emuProfIILoRaCfg1/emuProfIILoRaCfg1.go @@ -2,7 +2,9 @@ package emuProfIILoRaCfg1 // provisioning device with // f_port=1: 01 00 0A 0B 0C 0D 0E 17 18 19 F0 4C +// 01 00 08 0B 0C 0D 0E 17 18 19 F0 BE // f_port=2: 01 00 0A 24 26 28 2A 7A +// 01 00 08 24 26 28 2A BE import (