For whatever OCD-related reasons I may have had, I designed the printed part to be just bigger than the switch itself, creating an hour-long activity of trying to reassemble everything inside.
My original thought was that it needs to be connected via a pair of JST connectors to the Raspi's GPIO pins. But now that I see it sitting here, it's telling me that it wants to be wireless.
Okay, so there's some space still inside there but it's not enough for a Pi Zero. There's enough room for a battery. What am I looking for? Is it a Tinyduino, a Feather, a Trinket...? Can I do remote GPIO from Arduino to Raspi? Has anyone used any of these boards yet? The last time I worked with a PCArduino I ditched the project because Node wouldn't work on it.
ESP8266 is a super cheap and widely used solution for adding WiFi to stuff like this. It'd be simple for it to shoot out a REST call to something on your Pi (or MQTT or whatever).
If Bluetooth would suit you better, ESP32 can do WiFi+BT.
Thinking more about this - If you've used Arduino in the past you'll find ESP8266 Arduino to be super simple to use. Find a WeMos D1 Mini clone somewhere nearby (available from for about two fiddy) and it will have everything you need one one board. Set up Arduino IDE for ESP8266 then a simple sketch can call OctoPrint's REST API.
I had a bunch of links to examples in this post but the forum won't let me add any more so... feel free to ask if you'd like more guidance on this. The ESP8266 platform is perfect for this sort of use case and I have them all over my house doing simple tasks.
Alright, I think I'll go the more expensive Adafruit route but basically work from this platform. Guess I'll need a battery and a microUSB receptacle. Not entirely sure what I'm doing with this one. Do you have any information on a battery setup that allows the external USB connection to power the battery?
So in regards to battery - what is the use case? The ESP8266 isn't super about low power without some extra steps taken. Do you want the device to be entirely cordless? You can do that by having the button trigger an interrupt which will bring the ESP out of deep sleep, but you'll also need to source a battery management solution which could be as simple as a USB battery bank. There are ESP32 options which offer both deep sleep and integrated battery charge management that may be suitable as well. Check out Andreas Spiess' work on those devices for more detail.
The device you've chosen doesn't have built-in USB (which is the specific reason I suggested the WeMos), so now you have another problem - you're going to need a way to program and power this thing. The Adafruit link there should help you select some solutions for that.
edit: One more thing - I found this project which looks like it might work for your use case. The code and explanation will probably help you out. If you have any more questions I might need to PM you because apparently I can't post more than twice in a topic.
Unfortunately Fry's doesn't have those but Adafruit has goodies that I need. I've been storing up a number of things I'll get from them (to include another Zero).
In regards to the slow boat from China I take the Mitch Hedberg baked potato approach - order a handful today, because by the time they get here who knows what use case you'll have thought of Monday I wanted to setup my sprinkler system to not turn on when it's raining, and 15 minutes later I had an ESP8266 and relay hooked up to my sprinkler controller which would stop it from running if the forecast called for 50% chance of rain. Today it's been raining and my sprinklers didn't kick on. It's these sorts of ad-hoc simple use cases that make cheap WiFi micros so stinkin handy!
Over the past year I've been working on an ESP8266-based project for home automation control which I call the HA SwitchPlate: http://haswitchplate.com
The device can display any information my home automation system (Home Assistant) knows about. Because Home Assistant supports OctoPrint, I now have the ability to monitor print progress and temperatures from any room in the house. The display looks like this:
It can do all sorts of stuff! Scene controller, light dimmers, weather display, alarm system controller, sprinkler zone controller, media player controls, basically anything that Home Assistant can talk to (and that's a ridiculously large list) can be setup for interaction on a touchscreen that mounts in existing wall boxes. The project is little more than the touchscreen, an ESP8266, a power supply, and a box to stick it all in.
There's loads of simple stuff you can get done with these things. A really nice Youtuber made a video about another quick project I made, this one almost embarrassingly simple but damn handy: https://www.youtube.com/watch?v=1DyblwsjfU8 If you have your garage door opener connected to your HA system, this project will open/close your garage door for you as you come and go. GitHub: https://github.com/aderusha/MQTTCarPresence
I'm thinking in terms of being able to adjust the power-cost threshold for lights, say. I could program in that I want the light to shut off if the cost for a k-h goes above whatever. (Power prices in San Diego skyrocket during the summertime and especially during certain hours.)
Similarly, you could toggle on/off the power for charging circuits to take advantage of cheaper cost at night for power.