Homelab · Automation · Quality of Life
Automating the Fire Tablet Dashboard (So I Stop Thinking About It)
The quality of life of the tools I use every day isn't something I'm willing to negotiate on. Throughout this whole process of building a healthy, well-managed network, I've implemented tools I rely on daily — with the catch that I have to keep track of whether I left it on, whether I left it plugged in, or whether, when I sit down to work, I need to charge it first.
More than a technical issue, this is about usability. Getting something to just work automatically usually isn't about skill — it's about taking the time to configure the right solution when the opportunity is already sitting there.
Every new service I add to a well-run network trips the same wire: something has to be started by hand.
The Problem
Two bad options, and neither one respects the hardware.
With this tablet, that meant two bad options. Either I let the screen time out on its own, then plug it back in and wait for it to charge past 2% before I could wake it and reopen MacroDeck. Or I leave it plugged in and awake permanently — and since most of what I repurpose is aging Android hardware nobody wants anymore, permanently-on is its own quiet problem.
The goal was to automate a tool I already use and already trust — not add a workaround for it. Left as-is, the tablet would either be dead when I actually needed it, or slowly wear down hardware that's already past its prime just to stay reachable.
This isn't about being lazy. It's about automating a workflow with tools that are already free and already installed, and keeping the resulting knowledge around for the next device that needs it.
First Attempt
Chasing Windows' own sleep events didn't work.
Of course, none of this was as simple as "enable ADB, add a Windows scheduled task, done." The first version tried to hook directly into Windows' own power events — Kernel-Power Event 42 to catch the system entering sleep, Power-Troubleshooter Event 1 to catch it waking up — firing an ADB script over USB at each transition. Waking worked reliably. Sleeping never did.
The reason took some digging: right as Windows logs that it's entering sleep, the USB controller is already cutting power. The ADB command doesn't have time to complete before the connection dies. It's a race condition against the OS itself, not a misconfiguration — and no amount of tweaking the trigger fixed it.
The Fix
Stop fighting the race. Switch to Wi-Fi, and let a heartbeat do the work.
The fix was to stop trying to win that race. I switched the tablet's ADB connection from USB to Wi-Fi, and let go of the idea that IMPERFECT needed to catch the exact moment it went to sleep. Instead, IMPERFECT sends a simple "still here" signal to the tablet every 58 minutes while it's on. The tablet's own screen timeout is set to 60 minutes. If that signal stops arriving — because IMPERFECT suspended, hibernated, or shut down — the tablet just falls asleep on its own, on Android's terms, with nobody needing to catch the exact moment it happened.
How it works
📶 Wi-Fi ADB — tcpip 5555, no cable needed
💓 Heartbeat — every 58 min while IMPERFECT is on
😴 Timeout — tablet sleeps on its own after 60 min of silence
🔌 Full wake — swipe + MacroDeck, on real resume from sleep
Quick Setup Guide
Get it running on your own tablet.
Requirements: ADB debugging enabled on the tablet, once, over USB
1. Enable Wi-Fi ADB (one-time, over USB)
adb tcpip 5555
2. Disable "stay awake while charging" and set the native timeout
adb shell settings put global stay_on_while_plugged_in 0 adb shell settings put system screen_off_timeout 3600000
3. wake-tablet.bat — full wake, fires on real resume from sleep
adb connect 192.168.2.170:5555 timeout /t 1 /nobreak >nul adb -s 192.168.2.170:5555 shell input keyevent 224 timeout /t 1 /nobreak >nul adb -s 192.168.2.170:5555 shell input swipe 300 820 300 205 300 timeout /t 1 /nobreak >nul adb -s 192.168.2.170:5555 shell monkey -p com.suchbyte.macrodeck -c android.intent.category.LAUNCHER 1
4. heartbeat-tablet.bat — lightweight ping, every 58 minutes
adb connect 192.168.2.170:5555 timeout /t 1 /nobreak >nul adb -s 192.168.2.170:5555 shell input keyevent 224
5. Two Task Scheduler jobs
One triggered on system resume (Power-Troubleshooter, Event ID 1) running wake-tablet.bat, and one recurring every 58 minutes running heartbeat-tablet.bat — with "start when available" enabled, so a missed cycle catches up the moment the machine wakes instead of getting skipped.
This is tuned for a Fire Tablet running MacroDeck, but the heartbeat pattern works for any always-plugged-in Android device you want to keep reachable without fighting Windows' own sleep timing.
The Point
The simple fix beat the elegant one.
Here's a solution that works — and it feels less like scripting and more like orchestrating: two devices talking to each other cleanly across a network that's already well set up and documented, like a well-run line of dominoes. None of it works without that groundwork already in place.
It's not having to think about turning things on and off, or wondering whether something's charged. This is the first step in automating my workspace — not the last.
What's the oldest device you've kept alive with a script instead of replacing it? Drop it below.
This post contains Amazon affiliate links. If you purchase through them, I may earn a small commission at no extra cost to you. Every product listed here is something I personally own and use daily.




