Home automation redux
2020-10 edition. IFTTT have decided to start charging for any amount of automations above the trivial, which was my sign that it was time to rejig my home automation to remove them from the equation.
My current job has made me vastly more comfortable with hosting my own virtual machines as well as VPNs. So it was a no brainer for me to spin up a linux VM, install node-red, and wire up my sensor array to my lights.
OK to step back a bit, my sensors only talk in GET messages to notify of events, lux changes, etc. My lights only talk in PUT messages for actions changing lights. Enter node-red to act as the glue between them, as well as to house the logic for when and how to adjust the lights (e.g. 1.0-(Math.min(100,Math.pow(msg.payload.lux, 0.66))/100) as part of the brightness logic).
Next step will be to house the node-red/openVPN VM somewhere other than on my beleaguered never-sleeping Surface Book (lest the smarts leave the house any time the laptop does).