Anth's Computer Cave

AAIMI Home Automation Tutorial Hub

Use the buttons below to read all of the AAIMI Home Automation tutorials.

New features in AAIMI Home Automation 0.9

13th February 2018

The main AAIMI Home Automation web GUI. Picture: Anthony Hartup
The main AAIMI Home Automation web GUI. Click for larger image.

The latest version of AAIMI Home has a new configuration GUI and new data and settings structures. There are also new custom room and devices options, including general-purpose sensor and relay switching and monitoring from the main control-interrface.

New config GUI

You can now add all your rooms, sensors, relays and heating/cooling devices in the new browser-based configuration window.

The configuration GUI to add rooms and devices to AAIMI Home Automation. Picture: Anthony Hartup
The new AAIMI Home Automation configuration GUI.

You can create default room-types with PIR sensors and/or light sensors and relays, or you can create empty custom rooms and add your own devices to suit your needs.

Adding relays is easy for heating and cooling devices, entertainment centers or coffe-makers, etc.

You can add themostats and set upper and lower switching levels for your desired temperatures. Add a smoke detector and you can choose options to react to smoke or gas events.

Add as many custom analog sensors or high/low digital sensors as you want and set actions for sensor events, like switching relays, sending email alerts and logging events to file.

The right-hand column displays instructions and tips as you add rooms and devices

The help column to provide tips while adding rooms and devices to AAIMI Home Automation. Picture: Anthony Hartup

You can view details for your existing rooms or devices.

The details for a room in AAIMI Home Automation. Picture: Anthony Hartup

You can also view a list of available GPIO pins on the Raspberry Pi and Arduino, and enable/disable program features.

The options for enabling features in AAIMI Home Automation. Picture: Anthony Hartup

Options include sound, Internet, GPS and incoming/outgoing email.

The config GUI lives in an admin-only area, meaning none of your housemates can mess with your configuration.


Control center

We've made major improvements in the main control and montioring GUI.

You can view and switch all relays in each room, and monitor custom analog and digital sensors.

The details for a room in AAIMI Home Automation. Picture: Anthony Hartup

Click on a thermostat in a room to change switching levels for heaters and coolers.

There are new scheduling options, including Cyling schedules that can repeatedly switch on and off at intervals. We've modded the Alerts column to make adding and removing alerts easier.


Data

We've completely revamped the long-term data structure.

It now stores data for the custom sensors and devices, and also keeps access records and IP addres history.

There are tools to archive older data. I have almost 830 days' of comprehensive data from my home and the large file was taking way too long to load and save on my humble model B Raspberry Pi. Now I can archive the data each month and keep the live data file small.

The new Python home-data analysis GUI merges the current and archived data on the fly on your real PC to view your home's long-term stats.

Viewing long-term home data in AAIMI Home Automation. Picture: Anthony Hartup

We've removed the floor-plan from the Python GUI. It took some time and effort for users to create their floor plans, and it wasn't something many users required. We'll probably add this back later as an optional feature.


Program settings

There are no longer any hard-coded program settings, they all live in a single JSON file that loads on program start. This was long-overdue.

It means you should never need to open any code files, and all settings are persistent across restarts.

It also makes it easier to upgrade to a newer version later. You simply move the settings file from your old installation and it resumes where it left off.


Under the hood

There's a new Python script, aaimi_home_config.py, that works with the configuration GUI to populate the settings file and create entries in the data file. It is called via PHP system() when the user submits a new device or setting change.

This has removed tons of code from the main program, aaimi_home_control.py. With the new settings structure there are also fewer hard-coded variables and arrays now. Overall the code is much easier to work with.

We've ditched the serial control module, aaimi_serial_control.py, which controlled the Arduino. These functions are now in the main code.

There are also fewer program files in general.

We've merged all encrypted user password and RFID card UID files. We've also merged the various files the Javascypt and PHP use to display details in the browser. There is now just one file for all room details, and one file for all program details, schedules, devices and settings.

The setup wizard, aaimi_home_setup.py, now also configures the external modules, AAIMI GPS Mapper and AAIMI Server Dog.


Article series

As always with a new release we have a full series of articles covering the setup and use of AAIMI Home Automation.

In this first article we've covered the new features, and in the next article we'll cover our slightly mad prototype hardware. After that we'll download and configure AAIMI Home Automation.

Cheers

Anth


Previous:

Next: Hardware Recap


_____________________________________________


Comments

Leave a comment on this article