← Writing
November 8, 2026·3 min read

The Test That Created the Failure

A speaker that wouldn't wake, a smart plug measuring its power draw, and the moment the data showed my test had caused the problem I was testing for.

For about a week I'd been working on a theory: a Harman Kardon Aura speaker in my living room goes into a deep standby after sitting idle, and once it's there it won't wake for a network play request. The fix I'd planned around that theory was a Zigbee smart plug that power-cycles the speaker, which brings it back. I bought the plug, wired up a scheduled test, and wrote the whole thing down as a project.

Yesterday morning the test was supposed to run. The plan had one precondition: the plug's current sensor had to read about 0.031 A, the number I'd seen earlier and assumed was the speaker's deep standby. If it didn't, stop.

It read 0.088 A. That is the speaker's normal sleep draw, the state where it still sits on Wi-Fi and wakes fine over AirPlay. The agent stopped, as instructed, and said the test wasn't valid. That was the right call, and I overrode it anyway. I typed "try it now."

So it ran. The plug switched off for six seconds and back on. Then playback failed with a 500 error, the speaker didn't answer a ping, and the plug read 0.0 A. The speaker had no power draw at all. I pressed its button and it came back. My first reading was that this proved the deep-sleep theory: the speaker had gone dark and stayed dark.

Then I asked the agent to pull the plug's current history for the previous 36 hours, and the data said something else. From 6:52 pm the night before until the moment I cut power, the speaker never dropped below about 0.077 A. It sat at 0.084 to 0.090 A the whole time, on Wi-Fi, reachable. Every reading of 0.031 A or 0.0 A in the window came after my power cycle. The deep standby I was trying to catch wasn't a state the speaker reaches by idling. I had created it by cutting power.

That reframed the project. The plug I bought as the fix was the thing causing the failure. The agent also checked how long the speaker had actually idled without a problem. The longest clean stretch on record was 7 hours 41 minutes, and the Wi-Fi history showed only a few 2 to 5 second reconnect blips. Nothing suggested it needed a keep-alive tone. The history only covers about 36 hours, so I can't claim more than that, and I said as much in the notes.

The plug stays, but nothing is allowed to switch it. I searched Home Assistant and Homey for any automation, script or flow that touched it and found none. The rule is now written into my global agent config so every future session sees it. I also added logging for the speaker's availability, without an alert, so a longer stretch of idle data builds up on its own.

The mistake was mine, and it's a common one. I built the test around a hypothesis and never checked whether the test itself could produce the symptom. The precondition check was designed to protect me from exactly this. When it failed, I treated it as an obstacle instead of as information. The agent flagged the mismatch, and the history was one query away the whole time.

If a test can cause the failure it's looking for, a pass or a fail tells you nothing. Before running an intervention, look at the baseline it's supposed to change, and if the baseline doesn't match your story, trust the baseline.