LightLog.status

- Ideia: know when a room is being used and make a log of how much was used.
- Why: This is for a room used by several people, but they can only use if someone from the administration is there to open the door (aka inside the room). Then I’ve this idea for a system that warns/tell users if there is anyone on the room.
- Resources: I only used what was available in that room and that’s was an old webcam and an old pc.
- Location: Room (in basement, so you need to have the light on every time you use)
I already had some basic’s about python and I never use openCV, so this project was all an excuse to learn a little more.
Tools: Python (w/ openCV) + Bash + Twitter + iOS Notification + GoogleCal
Python (w/opencv) | https://www.python.org/ | http://opencv.org/
Logs & Notification (Twitter), iOS Notification (Prowl), Calendar (GoogleCal):
- I was already using all this programs on my system, so I used all the tools that I already made (so just an interaction with my bash script)
Crontab - Since is an old pc, I made so it check/run every “x” minutes.
The result:
- Render the img from the webcam, using a threshold that transforms the picture in black & white and then I make a 3 regions, 2 for control and one for the whites.

- Post on Twitter (so other people can use the “notify tweets” & for backups) [on & off]

- Notify on my Phone (using Prowl Api) [on & off]
(on the alphas versions, I used this as my main notifications system… but since I already added Twitter notification, maybe I’ll remove it. Plus on Twitter everyone can get notifications without adding any others config’s )
- Add a event with the time that the light was “on” on Google Cal
[action on “off”]

- Copy and send a “small file” to an SFTP on my university server where I use that info on a small page on that same server [on & off]
- - Page: using simple HTML, JS for the “request the file” , and CSS for the animations and styles (*img from the top)
For the future:
- I would like to add all logs on a database
- make a website where it have all the information’s in on place like:
- - status ( on/off ) ,
- - logs ( list of all events ),
- - consumes: total time “on” and total energy cost
I also would love to add a “eco” section where you can test the data with different kinds of types of lamps)