Skip to content

Guide: Alexa Octoprint Integration & Coaster

Advertising
Advertising
?
Creation quality: 5.0/5 (1 vote)
Evaluation of members on the printability, utility, level of detail, etc.

  • 4.5k views
  • 5 likes
  • 30 downloads

License
3D design format
STL Folder details Close
  • CoasterBase.stl
  • CoasterInsert.stl

Learn more about the formats

Publication date 2020-02-04 at 05:44
?
Published to Thingiverse on: 2020-01-30 at 15:33
Design number 104626

3D printer file info

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.

Disclaimer
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.
Deliverables

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.

TL,DR;

You'll be able to say Alexa, turn on my printer / Alexa turn off my printer lights / etc.

Example

This will also work via the Octoprint menu and push status notifications to your smart phone app. (1-5 second lag)













Write-up Structure

  1. High level overview of how to configure your hardware.
  2. Detailed write up of what scripts are needed how to integrate them with Octoprint and start everything at boot
  3. Resources / Appendix

Hardware
Mounting
Mount your hardware as desired, personal recommendations listed below:

Raspberry Pi Mount]
Relay Mount
Buck Converter Mount

Wiring
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.

Software
Overview
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.

Relay Scripts

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)

Octoprint Registration

Register the powerPrinter script with the Octoprint config.yaml

Emmulation

The third script emulates a Belkin Wemo smart plug and interacts with the smart home controller. This script calls the control script mentioned above.

  • fauxMo.js

This script can emulate several devices at once and can be configured as needed.

Boot

The fourth script is really just a cron job that ensures the emulation script is started at boot.

Resources

Git Hub Library (this writeup)
https://github.com/NHiggs/OctoFauxmo

Git Hub (node-fauxmo)
https://github.com/lspiehler/node-fauxmo#readme

Notes
Feedback and input on improving this write-up welcome.

Advertising


Issue with this design? Report a problem.

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 banner blocker (AdBlock, …) and click on our banner ads.

  • AFFILIATION: Make your purchases online by clicking on our affiliate links here Amazon.

  • DONATE: If you want, you can make a donation via Ko-Fi πŸ’œ.

  • WORD OF MOUTH: Invite your friends to come, discover the platform and the magnificent 3D files shared by the community!


Sharing and downloading on Cults3D guarantees that designs remain in makers community hands! And not in the hands of the 3D printing or software giants who own the competing platforms and exploit the designs for their own commercial interests.

Cults3D is an independent, self-financed site that is not accountable to any investor or brand. Almost all of the site's revenues are paid back to the platform's makers. The content published on the site serves only the interests of its authors and not those of 3D printer brands who also wish to control the 3D modeling market.

100% secure payment by credit card, PayPal, Apple Pay, Google Pay, etc.
View all payment options.