Anth's Computer Cave

Download and use QuickFloor Base

8th April 2015

Today I will show you how to download QuickFloor Base and import your floor plan to use for home-automation GUI programs.

What is QuickFloor Base?

If you have read the first two articles you know that QuickFloor Creator creates a floor plan of your home, but what does QuickFloor Base do?

QuickFloor base imports that floor plan to provide a full GUI base for your home-automation programs. It is intended to run on the Raspberry Pi connected to your TV, giving you full control of your home's systems from your coffee table.

QuickFloor is open-source so you can modify it to suit your purposes and share the code.

Getting started

When you first run QuickFloor Base you will be asked for a floor plan file to load. This will be the floor plan you made with QuickFloor Creator in last week's article.

I am using sample_house.dat, the demonstration plan I created in that article.

Once your floor plan loads you can add some home-automation devices. In this initial version you can add any device you want as long as it is a relay. The next version will also support a variety of sensors.

Click Device Type and select relay.

You will need to enter a room, a device name, and x and y position of the device.

Below I will add a relay to Bed1 called bedLight. Note you will need to use the same device name in any of your programs you import later.

Length One is the distance from the west wall of the room and Length Two is the distance from the north wall.

There is our bedroom light, now I will add one called hall1 to the northern end of the hall.

Length One is .75 of a metre to centre the light, and Length Two is two metres.

Now I'll add another light called hall2 to the southern end of the hall by using a Length Two of seven metres.

Next I'll add a light called loungeLight to the centre of the lounge.

I'll also add one called kitchenLight to the centre of the kitchen.

Lastly I will add a light called bathLight to the centre of the bathroom

There are all my lights. Look what happens when I click my mouse on the lounge light.

The light changes from grey to orange to represent "on".

Clicking the kitchen light sets that to on, also.

Click the light again and it will revert to gray, or "off".

Note that all the program is doing is setting an on-off variable for each light and changing colour accordingly.

Later I will show you how to import a simple relay-control module and control lights in the real world.

First, though, we need to save our devices configuration. We do this by saving the project to a new file name. This will become the file you load every time you use the program.

There is no save button. Turn the GUI off but leave the Idle shell running. At the prompt, type save("save_name.dat"), substituting save_name with your prefered title. Be sure the name ends in .dat and is inside quotating marks.

In the example below I am naming my file "sample_base.dat".

Press Enter and close the Idle shell.

Now you can run again.

Enter your new save name (this time without the quotation marks) and click Load. You should see all your lights ready to go.


You now have QuickFloor Base configured with your floor plan and all of your lights.

In the next article I will demonstrate how to write and import a simple relay-control module. I'll cover the connections on the Raspberry Pi and show you how to control real 240V lights from your QuickFloor GUI.



Previous article: Download QuickFloor

Next article:Use QuickFloor Base to control lights



Leave a comment on this article

Leave a comment on this article