Files
neuron/plugins/mqtt/mqtt.json
T

165 lines
3.5 KiB
JSON

{
"client-id": {
"name": "client-id",
"description": "MQTT client id",
"type": "string",
"attribute": "required",
"default": "${node-name}",
"valid": {
"length": 255
}
},
"upload-topic": {
"name": "upload topic",
"description": "Topic to which publish tags data.",
"type": "string",
"attribute": "required",
"default": "/neuron/${node-name}/upload",
"valid": {
"length": 255
}
},
"format": {
"name": "upload format",
"description": "JSON format of the data reported in the upload topic. In values mode, data are split into `values` and `errors` sub objects. In tags mode, tag data are put in a single array.",
"attribute": "required",
"type": "map",
"default": 0,
"valid": {
"map": [
{
"key": "format-values",
"value": 0
},
{
"key": "format-tags",
"value": 1
}
]
}
},
"cache-mem-size": {
"name": "cache memory size (MB)",
"description": "Max in-memory cache size in megabytes when MQTT connection exception occurs. Should be smaller than cache disk size.",
"type": "int",
"attribute": "required",
"default": 0,
"valid": {
"min": 0,
"max": 1024
}
},
"cache-disk-size": {
"name": "cache disk size (MB)",
"description": "Max in-disk cache size in megabytes when MQTT connection exception occurs. Should be larger than cache memory size. If nonzero, cache memory size should also be nonzero.",
"type": "int",
"attribute": "required",
"default": 0,
"valid": {
"min": 0,
"max": 10240
}
},
"host": {
"name": "host",
"description": "MQTT broker host",
"attribute": "required",
"type": "string",
"default": "broker.emqx.io",
"valid": {
"length": 255
}
},
"port": {
"name": "port",
"description": "MQTT broker port",
"attribute": "required",
"type": "int",
"default": 1883,
"valid": {
"min": 1024,
"max": 65535
}
},
"username": {
"name": "username",
"description": "User name",
"attribute": "optional",
"type": "string",
"default": "",
"valid": {
"length": 255
}
},
"password": {
"name": "password",
"description": "Password",
"attribute": "optional",
"type": "string",
"default": "",
"valid": {
"length":255
}
},
"ssl": {
"name": "ssl",
"description": "Enable SSL connection",
"attribute": "optional",
"type": "bool",
"default": false,
"valid": {}
},
"ca": {
"name": "CA",
"description": "CA certificate file",
"attribute": "required",
"type": "file",
"condition": {
"field": "ssl",
"value": true
},
"valid": {
"length": 81960
}
},
"cert": {
"name": "client cert",
"description": "client x509 certificate file",
"attribute": "optional",
"type": "file",
"condition": {
"field": "ssl",
"value": true
},
"valid": {
"length": 81960
}
},
"key": {
"name": "client key",
"description": "client key file",
"attribute": "optional",
"type": "file",
"condition": {
"field": "ssl",
"value": true
},
"valid": {
"length": 81960
}
},
"keypass": {
"name": "keypass",
"description": "key password",
"attribute": "optional",
"type": "string",
"condition": {
"field": "ssl",
"value": true
},
"valid": {
"length": 256
}
}
}