Ding.js configuration
Ding.js configuration is composed of a JSON file that contains all information to setup the application.
- mqtt: broker settings (for The Things Network)
- data: an object that identifies the service of which the data will be received
- entities: an array containing the keys that should be used from the
payload_fields
object.
- entities: an array containing the keys that should be used from the
- metadata: an array containing the metadata entities that could be related with the nodes (using the
dev_id
)- Optionally some entities could be served as endpoints
Example configuration
{
"mqtt": {
"service": "ttn",
"protocol": "mqtt",
"host": "eu.thethings.network",
"user": "abc",
"password": "xyz"
},
"data": {
"ttn": [
"temperature",
"humidity",
"motion",
"light",
"battery"
]
},
"metadata": [
{
"name": "location",
"type": "string",
"rest_endpoint": true
},
{
"name": "contact",
"type": "string"
},
{
"name": "room",
"type": "number",
"rest_endpoint": true
},
{
"name": "installation_date",
"type": "timestamp"
}
]
}