7 ms·
DIY out-of-band management: remote power button
- NoraCodes 4y agoThis is a neat writeup. I think the ESP32, alongside similar microcontrollers that tie communication via complex protocols so close to direct interaction with the physical world for such a small energy cost, are really amazing for teaching, inspiring, and empowering otherwise "non-technical" people. Of course, you do have to be able to program, but I think we're making great strides in making that as easy as possible with things like CircuitPython and EduBlocks. 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!
- sokoloff 4y agoIt seems likely that most existing deployments of 10Gbps cards are into a machine that has an alternative management card (which has no reason to be 10Gbps-capable). I don’t need to WoL via my 10Gbps card near as much as I need WoL on the management interface.
- NoraCodes 4y agoThat makes sense, I suppose! Maybe if/when 10Gbps becomes more popular with consumers such highly integrated cards will come onto the market.
- InvaderFizz 4y agoUnfortunately, at the current adoption rate, that will be sometime after 2040.
- secure 4y agoWe’re already starting to see 2.5 Gbps interfaces become more and more popular on mainboards, so I suspect once 10 Gbps interfaces become more common on high-end mainboards, vendors will start caring about WOL with these chips :)
- lloydatkinson 4y agoA mosfet seems pretty overkill for this instead of practically any cheaper transistor unless there’s something about motherboard headers I don’t know. Pretty cool though.
- secure 4y agoCheaper transistors should totally work, as I tried to describe in the article. I had this particular MOSFET lying around from a different project, so that’s the main reason I chose that one :)
- sokoloff 4y agoIt’s also only $0.46 in singles at DigiKey, so hardly something crazy wasteful in any event.
- dekhn 4y agoWhy is the transistor needed at all? Does the current to turn on/off the machine exceed the ESP32's pins?
- jstanley 4y agoBecause you need to act like a switch.
- 4y ago
- someperson 4y agoNit: Please hyphenate "out-of-band". That's how it's usually written, and it's much more readable.
- secure 4y agoNow hyphenated, thanks for the hint
- rektide 4y agoCrazy good ESPHome story here! > 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.
- watermelon0 4y agoIf this is something permanent (and needs to be reliable), I'd advise the author to move it to perfboard/veroboard.
- joezydeco 4y agoThe more I work with MQTT the more I enjoy it. It's just enough protocol to get the job done without overcomplicating things. Nice work.
- pmontra 4y agoGreat project but a little too much for the ones of us with only software development skills. 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.
- hashworks 4y agoThis. Most mainboards can be configured to boot the moment they receive power, no need for a power button. It's also worth noting that any internet integration can be disabled on all Shelly devices.
- d0gsg0w00f 4y agoAgreed. The Shelly looks to be targeted at EU markets. I suppose the more American equivalent would be something like a Meross Meross Smart Plug Mini https://a.co/d/ey2LJcb https://a.co/d/ey2LJcb
- somehnguy 4y agoHardware can be a fun change of pace if you’re willing to try. A lot of stuff is pretty safe as long as you follow basic precautions. 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 :)
- mkup 4y agoI use a couple of Ewelink devices (hardware-equivalent Chinese clone of Sonoff S20 from AliExpress), reflashed with open source Tasmota firmware for the same purpose: remotely controlled power socket, with physical button, connected to WiFi, with HTTP web page and REST API for curl etc, firmware has MQTT support too; I have no idea about Alexa/Google integrations (likewise, I'm not interested in this feature), but the price is bargain, $10/each. Sonoff S26 clones are good for this purpose too, but UART port is easier to solder on S20 (larger one). Soldering UART port is necessary for reflashing to Tasmota, because stock firmware is utter crap.
- sebazzz 4y agoKeeping wake on LAN on will likely use less power than this ESP32 solution.
- JonChesterfield 4y agoI want this feature. Power cycle a machine from somewhere else. The smart PDU strips are suspiciously complicated and expensive enough that I don't want to discover I bought an unreliable one. 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.
- phoronixrly 4y agoI know that HN is crazy about their homelab setups, but please consider whether having a rats nest of jumpers and a breadboard in your comms cabinet is reliable, let alone safe... How about a tweak to the BIOS to auto turn on power, then plug it into a Shelly Plug running Tasmota? You get your remote turn-on, you get a tested, reliable, and safe solution, and you get power use monitoring on top of that. 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
- gregmac 4y agoPart of the motivation of "homelab" for many people is to learn in a practical way. If you're new to electronics or ESP32s, the amount you'd learning doing this is worth far more than 10 eur.
- secure 4y agoA smart plug would probably work just as well for most cases, but one downside is that you need to ensure your computer is safely powered off before turning off the smart plug. 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.
- phoronixrly 4y agoYou shut down your computer the usual way, from the OS, then toggle the plug to restart it. In case the system hangs during shut down, you'd actually want to know that it's hanging, which you can actually see in the power readings of the plug. > 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...
- bennyp101 4y agoWe have a couple of sms enabled plugs for some remote places, worst comes to it we can send a txt and power cycle the devices
- skocznymroczny 4y agoAt my workplace we had a farm of laptop machines and we weren't allowed to disassemble them to pull any power wires out. What we ended up using was a remotely controlled motor with a small plastic "finger" attached that would press on the power button for n seconds, depress, wait few seconds, then press it for n seconds again to do remote hard reboots.
- jvanderbot 4y agoYou're kidding me. It's exactly the role of this robot in Wall-E: https://old.reddit.com/r/MovieDetails/comments/h7r2f2/when_walle_2008_goes_with_eve_to_the_captain_for/ https://old.reddit.com/r/MovieDetails/comments/h7r2f2/when_w...
- matja 4y agoHad a secure server room with a maglock with very few cardholders and forgot our cards a few times. We wired-up a CD-ROM drive to a server positioned so that it pressed the door unlock button on the wall when it was ejected, so someone could ssh in to the server and "eject /dev/sr0" to get in.
- teddyh 4y agohttps://thedailywtf.com/articles/ITAPPMONROBOT https://thedailywtf.com/articles/ITAPPMONROBOT
- wpietri 4y agoThat is awesome and I'm glad somebody did it. But was there some reason not to just pull the laptop batteries and use normal remote-controllable outlets?
- tbyehl 4y ago15-20 years ago if you were using a cheap dedicated hosting company that stacked "servers" in desktop cases on wire racks and somehow offered instant remote reboots despite clearly being too cheap to buy switched PDUs, they were doing something just like this.
- simplyinfinity 4y agoFew years ago I did the same thing with a raspberry pi zero W and two bash scripts - one for power on/off one for reset. It's quite useful to have and was born out of the need to reboot my Ryzen 1700x powered pc, due to p(ower)state bug that I only uncovered as the culprit a year ago. Here's a simple writeup with pictures : https://1drv.ms/u/s!Au9Lr9dxN7gUs8AQo6pkvUxXb1DD4g?e=DCqDzG https://1drv.ms/u/s!Au9Lr9dxN7gUs8AQo6pkvUxXb1DD4g?e=DCqDzG
- myself248 4y agoThe rationale to justify the wifi link is interesting, and this is a creative solution indeed! 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-remote-reboot-device-from-junkbox-parts/ https://www.i3detroit.org/reset-on-lan-an-ethernet-aware-rem...
- axiolite 4y agoNo electronics skills, flashing of firmware, etc. is needed. Just order a USB relay board and hook NO and COM terminals to the power switch. Can be driven from a cheap Rasberry Pi or any other low power mini PC.