roliHome - Room automation on the cheap

So I have allways been fascinated by smart homes and smart buildings. The main problem with most of the commercial systems is that they are waaay to expensive for a student. So I started looking toward Room automation. And after a few years of doing nothing and doing something :) this is the result. RoliHome smart room controler. Equiped with many features built using arduino, processing and Java. It can be constructed for less than a 100EUR and still has some great features. One of the main features is a presence detection. While most systems like this use moton sensors to turn the lights on/off, I use IR door sensors that actually count the number of people inside the room. That way the light wont turn off while you are sitting in front of a computer watching some videos ]:) . You can find more information on my website/blog: where you can download thi whole thing and build your own system.

Here are some pictures: The main system in a box that looks quite nice. Control application Web control And the presence sensors on the door mounted for testing.

I would realy like some comments and/or questions.

How are you counting people? Can you tell people from dogs, cats, aardvarks? If I fall asleep in the chair, will the lights shut off until I move, then turn on and wake me up? That's the kind of problem I had doing something like this......well, not the aardvark.

I am counting people with IR door sensors (one of the images above). Two IR emitters are positioned on the one side of the door, and two IR recievers are positioned on the other side. So when you come into the room or leave you trigger both sensors. And then I simply check which sensor has been triggered first.

If you are in the room and have lights turned off, they will not come on if you don't press the button. If you leave the room and return in the next 4 minutes the lights will stay off. If you come back in say 10 minutes, the lights will come on. If you come back in 4 minutes you proabably want the lights the same as they were before.

As for the cats or dogs - you can postion the sensors higher so they can't trigger the sensors.

Counting people like this has it's problems when there are a few people around, in theory there are all sorts of scenarios where two people enter at once, someone gets half way through the door then changes their mind etc.

In practice I'm not sure most of that matters in the real world.

How reliable are you finding the count?

Quite professional-looking displays BTW.


Most of the time counting people works quite nice. But at some points when two people are entering almost at the same time it can give wrong results. I fixed that a bit with shorter delay time and this delay time can still be tweaked a little. But since these are exceptions it is not that important. If the counter is wrong you can simply correct the value with a push of a few buttons. As for people entering and then going back or something like tihs - this didn't happen for now. Proabably because I normaly have closed doors and I taped a line before the sensors so when you cross it, there is no turning back ]:D .

And thank you!

Now I just have to figure out how to make some profit with this thing :) .

Very nice idea that I like implement too. I see some problems though in my case. I understand that all your doors open to the direction away from the door frames.

I have some doors that do the oposite meaning that door will cover one side sensors when it is opened. Maybe this can be solved with using two PIR sensors that have very narrow beam?

Other problem is that the door will also move through the sensor sight. Because person entering the room and the door will be quite close then maybe it is hard to make the difference between them or make difference between somebody entering the room and just opening it.

What do you think about this situation and do you have some ideas?

Anyway I'm drying to locate some PIR sensors and do some tests.

Hmmm I have never seen any doors that function like that. But maybe you could put the sensors before the doors? But proabably that wouldn't be practical.

I don't know about PIR - I am not sure it is acurate or fast enough. But some PIR sensors can detect the direction of the motion. I think that I had seen a video with arduino and a PIR sensor detecting direction of the motion (PIR sensor was from Murata - I think). And someone also said that ultrasonic sensors could be used to detect direction of motion also.

I went with IR diodes and IR receivers because it was the cheapest, very acurate and very easy to implement.

Very nice! I wonder if you would be willing to do some pranks: when there are people in room A but nobody in room B, you play some noise in room B, ghostly wails, then when people from room A go to room B to investigate, the sound stops, and now room A is haunted. The point is always keep the unoccupied room haunted so the people being fooled never find out what's going on. ]:D ]:D ]:D

You could do that - since the code and schematics are available to download on my website. So if you would like to implement some pranks, you can do that.

i cannt access the code can you please send it to me @

thank you

can i use DRF0095 be used for transmitters and receiver