FHEM – Setup, practical use, and alternative interfaces
Alternative Interfaces
The user interface, which is fairly frugal in the eyes of many users, has been hotly debated within the FHEM scene for years. Rudolf Koenig, the founder of FHEM, was never really interested in creating a sexy user interface. Besides changing the foreground and background colors, and changing the logo, you have very few options for customizing the user interface.
A Floorplan extension (Figure 3) was created to map out FHEM objects on a 2D floor plan, visualize status messages, and let users output switching commands. As the use of mobile devices grew, however, Floorplan was marginalized due to its less than responsive design.
smartVISU
FHEM supports smartVISU, the intelligent "visualization framework for better home experience," which was originally designed to create HTML-based visualizations for home automation based on the commercial KNX system.
You can map many simple elements, such as dimmers or buttons, but also more complex components, such as a comprehensive heating control system. Users can create individual pages for rooms using standard HTML expressions. The smartVISU framework provides tags that are embedded in an HTML structure to establish a connection between the visualization and the smart home devices set up in FHEM.
In order for FHEM integration to work, some preparations have to be made on the software side. These preparations include installing the required packages – including a web server, which is usually Apache 2 (Listing 4, lines 1 and 2). In addition, you need to download smartVISU (line 3), install the files in the /var/www/smartvisu/
directory, and set the required user permissions. At the FHEM command line, you can then finally install the module and transfer it to the configuration with a define
command (Listing 5).
Listing 4
Preparing to Use smartVISU
01 $ apt-get update 02 $ apt-get -y install php5 libapache2-mod-php5 apache2 git 03 $ git clone https://github.com/herrmannj/smartvisu-cleaninstall.git
Listing 5
Setting up the smartVISU Module
01 update force https://raw.githubusercontent.com/herrmannj/fronthem/master/controls_fronthem.txt 02 define fronthem fronthem
Now you need to look at the visualization elements that represent the devices contained on the room pages. For each room, you create an HTML file, which in turn is stored in the rooms_menu.html
file (Figure 4). The individual devices are then entered in rooms.html
as the block content
. The syntax is shown in Figure 5 using a switch as an example.
It takes some hard work to map the desired objects from FHEM to smartVISU. Anyone who is not deterred by this, and is also prepared to tackle smartVISU's installation and configuration overhead, will be rewarded with a smart user interface. The interface even works extremely well on mobile devices. Step-by-step instructions (in German) are available on the web [3].
TabletUI
Meanwhile, TabletUI (Figure 6), another extensive visualization environment based on HTML, is enjoying increasing popularity. Similar to smartVISU, TabletUI lets users map information in a smart way. The GUI's focus, which can display a multitude of functions simultaneously, is – as the name suggests – tablets.
If you want to use TabletUI, first update the FHEM packages using the FHEM console (Listing 6, line 1) and then import the TabletUI module (line 2). You now need to define all the desired elements in an HTML file. The ./www/tablet/index.html
file is primarily used for these element definitions.
Listing 6
Installing TabletUI
01 update all 02 define TabletUi HTTPSRV ftui/ ./www/tablet/ TabletUI
The sample file index-example.html
, which you can copy and save as index.html
, is conveniently located in the same directory. This makes it possible to test the functionality more precisely.
Familiarize yourself with the syntax in order to establish the necessary links with the elements you wish to integrate from FHEM. In particular, the widgets in the TabletUI user interface need to be populated with the desired values (data-get
), and the switching commands need to be sent to FHEM (data-set
).
« Previous 1 2 3 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
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.