DIY out-of-band management: remote power button
michael.stapelberg.ch
michael.stapelberg.ch
It's exactly the role of this robot in Wall-E: https://old.reddit.com/r/MovieDetails/comments/h7r2f2/when_w...
What happens when someone accidentally does a clean shutdown from within the OS?
Switchable PDUs have the same issue. You need something like Wake-on-LAN in addition to the switchable power to ensure you don't need to do a late night drive into the data center or office.
This is on by default on all server boards and the toggle was on all consumer boards i've tried.
The difference in price is ~ 10 eur where I'm at, and I'm not including the rest of the BOM of OP:
Shelly Plug S: EUR 25
NodeMCU: EUR 12.5 Breadboard: EUR 3
Conceptually, pressing the power button seems a little cleaner to me, and also works well with suspend-to-ram (what I originally wanted to do), which the smart plug can’t do.
I’m not too concerned with safety — we’re talking about 3.3V (signal) and 5V (power) here.
> I’m not too concerned with safety
I'm sorry to state that, but that much is evident from the photos in the blog post (assuming you're author here). While the voltages may look safe to you, the whole contraption is safe just until something goes wrong. Examples:
1. You push around a dangling wire and short out a more powerful circuit.
2. Something on your dev board for development purposes releases the grey smoke. 500mA at 5v may seem low to you, but under the right circumstances might cause a fire. I don't see any fuses or other overcurrent protection in your schematic.
3. Your mainboard gives a defect and runs more that the expected voltages/currents to your dev board. God forbid AC from something else faulty in the electric installation (just saying because I've been zapped from touching the outside of a closed case).
4. Power surges, lightning strikes... Static electricity even...
- “Stay Off”: do nothing
- “Power On”: turn on after AC is reconnected
- “Last State”: turn on after AC is reconnected, only if disconnected while running
I agree, breadboard is slightly problematic, but that could be fixed quickly with a soldered perfboard setup or a quick custom PCB and remove the breadboard component.
The voltages we're talking about here is all 5V, and anything it's connected to should be pretty limited in current carrying capability.
I use smart plugs over Wi-Fi to do that. Shelly Plug S have a small physical button, a web app, a HTTP URL to call to switch the plug on or off. They also have a lot of features that I don't need. Among them MQTT and Alexa/Google integrations. A few bash scripts with curl and I can do everything I need. The price is reasonable and they saved me a lot of time.
It's also worth noting that any internet integration can be disabled on all Shelly devices.
Meross Smart Plug Mini https://a.co/d/ey2LJcb
I built my own remote garage door opener with an esp32, relay, and Amazon dash button. Took a bit to get working but super satisfying when you do :)
It's a transistor, a resistor, and some wires. The ESP32 boards are trivial to program even without embedded-specific development experience, using just the Arduino IDE and a USB cable.
In the past I've used wake-on-lan cards but with the wake signal connected to the reset line instead, so it became reset-on-lan. That's much more useful in my lab, I don't know about yours!
Edit: Writeup: https://www.i3detroit.org/reset-on-lan-an-ethernet-aware-rem...
Also, this kind of shocked me:
> none of my followers had ever seen functioning WOL on any 10 Gbit/s card.
Those cards are way too expensive to be lacking such a useful feature!
I don’t need to WoL via my 10Gbps card near as much as I need WoL on the management interface.
> I wanted a quick solution (with ideally no custom firmware development) and was already familiar with ESPHome, which turns out to very easily implement the functionality I wanted :)
> In addition to a standard ESPHome configuration, I have added the following lines to make the GPIO pin available through MQTT, and make it a momentary switch instead of a toggle switch, so that it briefly presses the power button and doesn’t hold the power button:
Really simple looking understandable yaml.file constitutes almost all the softwafe development done for this project. Stunning. Nice.
Here's a simple writeup with pictures : https://1drv.ms/u/s!Au9Lr9dxN7gUs8AQo6pkvUxXb1DD4g?e=DCqDzG
Current thinking is a relay held open by power over ethernet and toggle the switch port to reboot it, but I don't quite have the nerve to solder the relay myself. I can't deal with a dead/crashed switch remotely anyway.
I had this particular MOSFET lying around from a different project, so that’s the main reason I chose that one :)
> void press(){ digitalWrite(PWRBTN, HIGH); delay(33); digitalWrite(PWRBTN, LOW); delay(33); digitalWrite(PWRBTN, HIGH); }
My 5min hack would look like this - and optionally a 0.1uF and a 1k resistor for peace of mind - totally untested though. Usually a uC I/O pin has three states; output high, output low and Hi-Z. Hi-Z is high-impedance or extremely high resistance state, analogous to an open circuit.