Guide: Alexa Octoprint Integration & Coaster
- 1.2k views
- 3 likes
- 16 downloads
3D model description
This write up is meant to serve as a guide for adding smart home controller support to a Raspberry Pi and integrating that support with Octoprint. This example details controlling the power for an Ender 3 but should be easily adaptable for other items like lights and fans.
What's with the Coaster?
A: It seemed morally wrong to click "Publish a Thing" but not have a thing.
Please note this project will involve some basic electrical work and even though most of that should be low voltage DC you still need to be careful. If you are not comfortable with basic skills like soldering or reading a volt meter it might be a good time to stop.
When complete you will be able to turn your printer or lights on and off via both your smart home controller and the main Octoprint interface. Notifications will also 'push' to your smart home app.
You'll be able to say Alexa, turn on my printer / Alexa turn off my printer lights / etc.
This will also work via the Octoprint menu and push status notifications to your smart phone app. (1-5 second lag)
- High level overview of how to configure your hardware.
- Detailed write up of what scripts are needed how to integrate them with Octoprint and start everything at boot
- Resources / Appendix
Mount your hardware as desired, personal recommendations listed below:
Raspberry Pi Mount]
Buck Converter Mount
Wire components as required. The relay will require a 5v supply, ground, and one control wire per actual relay. Be sure to note the pin(s) used for control as this will be required later.
Wire the PSU to the printer through the relay so that the circuit is only closed when the relay is powered.
Optional Buck Converter
Although the power requirements of the relay should be well within the capabilities of the Pi it's best practice to power the relay via the buck converter if equipped.
Wiring the buck converter directly to the printers PSU will also eliminate some wires keeping wire clutter to a minimum.
Low level instructions for installation and configuration of the scripts required to make this work are detailed on the git hub page
Below is a quick high level overview of the scripts involved and what each does.
Two scripts are involved in controlling power to the printer. One script controls only the relay and the other serves as the controller handling additional logic like shutting off power to the USB ports in order to prevent powering the motherboard LCD while the relay is off.
- powerPrinter.py (maps to relay and controls cycling)
- powerPrinter (controller with additional logic)
Register the powerPrinter script with the Octoprint config.yaml
The third script emulates a Belkin Wemo smart plug and interacts with the smart home controller. This script calls the control script mentioned above.
This script can emulate several devices at once and can be configured as needed.
The fourth script is really just a cron job that ensures the emulation script is started at boot.
Feedback and input on improving this write-up welcome.
- 3D file format: STL
- Publication date: 2020/02/04 at 06:44
Best sellers of the category Home
Add a comment
Would you like to support Cults?
You like Cults and you want to help us continue the adventure independently? Please note that we are a small team of 3 people, therefore it is very simple to support us to maintain the activity and create future developments. Here are 4 solutions accessible to all:
ADVERTISING: Disable your AdBlock banner blocker and click on our banner ads.
DONATE: If you want, you can make a donation via PayPal here.
WORD OF MOUTH: Invite your friends to come, discover the platform and the magnificent 3D files shared by the community!