Home automation with a 3D printer – Octoprint and Home Assistant Tutorial
(With Node Red setup)
This video was meant to show the basic integration of Home Assistant with the Octoprint setup. As part of my tutorials however, I like to show the Node Red setup as well, and in this case, I realized that the official Octoprint integration didn’t expose all of the values a person may want…
And so I extended this to include using Node-Red to query the direct JSON API, clean it up, and show a notification using that as well!
This went a bit deep into the tech at the end…and I skipped over the octoprint setup assuming that that’s already done…to focus on the integration. If you’d like to see more about the node-red JSON work or more about octoprint please comment below and I can do a deep dive on those. Both are really deep subjects that warrant possibly several videos each.
This was inspired by my work printing face shields for COVID19, and needing to know when the face shield was done. You can solve this with an egg timer…but I wanted to see if I could do something a bit smarter. With this integration I can now monitor the printer temperatures, and eventually power management, webcam, etc. all from my Home Assistant UI.
Please note that while this uses the iphone app as a notification, there are TONS of different endpoints that could be used (I’m hoping to setup the LG TV one tonight!). You can see the list of notifications here: https://www.home-assistant.io/integrations/notify/
Pushbullet documentation is here:
Octoprint Home Assistant integration page:
Octoprint home page:
Octoprint API Page:
Node-Red – Adding a header to an HTTP request:
Parsing code shown for converting the percentage to 2 decimal places:
msg.payload.progress.completion = Math.round(msg.payload.progress.completion*100)/100;
Great resources to know for Home Assistant:
Dr Zzs – https://www.youtube.com/channel/UC7G4tLa4Kt6A9e3hJ-HO8ng
Bruh Automation – https://www.youtube.com/channel/UCLecVrux63S6aYiErxdiy4w
The hook up – https://www.youtube.com/channel/UC2gyzKcHbYfqoXA5xbyGXtQ
Octoprint setup guide from the excellent Howchoo channel:
https://www.youtube.com/watch?v=1RuasPvZhx0 .(tagsToTranslate)Home Automation(t)3D printing(t)Home Assistant(t)Node-Red(t)Tutorial(t)Smart Home(t)Smart Home Automation(t)Raspberry Pi(t)Ender 3(t)Setup(t)Guide(t)Octoprint(t)Home Automation ideas(t)Smart home(t)smart home automation