echo "UUID=12345" > ~/env
sudo nano /lib/systemd/system/nodered.service
- Add
EnvironmentFile=/home/pi/env
sudo systemctl daemon-reload
sudo systemctl restart nodered
- In node-red, create a MQTT-in node
- In the
topic
field, write$(UUID)
echo "UUID=12345" > ~/env
sudo nano /lib/systemd/system/nodered.service
EnvironmentFile=/home/pi/env
sudo systemctl daemon-reload
sudo systemctl restart nodered
topic
field, write $(UUID)