惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
小众软件
小众软件
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
博客园_首页
T
Tailwind CSS Blog
The Cloudflare Blog
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
P
Proofpoint News Feed
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
D
Docker
Microsoft Azure Blog
Microsoft Azure Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I lost my TV remote, so I built one with an Arduino
Ankit Agrawa · 2026-05-12 · via DEV Community

Ankit Agrawal

arduino web ui for mi tv remote

So, yesterday my primary TV suddenly stopped working, it's a Sony Bravia. What happened?… well god knows… and believe me, sony has no clue even after being on a call with them for over 30 mins!

I had to try out Spider-Man 2 on my PS5; and I know I am way too late in doing so.

But anyways, I needed a screen and so I connected to the TV in my room and turned it on but I had no remote to change the input to HDMI3. I looked and searched and found but no luck!

Xiaomi has a Mi Remote app and so, I could have used it but for that it had to be connected to wifi but I constantly (every month) rotate my wifi creds and this model (Mi TV 4A 43 inch) of Mi TV had no Bluetooth and so, this app was also a fail.

This is when it hit me… why not connect the IR blaster to my d1-mini and simply program it so that I can send commands using serial monitor and connect it to the wifi. So, I first asked Claude to just add a command to simulate the power button such that when I send “p” using serial monitor, it sends the relevant pulse using the IR blaster and it didn’t work! I tried some more codes that I found on the internet for this button but still no luck!

It was not as easy as I initially thought it to be.

Anyways, next best option → bruteforce 7 common power code sets that I found on the web . I flashed this code thinking this is it. I opened serial monitor and sent the command to start sending codes one at a time. None worked!

I thought to then reverse engineer the Mi TV remote app. I mean it should have all the codes needed since it can control any mi tv. But before that I thought to use the superpower of searching the web to see if someone else has already done it and I found this: https://github.com/ysard/mi_remote_database

now, someone had already done something similar and so, now I had all the code sets needed. so, I cloned the repo then decrypted Xiaomi brand 153, model 5122 via their Python exporter in flipper zero format then extracted the raw mark/space microsecond timings at 38 kHz.

Now, this led me to discover that Mi TV uses a non-standard quaternary protocol (4 different space lengths: 578/867/1147/1428 µs).

Next, I flashed 3 commands → power, volume up and down.

All 3 worked!

Next, I added all the commands from a remote like navigation keys, back button etc and then used this to connect to my wifi. This TV, now I could control using the Mi Remote app as well since it was on the same network as my phone.

The next time I change my wifi password, I would again need this “gadget” and so, I created a web-ui for all the buttons of a remote and hosted a tiny server on this d1 mini.

Here is the code file if you need it:

https://drive.google.com/file/d/1INZLRXr2k0VmKKlSUtJZjiqaEJE04-5M/view?usp=sharing