MisterHouse is an active, community-driven, open source home automation project
Configuration
In the mh-samples.rgz
file, I've loaded a default set of parameters that should allow you to get MisterHouse up and running without errors. Understand that not everything in MisterHouse is enabled, only a small subset. The default private INI file for MisterHouse is ~mh/misterhouse/bin/mh.ini
.
To make sure MisterHouse uses the correct mh.private.ini
file, set the shell variable mh_parms
to its path (export mh_parms=${HOME}/local/mh.private.ini
). Using the private INI file I have provided, you will find that its default settings will allow MisterHouse to start up (see the abbreviated mh.private.ini
in Listing 1). You can experiment later with the other values.
Listing 1
A Section of mh.private.ini
Lines that begin with a #
or @
are considered comments. Any parameter found in the mh.ini
file can be overridden in the mh.private.ini
. $Pgm_Root
is an internal MisterHouse variable; the gd
and tk
variables should be left set to 0
(turning off the use of the GD and TK libraries). The http_port
file should be changed only if you need to use a different port for the MisterHouse's HTTP server. The rest of the variables are there for you to experiment with.
Now It's Time to Play!
To start up MisterHouse, as user mh
, type:
cd ; ./start.sh
If no errors occur, MisterHouse will start spewing information to the terminal.
Next, open a browser and type the following URL into the address bar: http://IP_Address:8080/ (replace IP_Address with the MisterHouse server's eth0 IP address). Figure 1 shows the main web page for MisterHouse.
No article can do justice to what MisterHouse can do. I will get you started, give you brief introduction, and then give you something to work with. Fortunately, MisterHouse comes with documentation: http://IP_address:8080/docs/index.html.
In the MisterHouse main window (Figure 1), the most important link is the top left MisterHouse button. This button will return you to the home page. The next important button is the MisterHouse Home button. This button will take you to the administration and configuration page, where you can configure, monitor, and enable/disable the various code modules included with MisterHouse (MisterHouse Home | Setup MisterHouse.
Note the lavender status line at the bottom of the page in Figure 1; 115, 86.9F Partly Cloudy, and North @ 0 mph wouldn't be the values on your system. In my home setup, that information is pulled from a Rube Goldberg set of scripts I built for experimenting with. I've simplified everything for this article. In a moment, I'll introduce you to the command-line tools to mimic the data sent by my experiments and instead use MQTT to fill in the status bar information.
User Code
Your user code tells MisterHouse what you want it to do. The code resides in the local/code
directory. The filenames you choose can be anything; the only stipulation is that the code inside must be valid Perl and must have .pl
as the file extension. One exception is the .mht
file (MisterHouse table). When MisterHouse starts up, it reads in the xxx.mht
file, converts it to Perl code, puts it into a file called xxx.mhp
, and loads that file. This .mhp
and other .pl
files will be run as Perl code in MisterHouse's main loop. Code that you don't want to run in the loop, such as code for loading a module or initialization code, will be bound by the # noloop=start
and # noloop=stop
lines. More on that later. In the examples below, I've created two files called example.mht
and mqtt.pl
. The example.mht
file sets up the needed Perl objects, and mqtt.pl
uses those Perl objects to make decisions.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.