Skip to content

Guide: Alexa Octoprint Integration & Coaster

?
Creation's quality: 5.0/5 (1 vote)
Evaluation of members on the printability, utility, level of detail, etc.
  • 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.

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.

  • 3D file format: STL
  • Publication date: 2020/02/04 at 06:44

Tags

Creator

Designs 18
Downloads 1.5k
Followers 14

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.

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

  • 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!