Hi, I'm Cosmin
Software tester by day, tinkerer by night. I write about test automation, 3D printing, microcontrollers, and making my home smarter one hack at a time.
Latest Posts
Four parallel Playwright workers turned a discovery-first test suite into a denial-of-service tool — GET /orders returned 502s within a minute. The fix used no lock server or reservation service: lazy worker-scoped fixtures to stagger the load, and one line of Euclidean modulo to fan workers out across distinct entities.
Discovery without a meltdown: a bounded find-an-entity helper for live test environments
Jul 9, 2026A naive test-data finder is a load test in disguise: it pages the whole list and fires a per-entity GET for every row, all at once. pagedFind makes every cost dimension of the search an explicit, named bound — and its counters tell you where the funnel died when it misses.
A living reference for adapting the ESP32 local inverter control build to other brands: what transfers as-is, what changes per brand, where to find register maps, and the quirks that bite.
My heat pump was invisible to the inverter and my EV charger was confusing it. Moving one CT clamp fixed the first problem with zero software; a small Home Assistant automation driving the part 1 ESP32 fixed the second.
Stop hardcoding test IDs: discovery-first test data with a ScenarioResolver
Jun 12, 2026Hardcoded entity IDs go stale the moment someone reshapes your shared test environment. I banned them: every spec names the shape of data it needs, and a ScenarioResolver finds a real entity at fixture time.
Automated Playwright Authentication with Microsoft SSO Push Notifications in CI/CD
Dec 30, 2025Security said no to TOTP, no to service accounts, no to disabling MFA. So I built a solution that uses OAuth2 refresh tokens to maintain Playwright browser sessions in CI/CD—without ever triggering push notification MFA after the initial setup. Here's the COSMIC Auth Pattern.
On the Bench Right Now
last reading: · 5 days ago
Featured Article
Taking back your inverter: local control with an ESP32 (part 1)
Wire a cheap ESP32 and RS485 transceiver to a Growatt SPH5000 inverter, flash ESPHome, and get a local Modbus web UI for monitoring and control — no cloud, no app.
// Read inverter registers via Modbus RTU
#include <ModbusMaster.h>
ModbusMaster node;
node.begin(1, Serial2);
uint8_t result = node.readHoldingRegisters(0x0006, 2);
if (result == node.ku8MBSuccess) {
float power = node.getResponseBuffer(0) / 10.0;
Serial.printf("Current power: %.1f W\n", power);
}
The ESP32 reads holding registers over RS485, parses the response, and publishes structured data to MQTT. From there, Home Assistant picks it up and I can build dashboards, automations, and alerts all running locally.
read the full build →