Anth's Computer Cave

AAIMI Home Automation 06 is here now.

1st May, 2016

This article covers an older version of AAIMI. Click here to see the current article series.

The sixth version of AAIMI Home Automation is ready for download so I'd like to announce some of the new features.

The system now has full GUI-based remote control and monitoring, as well as new user-authentication and security features. It can also work with modified multi-speed/multi-function appliances and has heating and cooling control built in. To top it off, there's even a setup wizard and installer that makes setup quick and easy.

Today I'll cover the new features. To see the existing capabilities and learn more about the AAIMI system, click here.

The main AAIMI Home control-center. Picture: Anthony Hartup
The AAIMI Home control-center.

Web-based GUI

The browser-based AAIMI GUI and control center looks just like before, but it now has full access control, meaning you choose who can and cannot access the system. This means it now has the security in place to open the system to the web, so you can use the same GUI regardless of whether you are home or away.

Up till now you could use the browser-based GUI at home on your LAN, but you needed to use the email-based control system for all tasks while you were away. Now most of those remote tasks are just a click away in your phone's web browser.

There are several layers of security in place now, and I'm working on extra layers to create secondary authentication for an admin portal. Until then, there are a couple of administration tasks that still require the previous email-based commands. These are user-related tasks like adding new users and resetting passwords, etc.

AAIMI takes care of most of the configuration, and monitors your public IP address for changes to avoid worrying about DNS and dynamic ISP IPs. It also adds external IPs on the fly for your phones and remote computers if they change. It also monitors incoming connections and blocks all unauthorized requests. There are tools coming soon to crunch server data and display details of any such request to the system column on the GUI.

All of this is plug-and-play, the only thing the user needs to do is install Apache2 and configure their router settings to allow outside traffic.

Installer and setup wizard

The new setup wizard and installer eliminates the need for any AAIMI code modifications by the user. This installs AAIMI with default settings, but you can later build on and modify the default settings. It is limited to three rooms, you'll need to manually add extra rooms.

Up till now the user had to open half a dozen large Python files and change names, paths and room names, etc. The setup wizard takes care of all that now. There are still a few things you'll need to install for your Raspberry Pi, but you can actually install AAIMI without seeing a single line of AAIMI code.

You run the wizard before connecting any sensors or other devices to the Raspberry Pi.

AAIMI prompts for your name, and email address, as well as its own email address, then modifies all relevant lines in all code files instantly.

It then asks you to add a password and creates an encrypted user file. It also sets all Linux ownerships and permissions for all AAIMI folders and files.

Next the installer determines your LAN IP address and range, as well as your web-facing public IP address. It then configures the Apache2 web-server files for password-protected access and IP filtering.

After that you enter your room names, thermostats and smoke detectors, and AAIMI once again modifies all code files for you.

Lastly, it creates a text file with a detailed connection list with the Raspberry Pi and Arduino GPIO pins for each sensor and relay in each room. You print this list or copy it to another computer, then power off your Raspberry Pi and connect all your sensors accordingly.

Once you power the Raspberry Pi back on you are ready to start the system.

This installer has made things much easier for the user, but it also makes a huge difference from my end.

Firstly, it replaces almost three full tutorials that were previously vital for the setup process. That means less documentation to write for each release. I can instead focus on tutorials covering advanced configurations.

Secondly, it leaves less room for errors. As well as creating the installer, I also made a matching de-installer for creating the install files for each release. Before I would take my tested, working program folder and go through the code changing my settings back to default. Once done, there was no way to test the program, meaning if I made a typo while finalizing the code, that may pass unnoticed. On the user end, you had to open the files and replace the defaults with your details, bringing more opportunities for errors.

AAIMI doesn't make typos, so the installed program should function exactly as it did on my system.

Heating and cooling.

AAIMI now switches heating and cooling according to your preferences. It can work with single-action appliances that can switch on at the wall switch, but it can also work with hacked stand-by and multi-speed appliances like this cave-made air cooler.

A multi-speed air cooler modified to work from the Raspberry Pi. Picture: Anthony Hartup
A multi-speed air cooler modified to work from the Raspberry Pi.

You currently need to manually configure these appliances, in the next version the installer will handle that.

The same functions that control these devices can also work with other hacked appliances like televisions and coffee makers, but in version six it is limited to climate control.

New remote sub-base features

AAIMI Sub Base is a cut-down version of AAIMI Room Control that runs on a remote sub-base to monitor separate properties, or separate areas of a property the main system can't reach.

This allows you, for instance, to install a sub-base at your office, and monitor and control it from home as if it is part of your main system.

The remote systems now use the same authentication methods as users, and they employ one-way python web requests for two-way communication with the primary system instead of running their own web server.

The AAIMI sub-base station uses exactly the same hardware as the main base station. You can run as many sub-bases as you like, providing a simple and effective method to expand your system.

The remote systems are currently manually configured, version seven will feature automatic configuration via the setup wizard.

Data display

There is more information displayed in the GUI now.

Room details displayed by AAIMI Home Automation

The room panels now show light-switching levels beside the light reading, and the time since last movement is displayed.

System details displayed by AAIMI Home Automation

The system panel now includes a last-contact time at the top to easily see that AAIMI is running. It also shows the public IP address for remote connections to your home, and lists any remote AAIMI Sub Base systems online.

New threads

I've moved several intensive processes into their own threads to smooth out program operation.

The long-term data saves are the most noticeable process. AAIMI collects a lot of data, and after seven months my data file is taking around three minutes to save. Obviously the system can't go on hold for three minutes while it saves, so that process now happens in the background.

Cheers

Anth


_____________________________________________


Comments

Leave a comment on this article