_blogs
// blogs / 20260706.md
// blogs / 20260706.md
Dev Log: July 06 Wrap-up
Overview
Today was a bit of a split personality day. I spent the first half tweaking my home automation firmware to be more resilient, and the second half diving back into the dashboard UI to make it feel less clunky.
What I Worked On
Keeping the hardware alive
I’ve been running a custom controller for some home automation tasks (my HomeAlone setup), and I noticed it was getting a bit flaky if left on for too long. I originally had a daily reboot scheduled for 6 AM, but I realized 10 PM (22:00) actually makes more sense for my routine.
More importantly, I added a fail-safe inactivity restart. Sometimes the connection drops or the loop hangs in a way that the hardware watchdog doesn't catch. Now, I’m tracking the last time any real activity happened—like a door being unlocked or a pump being toggled. If the system stays idle for more than 6 hours, it’ll just trigger a reboot. It's a bit of a 'brute force' solution, but in the world of IoT, sometimes a fresh start is the best debugger.
// Simple heartbeat check
void performAction() {
lastActivityTime = millis();
// ... execute hardware logic ...
}
// Inside the main loop
if (millis() - lastActivityTime > INACTIVITY_TIMEOUT) {
restart_device();
}
Dashboard UX and Chart.js gymnastics
On the professional front, I spent a good chunk of time in Angular fixing some dashboard annoyances. We had this global loading overlay that would take over the whole screen while charts were fetching data. It felt heavy and intrusive. I ripped that out and replaced it with individual loaders for each chart box. Now the layout remains stable, and you can see exactly which parts are still 'thinking.' It’s a much smoother experience.
I also had to write a custom Chart.js plugin to handle data labels on our bar charts. The default behavior was making labels unreadable on stacked bars. I had to manually calculate the bar height to decide whether to put the text inside the bar (in white) or above it (in a darker color).
There’s something strangely satisfying about getting pixel-perfect alignment on a canvas element, even if it takes way longer than it probably should.
Backend Observability
To round things out, I did some quick housekeeping in the backend configuration. I finally enabled the health check endpoints for things like Elasticsearch. It’s one of those "I'll do it later" tasks that I've been putting off, but having better visibility into the service health is going to save us a headache the next time a node starts acting up.
Wrapping Up
Overall, a productive day. The dashboard feels significantly more responsive without that giant loading spinner blocking the view, and I'm hopeful the IoT tweaks will mean fewer manual power-cycles in my future. Tomorrow, I’m planning to look into some query optimizations for those charts—now that they look good, I want them to actually load faster.