<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hysus</title>
    <description>The latest articles on DEV Community by Hysus (@hysus).</description>
    <link>https://dev.to/hysus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3758654%2Fd3e53f6c-207a-45a8-84c3-cc6bfb08b5f5.png</url>
      <title>DEV Community: Hysus</title>
      <link>https://dev.to/hysus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hysus"/>
    <language>en</language>
    <item>
      <title>A Remote Finger for My PC Power Button</title>
      <dc:creator>Hysus</dc:creator>
      <pubDate>Sat, 07 Feb 2026 16:23:24 +0000</pubDate>
      <link>https://dev.to/hysus/a-remote-finger-for-my-pc-power-button-345o</link>
      <guid>https://dev.to/hysus/a-remote-finger-for-my-pc-power-button-345o</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7rme1f4y9rp21ou2n7p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7rme1f4y9rp21ou2n7p.gif" alt="Black ESP8266 relay box with glowing white LED ring remotely powering on a PC" width="544" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with “remote power-on”
&lt;/h2&gt;

&lt;p&gt;I wanted to turn on my PC from anywhere.&lt;/p&gt;

&lt;p&gt;Wake-on-LAN is the obvious answer. It’s also the obvious rabbit hole:&lt;br&gt;
static IPs, router rules, NAT/CGNAT, and re-doing fragile setups every time a&lt;br&gt;
machine gets updated or reinstalled.&lt;/p&gt;

&lt;p&gt;Some of the older office PCs didn’t even support WOL properly.&lt;br&gt;
And even when they did, every OS update or fresh install meant&lt;br&gt;
going through the whole ritual again.&lt;/p&gt;

&lt;p&gt;After dealing with that a few times… I was out.&lt;/p&gt;

&lt;p&gt;I didn’t want reliability to depend on network configuration.&lt;/p&gt;

&lt;p&gt;So I stopped trying to wake the PC over the network.&lt;/p&gt;

&lt;p&gt;I decided to &lt;strong&gt;press the power button&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Remotely.&lt;/p&gt;




&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;An ESP8266 and a relay, wired to the motherboard &lt;strong&gt;Power SW&lt;/strong&gt; header in parallel&lt;br&gt;
with the case button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft2436f5cbme9dr8e8bcb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft2436f5cbme9dr8e8bcb.jpg" alt="ESP8266 board and relay module before assembly" width="800" height="1066"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
    Before assembly.&lt;br&gt;
  
  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9wou9eobnk3rsqlulqd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9wou9eobnk3rsqlulqd.jpg" alt="ESP8266 and relay module installed inside a PC case, wired to the Power SW header" width="535" height="739"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
    ESP8266 + relay wired in parallel to the motherboard &lt;b&gt;Power SW&lt;/b&gt; header.&lt;br&gt;
    It electrically mimics a physical press of the case power button.&lt;br&gt;
  
  &lt;/p&gt;

&lt;p&gt;When triggered, the relay briefly shorts the pins.&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;No BIOS settings.&lt;br&gt;&lt;br&gt;
No port forwarding.&lt;br&gt;&lt;br&gt;
No VPN.&lt;br&gt;&lt;br&gt;
No inbound traffic at all.&lt;/p&gt;

&lt;p&gt;The device only makes &lt;strong&gt;outbound HTTPS requests&lt;/strong&gt; to fetch a tiny command.&lt;br&gt;
If the value changes, it taps the button.&lt;/p&gt;

&lt;p&gt;This one design choice — outbound only — is why the system is boringly reliable&lt;br&gt;
behind NAT, CGNAT, and whatever network shape you happen to have that day.&lt;/p&gt;

&lt;p&gt;Sometimes the most “IoT” thing you can do is avoid infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Google Sheets?
&lt;/h2&gt;

&lt;p&gt;Because it’s already there.&lt;/p&gt;

&lt;p&gt;A single cell becomes a control panel.&lt;br&gt;
Google Apps Script turns that cell into a tiny HTTPS endpoint.&lt;br&gt;
The ESP8266 polls it and watches for changes.&lt;/p&gt;

&lt;p&gt;Is it elegant? Not in the academic sense.&lt;/p&gt;

&lt;p&gt;Is it practical, free, and reproducible in five minutes? Absolutely.&lt;/p&gt;

&lt;p&gt;And more importantly: there’s almost nothing to break.&lt;/p&gt;




&lt;h2&gt;
  
  
  What actually matters here
&lt;/h2&gt;

&lt;p&gt;I won’t repeat wiring diagrams or setup steps — the README covers those clearly.&lt;/p&gt;

&lt;p&gt;What’s interesting is &lt;em&gt;why&lt;/em&gt; this works so well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It doesn’t depend on router configuration&lt;/li&gt;
&lt;li&gt;It doesn’t need persistent connections&lt;/li&gt;
&lt;li&gt;It tolerates network weirdness&lt;/li&gt;
&lt;li&gt;It behaves like a human finger, not a protocol&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is less “remote control” and more “remote fingertip.”&lt;/p&gt;

&lt;p&gt;And that turns out to be a very stable abstraction.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-world behavior
&lt;/h2&gt;

&lt;p&gt;Polling is not instant. That’s fine. Power-on is patient.&lt;/p&gt;

&lt;p&gt;If the PC is already on, a press behaves exactly like a real press:&lt;br&gt;
sleep, shutdown, or nothing — depending on OS settings.&lt;/p&gt;

&lt;p&gt;The system doesn’t try to be smart.&lt;br&gt;
It just does the one physical action faithfully.&lt;/p&gt;

&lt;p&gt;And that simplicity is the whole point.&lt;/p&gt;




&lt;h2&gt;
  
  
  From hobby build to embedded system (v2 thinking)
&lt;/h2&gt;

&lt;p&gt;I built this a few years ago. Open-sourcing it made me want to clean it up&lt;br&gt;
— not with features, but with engineering discipline.&lt;/p&gt;

&lt;p&gt;The next iteration focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-blocking scheduling (&lt;code&gt;millis()&lt;/code&gt; instead of &lt;code&gt;delay()&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Retry logic with exponential backoff&lt;/li&gt;
&lt;li&gt;Avoiding heap fragmentation from repeated &lt;code&gt;String&lt;/code&gt; usage&lt;/li&gt;
&lt;li&gt;Clear module boundaries (&lt;code&gt;Network&lt;/code&gt;, &lt;code&gt;Command&lt;/code&gt;, &lt;code&gt;Relay&lt;/code&gt;, &lt;code&gt;State&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;An explicit state machine&lt;/li&gt;
&lt;li&gt;Watchdog, boot-reason logging, and failure recovery&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words: make it the kind of firmware that can run for months&lt;br&gt;
without anyone thinking about it.&lt;/p&gt;

&lt;p&gt;Because that’s what this device should be.&lt;/p&gt;

&lt;p&gt;Invisible.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Outbound-only designs quietly solve a lot of networking pain.&lt;/li&gt;
&lt;li&gt;Physical abstractions are sometimes more reliable than clever protocols.&lt;/li&gt;
&lt;li&gt;“Simple” doesn’t mean “unprofessional” — if it’s documented and reproducible, it’s solid engineering.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want the full implementation — wiring, firmware, Apps Script, setup —&lt;br&gt;
it’s all in the repo README.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Hysus12/esp8266-remote-power-button" rel="noopener noreferrer"&gt;Hysus12/esp8266-remote-power-button&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you build one, I’d love to see your version of the remote finger.&lt;/p&gt;

</description>
      <category>iot</category>
      <category>esp8266</category>
      <category>homelab</category>
    </item>
  </channel>
</rss>
