To reduce complexity the initial version of the V3 TTI gateway didn’t support the Azure Device Provisioning Service(DPS). In preparation for this I had included DeviceProvisioningServiceSettings object in both the Application and AzureSettingsDefault sections.
After trialing a couple of different approaches I have removed the AzureSettingsDefault. If an application has a connectionstring configured that is used, if there is not one then the DPS configuration is used, if there are neither currently the application logs an error. In the future I will look at adding a configuration option to make the application optionally shutdown
{
...
"ProgramSettings": {
"Applications": {
"application1": {
"AzureSettings": {
"IoTHubConnectionString": "HostName=TT...n1.azure-devices.net;SharedAccessKeyName=device;SharedAccessKey=Am...M=",
"DeviceProvisioningServiceSettings": {
"IdScope": "0n...3B",
"GroupEnrollmentKey": "Kl...Y="
}
},
"MQTTAccessKey": "NNSXS.HC...YQ",
"DeviceIntegrationDefault": false,
"DevicePageSize": 10
},
"seeeduinolorawan": {
"AzureSettings": {
"IoTHubConnectionString": "HostName=TT...n2.azure-devices.net;SharedAccessKeyName=device;SharedAccessKey=D2q...L8=",
"DeviceProvisioningServiceSettings": {
"IdScope": "0n...3B",
"GroupEnrollmentKey": "Kl...Y="
}
},
"MQTTAccessKey": "NNSXS.V44...42A",
"DeviceIntegrationDefault": true,
"DevicePageSize": 10
}
},
"TheThingsIndustries": {
"MqttServerName": "eu1.cloud.thethings.industries",
"MqttClientId": "MQTTClient",
"MqttAutoReconnectDelay": "00:00:05",
"Tenant": "br...st",
"ApiBaseUrl": "https://br..st.eu1.cloud.thethings.industries/api/v3",
"ApiKey": "NNSXS.NR...SA",
"Collaborator": "de...le",
"DevicePageSize": 10,
"DeviceIntegrationDefault": true
}
}
}
The implementation of failing back from application to default settings wasn’t easy to implement, explain or document.