JSON Configuration File
You can create a file named 'config.json' in the same folder as your MQTT Proxy scripts to automatically load configuration details from a file, instead of needing to use the command-line.
Parameters include…
Name | Default | Meaning |
---|---|---|
webport | 80 | The HTTP port (set to 443 if using SSL) |
ardiserver | localhost | The source ARDI server URL |
topic | ardi/proxy | The MQTT topic to communicate under |
remotesslcert | The SSL security certificate file | |
remotesslkey | The SSL private key file | |
mqttserver | localhost | The MQTT server URL |
mqttport | 1883 | The MQTT server port number |
mqttsecure | 0 | Set to 1 to use TLS/SSL security |
mqttuser | The username for the MQTT server | |
mqttpass | The password for the MQTT server | |
mqttcert | The client certificate for the MQTT server |
Example File
The file below is for a system that supports live data and uses a secure MQTT server that requires authentication.
{ "ardiserver": "https://myardiserver/", "webport": 443, "remotesslcert": "cert.pem", "remotesslkey": "key.pem", "mqttserver": "my.shared.server", "mqttuser": "myusername", "mqttpass": "mypassword", "mqttsecure": 1, "topic": "ardi/serverx/proxy" }
Note that this would require you to have created a security certificate.