Once in Node-Red you will have to install a “Palette” (basically a plugin for additional feature). After installation go ahead and open up Node-Red. MQTT supports passwords but if all your devices are local and not connecting to the broker through the internet (and you haven’t enabled port forwarding) you can skip the passwords.Īfter the MQTT broker is installed and setup you can go ahead and install Node-Red which is also in the Unraid the Community Applications (plugin). If you need to be able to connect browsers to the MQTT broker then forward port 9001 as well). Port 9001 is for Websocket connection (b rowsers can’t speak MQTT but they do support websockets. Optionally you can also forward port 9001. If you are just using MQTT you’ll need to forward port 1883 to the local IP of the Unraid server. If you want the MQTT broker to be accessible from the internet you will have to set up port forwarding on your router. Just find it in the Community Applications (plugin) and hit install. Instead of a simple JS that inserted each message into the MySQL server I am now using Node-Red which makes it much simpler to store the MQTT data. I have since moved the MQTT broker and MySQL server to an Unraid server. After a while the SQL tables get too large and the queries take too long due to the limited processing power of the system. I used to use Mosquitto and some simple JS on a Synology 2-Bay NAS. Instead of using an online MQTT broker service you can self host it.
0 Comments
Leave a Reply. |