Moneycontrol PRO
Swing Trading 101
Swing Trading 101

'I was tired of waking up...': Bengaluru techie builds AI-powered 'roommate' that adjusts fan based on sleep

Bengaluru software engineer Pankaj went viral for building an AI-powered “roommate” that adjusts his ceiling fan based on his sleep.Bengaluru software engineer Pankaj went viral for building an AI-powered “roommate” that adjusts his ceiling fan based on his sleep.

February 21, 2026 / 15:52 IST
AI fan tracks sleep and switches on or off automatically. (Image credit: Screengrab/@the2ndfloorguy)

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.

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.

first published: Feb 21, 2026 03:43 pm

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!

Subscribe to Tech Newsletters

  • On Saturdays

    Find the best of Al News in one place, specially curated for you every weekend.

  • Daily-Weekdays

    Stay on top of the latest tech trends and biggest startup news.

Advisory Alert: It has come to our attention that certain individuals are representing themselves as affiliates of Moneycontrol and soliciting funds on the false promise of assured returns on their investments. We wish to reiterate that Moneycontrol does not solicit funds from investors and neither does it promise any assured returns. In case you are approached by anyone making such claims, please write to us at grievanceofficer@nw18.com or call on 02268882347