I'm sure this question has been asked and answered somewhere, but I'm sufficiently befuddled that I can't even formulate the right question to get to the prior work.
I have a very nice Node-RED flow that runs on a Beaglebone Black Wireless (BBBW) and displays sensor information from various probes. It can be accessed as a web page at http://<server>:1880/sensors. Associated with this is a nice display using Node-RED's dashboard, accessed at http://<server>:1880/ui. It provides a graphical display of the information from one probe, chosen by clicking on a button on the sensor web page. It all works just fine viewed on a browser on the local area net.
However, it requires three pieces that make it too limited for remote use.
1) The BBBW has to connect to a local wifi access point -- i.e., it has to know which access point to use and what its password is.
2) The router has to have port-forwarding set up for port 1880, which can be tricky if the BBBW uses DHCP to get its local IP address.
3) To access the BBBW running Node-RED from a browser on the Internet, the BBBW has to have a known external IP address (i.e., the external IP address of its router).
While I'd love to address all three points, I'd first like to solve 2 and 3, which I think I can address with MQTT. Namely, the BBBW can access a broker (e.g., HiveMQ's
<broker.hivemq.com>) and publish to MyServer/sensors. The BBBW wouldn't have to set up port forwarding nor know its external IP address, as all this would be taken care of by the MQTT system. The remote browser on the Internet would then simply subscribe to MyServer/sensors on the same broker...but now I'm stuck.
a) Without running Node-RED on the device that runs the browser (think of a PC in a coffee shop or a smart phone), how do I show that nice dashboard display that I see on the LAN? I assume I have to build a web page that accepts MQTT data and does something with them, but what? Is there any carry-over from the Node-RED dashboard? Oh, and the remote browser has to be able to send back the choice of which sensor to display, but that seems much simpler.
b) There seem to be two choices within the MQTT world: either standard MQTT (port 1883) or web sockets (port 8000 on the HiveMQ broker). How would I choose between these, and why?
Where can I look for help on these? And obviously, once I solve 2 and 3, I'm going to be looking for a way to solve 1, but one step at a time...
Thanks,
Richard