AAIMI Home Automation 0.4 knows who's home
5th December, 2015
This article covers an older version of AAIMI. Click here to see the current article series.
The latest version on the AAIMI Home system has many new features and capabilities.
These include property-wide occupancy awareness, and remote-control and monitoring abilities from anywhere in the world. There is also a stream-lined GUI with automatic and manual scaling options.
About AAIMI Home Automation
AAIMI Home Automation 0.4 is the latest version of a package of free and open-source tools that monitor and control your home or business.
It is part of the AAIMI Project, which stands for Active, Artificially Intelligent Machine Interface.
This system won't lock you in to just one proprietary company or web-service. We plan to offer a variety of ways to use AAIMI, including third-party tools you may already use now.
AAIMI runs on a Raspberry Pi computer and an Arduino micro-controller, utilizing a variety of sensors and relays to control lights, heating and air-quality. Once again, you are not limited to expensive equipment from one manufacturer. AAIMI can work with all analog and digital sensors. You can even build your own components, that is what we have done.
It is designed to connect to your TV, giving you live status reports and control options from the comfort of your Lounge.
How it works
The core of the system is the final alpha version of AAIMI Room Control, build 0.49. This is an AAIMI Python module that runs on the Raspberry Pi 24/7 in a continuous loop, checking all rooms for movement, light and temperature, and reacting accordingly. Air-quality sensors like gas and smoke-detectors also work within the loop.
The program saves all movement, light and temperature data to a save-file that is available to the other programs in the suite. It also maintains a database holding current statistics that other programs can use for live monitoring and interaction.
The other major module in the suite is AAIMI Home, which provides a GUI-based control-center on your TV or computer.
I'll start with the new component that has enabled most of the new features.
The two biggest changes in this release both utilize AAIMI's new email module.
This Python module runs as a background service on the Raspberry Pi, checking the system's email account for incoming mail from your home's occupants.
There are numerous types of commands you can send by email. You differentiate these commands by the words you use in the body of the email.
Using the new email module and IFTTT, a third-party phone-app, AAIMI now knows exactly who is home at any given moment. You could utilize this information to automatically change room modes, set security levels, switch heating and cooling, etc.
This is just one of the options planned for AAIMI's occupancy awareness. It uses some third-party apps, but they are probably services you are already in with, like Google. IFTTT seems like a good system in that they don't send you any unnecessary emails or pester you. I am sure they are vacuuming up your data just like Google, but that is the world we live in.
On the bench now is a system for the privacy obsessed who do not want to use third-party tools, but the current system should be fine for many users.
You can now communicate with your AAIMI Home Automation system from anywhere in the world using email.
Once again, I want a variety of remote access options, not a one-size-fits-all approach. We've chosen an email method first because it is a safe option for less technical users. Future methods will operate without third-party tools but will require more configuration and security considerations.
So what can you do remotely?
You can monitor your home with email reports from AAIMI. This can be a simple room-by-room summary of temperatures, light-levels and last movements, and a list of people who are home. You can also get a full report with system temperatures, uptime, data-save details and error logs.
You can also activate any appliance, light, mode or setting. Eventually, anything you can do with AAIMI over a computer will also be possible using this remote method.
While this was built firstly to be a remote-access option, I am also using it for local control and system monitoring. It is definitely not what we will use for local control in future releases, but it fills the gap for now.
There is a noticeable lag, but we've tweaked that by creating two modes in the email program. By default AAIMI checks for email every 30 seconds, meaning your command can take between about 3 and 30 seconds to register. After the first command AAIMI goes to "fast" mode, where it checks every eight seconds. Subsequent commands therefore register a lot quicker, albeit still with some lag. If AAIMI does not receive an email for three minutes, it returns to "slow mode" to conserve resources.
To avoid having to type email commands you can use another tool from IFTTT, the DO button.
You can set up buttons for your most common commands and place icons on your smart phone for one-click control.
You can now schedule tasks for AAIMI. Tasks can be one-time, hourly or daily.
The list of default tasks in this release is limited, but there are lots more on the way. You can easily add any existing AAIMI functions, or your own functions into the tasks list with a few lines of code.
Coffee machines, watering systems and pool filters are just some of the things scheduling can control. With electronic locks you could lock all doors and gate automatically each day. You could also set lights and radios to periodically switch on to deter burglars while you are on holiday.
You can now set light-switching levels on the fly for individual rooms or the entire home. Choose relaxed-mode to let the room darken further than usual, or work-mode to keep things brighter.
You can change modes via the email-control system, or you can use the previously-mentioned schedule function to automate modes for different times of day.