Thanks for you reply Julian. Do you have any examples of the websockets and MQTT websockets you can share?
In my attempt to find how variables are passed with POST, I found out through a debug node that they are just a regular old payload so I'm good there.
I am still hitting a wall where I cant do what I want, mainly because of how the HTML drop downs work. I want my drop down to default to whatever the current value is and I can't do that without some sort of JavaScript support in the template node. Is the template node editable to allow this, or is there some other node I should be using? I thought I could get away with <p>Fan Status: <select name="fan_status" value="{{current.fansdisabled}}"><option value="Disabled">Disabled</option><option value="Active">Active</option></select></p> but that did not work either. Is Here is what I have now:
[{"id":"e00a1942.7d2d4","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"b3bb40e2.2d92","type":"http in","name":"","url":"/temp","method":"get","x":63.5,"y":416,"z":"abafa038.54fa88","wires":[["61d29d3b.18a4cc"]]},{"id":"ca26a7dc.33f038","type":"http response","name":"","x":734,"y":416,"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 fansdisabled: context.global.fansdisabled\n}\nreturn msg;","outputs":1,"valid":true,"x":286.5,"y":416,"z":"abafa038.54fa88","wires":[["76e37074.8e19a8"]]},{"id":"76e37074.8e19a8","type":"template","name":"","field":"payload","format":"handlebars","template":"<html>\n<head>\n</head>\n<body>\n <form method=\"POST\" action=\"/disablefans\">\n <p>Inside Temp: <input name=\"insidetemp\" value=\"{{current.insidetemp}}\"></p>\n <p>Outside Temp: <input name=\"outsidetemp\" value=\"{{current.outsidetemp}}\"></p>\n <p>Fan Status: <select name=\"fan_status\" value=\"{{current.fansdisabled}}\"><option value=\"Disabled\">Disabled</option><option value=\"Active\">Active</option></select></p>\n <p><input type=\"submit\" value=\"Update Fan Status\"></p>\n </form>\n <form method=\"POST\" action=\"/updatetemp\">\n <p><input type=\"submit\" value=\"Update Temp\" onclick=\"history.go(0)\"></p>\n </form>\n</body>\n</html>","x":524,"y":416,"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.fanspeed;\n\ncontext.global.insidetemp = fahrenheit;\n\nif (context.global.fansdisabled == \"Active\"){\n if (fahrenheit < 70){\n context.global.fanspeed = 0;\n }\n if (fahrenheit >= 70 && fahrenheit < 72){\n context.global.fanspeed = 15;\n }\n if (fahrenheit >= 72 && fahrenheit < 74){\n context.global.fanspeed = 30;\n }\n if (fahrenheit >= 74 && fahrenheit < 76){\n context.global.fanspeed = 45;\n }\n if (fahrenheit >= 76 && fahrenheit < 78){\n context.global.fanspeed = 60;\n }\n if (fahrenheit >= 78 && fahrenheit < 80){\n context.global.fanspeed = 75;\n }\n if (fahrenheit >= 80 && fahrenheit < 82){\n context.global.fanspeed = 90;\n }\n if (fahrenheit >= 82){\n context.global.fanspeed = 100;\n }\n}\nif (context.global.fansdisabled == \"Disabled\"){\n context.global.fanspeed = 0;\n}\n\nmsg.current = {\n fanspeed: context.global.fanspeed,\n insidetemp: context.global.insidetemp\n}\n\nmsg.payload = context.global.fanspeed\n\nreturn msg;","outputs":1,"valid":true,"x":298.5,"y":228,"z":"abafa038.54fa88","wires":[["69a1289e.ec28c","c9b4cb6e.c568a8"]]},{"id":"177e6002.bff4e8","type":"ds18b20","name":"Shed Inisde","sensorid":"28-000006154ba3","timer":".3","x":76.5,"y":228,"z":"abafa038.54fa88","wires":[["b3231d0a.18df28"]]},{"id":"b647f4e6.6196f8","type":"debug","name":"","active":false,"console":"false","complete":"false","x":719.5,"y":160,"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":261.5,"y":295,"z":"abafa038.54fa88","wires":[["790f4fa7.5fe4f"]]},{"id":"16104bda.b13fdc","type":"ds18b20","name":"Shed Outside","sensorid":"28-000006155474","timer":".3","x":80.5,"y":295,"z":"abafa038.54fa88","wires":[["6d56f263.9f937c"]]},{"id":"b93bf43d.ad6c8","type":"debug","name":"","active":false,"console":"false","complete":"false","x":715.5,"y":359,"z":"abafa038.54fa88","wires":[]},{"id":"69a1289e.ec28c","type":"rpi-gpio out","name":"","pin":"22","set":"","level":"0","out":"pwm","x":540.5,"y":159,"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":530.5,"y":227,"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":528.5,"y":295,"z":"abafa038.54fa88","wires":[["b93bf43d.ad6c8","996c686c.e78c58"]]},{"id":"be901cc1.2c2b1","type":"mqtt out","name":"","topic":"fans","qos":"","retain":"","broker":"e00a1942.7d2d4","x":736.5,"y":227,"z":"abafa038.54fa88","wires":[]},{"id":"996c686c.e78c58","type":"mqtt out","name":"","topic":"fans","qos":"","retain":"","broker":"e00a1942.7d2d4","x":734.5,"y":295,"z":"abafa038.54fa88","wires":[]},{"id":"7c376171.5b3758","type":"http in","name":"","url":"/disablefans","method":"post","x":94,"y":100,"z":"abafa038.54fa88","wires":[["cb0d7eb7.90fb98"]]},{"id":"9ee21763.3627f","type":"function","name":"Redirect back to /temp","func":"msg.res.redirect(\"/temp\");\n","outputs":"0","valid":true,"x":693.5,"y":100,"z":"abafa038.54fa88","wires":[]},{"id":"cb0d7eb7.90fb98","type":"function","name":"Set Values/Update Fan","func":"context.global.fanspeed;\ncontext.global.fansdisabled;\n\nif (msg.payload.fan_status == \"Disabled\"){\n msg.current = {\n fanspeed: 0,\n insidetemp: context.global.insidetemp\n }\n context.global.fanspeed = 0;\n context.global.fansdisabled = \"Disabled\";\n}\nif (msg.payload.fan_status == \"Active\"){\n msg.current = {\n fanspeed: context.global.fanspeed,\n insidetemp: context.global.insidetemp\n }\n context.global.fansdisabled = \"Active\";\n}\n\nmsg.payload = context.global.fanspeed;\n\nreturn msg;","outputs":1,"valid":true,"x":298.5,"y":100,"z":"abafa038.54fa88","wires":[["9ee21763.3627f","69a1289e.ec28c"]]},{"id":"dfc10029.7e1ec","type":"http in","name":"","url":"/updatetemp","method":"post","x":95,"y":36.883331298828125,"z":"abafa038.54fa88","wires":[["a56fe28c.7dd64"]]},{"id":"a56fe28c.7dd64","type":"function","name":"Redirect back to /temp","func":"msg.res.redirect(\"/temp\");\n","outputs":"0","valid":true,"x":694.5,"y":36.883331298828125,"z":"abafa038.54fa88","wires":[]}]