01-09-2025, 08:57 AM
(This post was last modified: 01-09-2025, 08:57 AM by afterburner.)
Just a note on the protocols for websocket side.
ws:// means plain web socket.
wss:// means secure web socket (via TLS).
It is up to the broker whether it can handle a wss connection, and you would need to add a CA Cert for your broker via the mosquitto config, and likely provide the public key with connection attempts.
With the web content, it depends HOW you loaded the html.
if you use http://afterburner.mrjones.id.au/mqtt.html it should only need the plain jane websocket (ala port 8000).
If you use https://mrjiones.id.au/afterburner/mqtt.html is must be the TLS websocket (if defined and available)
Best check the browser title bar in Chrome that it was not elevated to https://....
The Afterburner does not care if it was a TLS or plain websocket, that is entirely handled by the broker.
The fundamental issue with web pages is you CANNOT open an insecure connection from a page that was loaded via https.
Hope this all makes sense?
ws:// means plain web socket.
wss:// means secure web socket (via TLS).
It is up to the broker whether it can handle a wss connection, and you would need to add a CA Cert for your broker via the mosquitto config, and likely provide the public key with connection attempts.
With the web content, it depends HOW you loaded the html.
if you use http://afterburner.mrjones.id.au/mqtt.html it should only need the plain jane websocket (ala port 8000).
If you use https://mrjiones.id.au/afterburner/mqtt.html is must be the TLS websocket (if defined and available)
Best check the browser title bar in Chrome that it was not elevated to https://....
The Afterburner does not care if it was a TLS or plain websocket, that is entirely handled by the broker.
The fundamental issue with web pages is you CANNOT open an insecure connection from a page that was loaded via https.
Hope this all makes sense?