A Bengaluru techie has gone viral for creating an AI-powered “roommate” that automatically adjusts his ceiling fan based on his sleep.
Software engineer Pankaj, known as @the2ndfloorguy on X, explained that he was “tired of waking up at 3 am either sweaty or freezing.” To solve this, he trained a system to monitor his sleep posture and control the fan accordingly.
If his arms or legs stuck out from under the blanket, the AI interpreted it as feeling hot and switched the fan on. If his arms were curled up, indicating he was cold, the fan turned off.
The setup uses a remote button pusher that physically toggles the fan switch after receiving commands from the system. A MediaPipe pose vision model running on his Raspberry Pi detects his sleeping position in real time and triggers the fan. Pankaj called it “what a real smart home looks like.”
An accompanying image showed a bedroom with a camera overlay marking body joints and a label reading “FAN_ON ratio=2.32,” demonstrating how pose detection guided the system.
i was tired of waking up at 3 am either sweaty or freezing. so i taught my ai roommate to automatically control the fan by watching me sleep 📸arms or leg sticking out means i'm hot so fan turns on, arms curled up means i'm cold so fan turns off. it uses a remote button pusher… https://t.co/WYkbbcVoVHpic.twitter.com/slpENOzX9I — Pankaj (@the2ndfloorguy) February 20, 2026
The project gained widespread attention online, with users praising its ingenuity. One wrote, “You are building solutions every other day like they are a piece of cake! Total out-of-the-box thinking and great use of tech.” Another joked, “Your AI roommate does more for you than most actual roommates.”
Many users appreciated it as a clever, practical AI application—more than just automation, it’s a personalised comfort solution. Some even asked for a tutorial or a GitHub link to recreate it at home.
Discover the latest Business News, Sensex, and Nifty updates. Obtain Personal Finance insights, tax queries, and expert opinions on Moneycontrol or download the Moneycontrol App to stay updated!
Find the best of Al News in one place, specially curated for you every weekend.
Stay on top of the latest tech trends and biggest startup news.