• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 1
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 2
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 3
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 4
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 5
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 6
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 7
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 8
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 9
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Image 10
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 1
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 2
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 3
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 4
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 5
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 6
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 7
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 8
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 9
Guide: Alexa Octoprint Integration & Coaster 3D Printer File Thumbnail 10

Guide: Alexa Octoprint Integration & Coaster

NHiggs avatarNHiggs

January 30, 2020

thingiverse-icon
DescriptionCommentsTags

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.

License:

Creative Commons - Attribution - Non-Commercial - Share Alike

Related Models

3D Printed Exoskeleton Hands preview image

3D Printed Exoskeleton Hands

3DPrintIt profile image

3DPrintIt

7,795

GeoLeaf - 3D Print your own Nanoleaf project - Alexa, Hue and App integration preview image

GeoLeaf - 3D Print your own Nanoleaf project - Alexa, Hue and App integration

DIY Machines profile image

DIY Machines

4,351

Alexa tag preview image

Alexa tag

BeanieBirdy profile image

BeanieBirdy

9

Optimized Nonlethal Door Stop Multitool preview image

Optimized Nonlethal Door Stop Multitool

ChrisMUC profile image

ChrisMUC

6,619

Screen Accurate R2D2 Alexa Echo Dot 3 Dock preview image

Screen Accurate R2D2 Alexa Echo Dot 3 Dock

Rasor profile image

Rasor

562

Alexa's ghost shaped name tag preview image

Alexa's ghost shaped name tag

PlainMesh profile image

PlainMesh

0

Universal Drawer Organizers (IKEA ALEX) - (Wannapig Crafts) preview image

Universal Drawer Organizers (IKEA ALEX) - (Wannapig Crafts)

vwfan0178 profile image

vwfan0178

5,947

Alexa Echo Dot (4th Gen) T800 preview image

Alexa Echo Dot (4th Gen) T800

Jeff Lundstrom profile image

Jeff Lundstrom

398