Building a DIY SwitchBot
Published Sat Feb 04 2023 15:00:00 GMT+0000 (Coordinated Universal Time)
The issueWhat do you do when your boiler routinely needs to be restarted as a workaround to a PCB fault?
SwitchBotI initially thought a SwitchBot would nicely do the trick. Unfortunately, a SwitchBot offers a maximum torque of 1.15kg/cm — and that’s not enough to press the power button on our Vaillant boiler.
So then I looked online for a servo — and found one offering a maximum torque of 3.1kg/cm when running off a 5V supply.
Local network serverI dug out an old Raspberry Pi, and hooked it up to the servo. I assigned it a static IP (just to make sure I could connect to it reliably) and wrote a small Node.js web server that would operate the servo upon receiving a HTTP request.
Running on rebootI used cron to ensure the server would run whenever the pi was started:
@reboot cd /home/pi/Documents/georgegillams/boiler-server && PORT=3000 yarn start