Custom OctoPi server enclosure with 240v outlets


Hi. Here is my custom case for OctoPi server driving my Taz 6. I have included two 240v outlets wired-in so I can turn off the printer and lights after the print has finished. Octoprint & OctoPi are such a good products it seems a shame not to have a great case. I'm also using the Enclosure Plugin to control the relays and LEDs.

Next step is to add a filament-out sensor and a keypad to the case but I need to find out how to get the Enclosure plugin working with the MCP23017 IO port expander chip (it uses I2C)... Any suggestions?

(edit) I have now added a 4 by 4 matrix membrane keypad and the idea is to control the bed as well as abort, pause, change filament and resume. Just need to get the I2C GPIO expansion working!

My custom print server

The inside

My rig.

The relay board controlling the 240v mains sockets.


Daaamn, that looks pro. Nice! We get so used to seeing 3D printed everything that every now and then a custom fabricated case just looks so damn good.

Sorry, no experience with the I2C.


Hey thanks. It was a Vero electronic project box I had in my shed for round 20 years. I think the sloped case works well with the print server concept and they keypad will make it really useful. R


I have just put my Taz 6 filament runout sensor on Thingiverse. See


You might try this video for suggestions on interfacing the 4x4 with the Raspi.

Adafruit is my go-to zone for learning how to interface something in this space. They have an Arduino repository for the MCP23017 which you might learn something from.

Here's a little Raspi/Python code which I think eventually gets sorted out in the end.


Thanks for your reply. I'd like to use the keypad with the Enclosure plugin which is expecting to detect single pin GPIO state changes and isn't currently written to scan a keypad. As you suggest, I could use an Arduino to scan the keypad and then waggle RPi GPIO pins - that would work with the plugin but it's a little tech-heavy. I think I'll write to the author of the plugin to see if they can include keypad scan in their code to save having to use an additional Arduino...


Don't forget "remote GPIO" which allows one computer to toggle/read pins on another.

But alright. Good luck with the Enclosure plugin author; I hope that works out.


I'll look into remote GPIO as well thanks.