Enabling Security

To enable live data and advanced functions like Augmented Reality when using the MQTT Proxy, you'll need use HTTPS instead of the less secure HTTP protocol.

To do this, you'll need a SSL certificate and a private key file.

You can generate these yourself with OpenSSL, a freely downloadable tool that is normally pre-installed on Linux and WSL systems.

Generate a Key

openssl req -x509 -nodes -days 1024 -newkey rsa:2048 -keyout key.pem -out cert.pem

This creates an SSL security key that will last for 1024 days.

You can enter any values you like while generating the certificate, but the FQDN needs to be the IP address you'll use to connect to the server. If running the Remote script on your local computer, this should be '127.0.0.1'.

Launch With SSL Enabled

To use this new key and certificate, add them to your command-line parameters.

For example…

python3 remote.py --webport 443 --cert=cert.pem --key=key.pem

This will create your server on port 443 (the default for HTTPS websites), with the provided security certificate.

You will get a security warning when opening the page on your browser, but you should be able to use most functions such as live data.