Stepan Mazurov

Stepan Mazurov

I am a software engineer that loves solving complicated problems. Once in a while I solve a problem I want to document, so I’ll do that here.

Recent Posts

Making Your Hugo Blog Citable by LLMs

LLMs are already crawling your blog. Cloudflare’s AI bot analytics show GPTBot, OAI-SearchBot, and others making dozens of requests per day to small personal sites. But when these models cite your content, they hallucinate URLs, misattribute claims, and lose context. The problem isn’t access - most blogs just serve content optimized for humans and search engines, not for language models. This post covers the changes I made to this Hugo site (PaperMod theme) to fix that. ...

March 12, 2026 · 7 min · 1408 words · Stepan Mazurov

Fixing the '?' Hostname Problem on OpenWrt Access Points

If you run OpenWrt as a dumb access point, you’ve probably noticed that LuCI’s Network > Wireless > Associated Stations page shows ? for every client hostname. This is because the AP doesn’t run a DHCP server - another device (your router) handles that - so /tmp/dhcp.leases is empty and LuCI has nothing to look up. The hostnames are right there, though. DHCP packets from clients flow through the AP’s bridge, and they contain the hostname in Option 12. We just need to capture them. ...

March 9, 2026 · 6 min · 1246 words · Stepan Mazurov

ESPHome YK-H/531E Climate Component: IR Control for AC Units

Many AC units ship with IR-only remotes and no smart control interface, making home automation integration difficult. This custom ESPHome component, modernized from @iverasp’s original work, implements the YK-H/531E IR protocol so an ESP32 or ESP8266 can control compatible air conditioners over infrared. Features In addition to what was already working I added a few features to my custom YKH531E component it includes the following capabilities: Temperature Range: 16-32°C (60-90°F) Operating Modes: Auto, Cool, Dry, Fan, Heat (heat is untested) Fan Speeds: Low, Medium, High, Auto Swing Control: Vertical swing support (Corrected) Temperature Units: Support for both Celsius and Fahrenheit (Fahrenheit added!) Installation Adding the component to your ESPHome configuration is straightforward: ...

July 11, 2025 · 3 min · 479 words · Stepan Mazurov

Server to Server Authentication with Google Provider in oauth2-proxy

Server-to-server authentication through oauth2-proxy has no obvious solution when using the Google provider. There is no built-in mechanism for API clients to authenticate without a browser-based OAuth2 flow. The workaround: exchange Google Service Account credentials for a JWT token that oauth2-proxy can validate directly. Overview In order to do server to server auth through oauth2-proxy when using Google Provider, you have to do the following: ...

January 12, 2022 · 3 min · 486 words · Stepan Mazurov