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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.