Archive for the ‘My home’ Category

I think I am comming to saturation with Angularjs for HooooH now. I am starting to see the problem areas now. Things that take a lot of tweaking and hacking to accomplish with Angular js. One such recent one was while adding local storage to application, another one was while working to make HooooH pick up local data configuraiton when starting and than once the app is up and running, sync data.

I had been using my own public ip address inside the angular controllers until now to access HooooH from the internet/outside. But I recently moved to 40 MBps fiber internet connection. The problem with the new ISP is they do not provide NAT on the public ip address. Hence the whole access mechanism broke. So now I have moved to Amazon EC2. This works with a reverse tunnel straight to the pi, I have also implemented google dual layer ssh authentication module for ssh and google oauth for HooooH access. So, currently the only way for the site to get hacked is if someone hacks into google oauth. But then I will have bigger worries to panic about 🙂 if that happens.

Also I have been evaluating push bullet for notifications. Its such a wonderful product. But I am not sure, how far I would like to integrate with it at the moment.

I have finally migrated to bitbucket for HooooH code. I actually begun with svn that was hosted inside the rasppi itself. Then moved to github, then to sourceforge and then back to local git server. But now i have finally moved to bitbucket. Awesome service and features.

I also let go a lot of history code changes. There was such a shit load of code changes that was eating up space. Actually, I realised Hooooh has come such a long way since its humble beginnings.

Have been quite busy trying to create an Android app for HOOOOH. Decided to stick to webviews so as to shroten development overheads. Dont think its easy. Have been trying to create an ecosystem from ionic, crosswalk+cordova, websockets. Have been having more trouble trying to keep up support for android 4.2 and below. Why old phones support? well most of hte cheap tablets on market today which can serve as good consoles are all pre 4.2 androids. Plus my phone is an HTC incredible too, so wonder how many from the common men and households will have one of today’s costly android devices.

HOOOOH 1st version is now ready. 3 years of work. Here are the features:

1. Control all electrical devices around the house like lights, fans, motor, calling bell etc.

2. Take intelligent decision on when to switch on and off devices, based on environment, time, motion, light, temperature etc.

3. A whole gamut of sensors around the house feed its senses. Some examples are temperature, motion, light, etc. Now with camera integration done, soon even image recognition for people and objects around the house will become part of its sensory inputs.

4. Video security, with motion and people detection via camera around the house. Also live video streams can be watched.

5. The whole system is available over the internet, so I can keep an eye on the house from anywhere in the globe, including live video feeds.

6. Public and local access is protected by google dual layer authentication and complete ssl access. Every component that needs to be accessed over internet can be individually enabled/disabled for security. This is done via gtalk integration where I can talk with the system and ask it to enable disable components. The gtalk integration is in turn locked down.

7. A complete suite of alerting is integrated and enabled, such that even if I am not home and someone comes to the boundary gates, I get to know (And see via camera feeds).

The whole system is built with following technologies:

1. Hardware:
a. Xbee’s
b. A lot of other off the shelf electronics.
c. Raspberry pi- about 4 of them.

2. Server:
a. The server side is completely written in Python.
b. All server components run inside a raspberry pi. Complete low-power solution. I have been running the Raspi for over a years, 24 hours a day.
c. the webserver runs on Tornado/nginx architecture.
d. Frontend is web based. User Angular/Bootstrap. The system is available on any phone, mobile, tab, computer etc with a browser. Ofcourse, a decent browser is required.
3. The code is written in complete async model so that, the updates are real time. It works like a real time application dashboard.

Myth busted. I am running 23 xbee’s now on the same channel. There is a little noise, but not devastating as suggested in professional forums. Ofcourse I had to do a lot of tweaking, to achieve this. I re-did all my Python code, Pradeep re-did the whole PHP code. In short a complete asynchronous model running off Redis. Its awesome, what my little home automation project has become now.

Currently working on data mining, computer vision and learning and speech integration into the project. Oh yes! whole home audio, video integration done too. My small home automation is turning into a butt kicking awesome system.

As promised I am actively working on the wiki and open source details for my Home Automation project. Soon I will be posting about them. But right now, here is a teaser and a very high level overview of the system that I have developed.

I moved the whole system from mysql to REDIS. It has had its share of pro’s and cons. Mysql was more flexible when it came to searching data from the database. Redis sucks at this front, only direct access allowed or you have to loop through your data structures to match/find data. But other wise performance is very very high, and the no. of lines of code have decreased by about 50 %.

Moving to redis also meant that I had to recode all core modules. It took me 2 weeks to re-code. Its done but still has a few glitches, like the “on/off” system has trouble with threading model I am using now. Check_request wont run at all in background. But runs well in fore-ground. Will fix it tonight.

I finished implementing the temperature sensors, I used LM 35 as they were the only ones available. Still need to attach the xbee’s in Bedrooms and bath rooms. Also need to attach the door and water sensors. Need to modify code so that it dynamcially reconfigures XBEEE pin information and new xbee’s coming up. And need to enable 128 bit encryption on the xbees for security.

I end up working until early morning, yet its so little time. Only if I could work whole day on my project !