Those examples were pretty basic for what I want to do in the long run, but I was able to work my way through it enough to get my first goal complete. Right now it takes a reading from 2 temp sensors, one inside and one outside, and adjusts a pwm fan based on the inside temp and also sends some output to MQTT which another pi is subscribed to (not sure what I'm even trying to do there)
To get the temp sensors working you just need to install node-red-contrib-ds18b20 and make a boot.config edit:
Assumes default install directory
cd /usr/local/lib/node_modules/node-red/
sudo npm install node-red-contrib-ds18b20
sudo nano /boot/config.txt
>Add to bottom: dtoverlay=w1-gpio
Flow:
[{"id":"e00a1942.7d2d4","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"b3bb40e2.2d92","type":"http in","name":"","url":"/temp","method":"get","x":355,"y":1824,"z":"abafa038.54fa88","wires":[["61d29d3b.18a4cc"]]},{"id":"ca26a7dc.33f038","type":"http response","name":"","x":1025.5,"y":1824,"z":"abafa038.54fa88","wires":[]},{"id":"61d29d3b.18a4cc","type":"function","name":"Get Current Values","func":"msg.current = {\n insidetemp: context.global.insidetemp,\n outsidetemp: context.global.outsidetemp\n}\nreturn msg;","outputs":1,"valid":true,"x":578,"y":1824,"z":"abafa038.54fa88","wires":[["76e37074.8e19a8"]]},{"id":"76e37074.8e19a8","type":"template","name":"","field":"payload","format":"handlebars","template":"<html><head></head>\n<body>\n <form method=\"POST\" action=\"/submit\">\n <p>Inside Temp: <input name=\"insidetemp\" value=\"{{current.insidetemp}}\"></p>\n <p>Outside Temp: <input name=\"outsidetemp\" value=\"{{current.outsidetemp}}\"></p>\n <p><input type=\"submit\" value=\"Update\"></p>\n \n </form>\n \n</body>\n\n</html>","x":815.5,"y":1824,"z":"abafa038.54fa88","wires":[["ca26a7dc.33f038"]]},{"id":"b3231d0a.18df28","type":"function","name":"Set Values/Update Fan","func":"var fahrenheit = msg.payload * (9/5) + 32;\ncontext.global.insidetemp = fahrenheit;\n\nvar fanspeed;\n\nif (fahrenheit < 70){\n fanspeed = 0;\n}\nif (fahrenheit >= 70 && fahrenheit < 72){\n fanspeed = 10;\n}\nif (fahrenheit >= 72 && fahrenheit < 74){\n fanspeed = 20;\n}\nif (fahrenheit >= 74 && fahrenheit < 76){\n fanspeed = 30;\n}\nif (fahrenheit >= 76 && fahrenheit < 78){\n fanspeed = 40;\n}\nif (fahrenheit >= 78 && fahrenheit < 80){\n fanspeed = 50;\n}\nif (fahrenheit >= 80 && fahrenheit < 82){\n fanspeed = 60;\n}\nif (fahrenheit >= 82 && fahrenheit < 84){\n fanspeed = 70;\n}\nif (fahrenheit >= 84 && fahrenheit < 86){\n fanspeed = 80;\n}\nif (fahrenheit >= 86 && fahrenheit < 88){\n fanspeed = 90;\n}\nif (fahrenheit >= 88){\n fanspeed = 100;\n}\n\n//node.send({payload:fanspeed});\n\nmsg.current = {\n fanspeed: fanspeed,\n insidetemp: context.global.insidetemp\n}\n\nmsg.payload = fanspeed\n\nreturn msg;","outputs":1,"valid":true,"x":590,"y":1636,"z":"abafa038.54fa88","wires":[["69a1289e.ec28c","c9b4cb6e.c568a8"]]},{"id":"177e6002.bff4e8","type":"ds18b20","name":"Shed Inisde","sensorid":"28-000006154ba3","timer":".3","x":368,"y":1636,"z":"abafa038.54fa88","wires":[["b3231d0a.18df28"]]},{"id":"b647f4e6.6196f8","type":"debug","name":"","active":false,"console":"false","complete":"false","x":1015,"y":1554,"z":"abafa038.54fa88","wires":[]},{"id":"6d56f263.9f937c","type":"function","name":"Set Values","func":"var fahrenheit = msg.payload * (9/5) + 32;\n\ncontext.global.outsidetemp = fahrenheit;\n\nmsg.current = {\n outsidetemp: context.global.outsidetemp\n}\nreturn msg;","outputs":1,"valid":true,"x":553,"y":1703,"z":"abafa038.54fa88","wires":[["790f4fa7.5fe4f"]]},{"id":"16104bda.b13fdc","type":"ds18b20","name":"Shed Outside","sensorid":"28-000006155474","timer":".3","x":372,"y":1703,"z":"abafa038.54fa88","wires":[["6d56f263.9f937c"]]},{"id":"b93bf43d.ad6c8","type":"debug","name":"","active":false,"console":"false","complete":"false","x":1011,"y":1767,"z":"abafa038.54fa88","wires":[]},{"id":"26f78092.0f21a8","type":"http in","name":"","url":"/submit","method":"post","x":362,"y":1879,"z":"abafa038.54fa88","wires":[["bef67b91.3c74b8"]]},{"id":"bef67b91.3c74b8","type":"function","name":"Redirect back to /temp","func":"msg.res.redirect(\"/temp\");\n","outputs":"0","valid":true,"x":977,"y":1879,"z":"abafa038.54fa88","wires":[]},{"id":"69a1289e.ec28c","type":"rpi-gpio out","name":"","pin":"22","set":"","level":"0","out":"pwm","x":832,"y":1553,"z":"abafa038.54fa88","wires":[]},{"id":"c9b4cb6e.c568a8","type":"template","name":"","field":"payload","format":"handlebars","template":"Current fan speed: {{current.fanspeed}} Current inside temp: {{current.insidetemp}}","x":822,"y":1635,"z":"abafa038.54fa88","wires":[["b647f4e6.6196f8","be901cc1.2c2b1"]]},{"id":"790f4fa7.5fe4f","type":"template","name":"","field":"payload","format":"handlebars","template":"Current outside temp: {{current.outsidetemp}}","x":820,"y":1703,"z":"abafa038.54fa88","wires":[["b93bf43d.ad6c8","996c686c.e78c58"]]},{"id":"be901cc1.2c2b1","type":"mqtt out","name":"","topic":"fans","qos":"","retain":"","broker":"e00a1942.7d2d4","x":1027,"y":1635,"z":"abafa038.54fa88","wires":[]},{"id":"996c686c.e78c58","type":"mqtt out","name":"","topic":"fans","qos":"","retain":"","broker":"e00a1942.7d2d4","x":1025,"y":1703,"z":"abafa038.54fa88","wires":[]}]