Back to services

FHEM

Automate common tasks in the household like switching lamps and heating. It can also be used to log events like temperature or power consumption. You can control it via web or smartphone frontends, telnet or TCP/IP directly.

View alternatives to FHEM
Suggest edit
Open source
Self-hostable
GPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Introduction

FHEM is an open-source home automation server written in Perl and released under the GPL v2 license. It runs around the clock as a server and is commonly used to automate household tasks such as switching lights on and off, controlling blinds, and adjusting heating. It can also log event data such as temperature, humidity, and power consumption. You can control it directly through a web interface, a smartphone front end, telnet, or TCP/IP. The official website carries a "cloudfree" badge, emphasizing that it runs locally and does not depend on cloud services.

The name is pronounced without the h, starting the same way as "feminine".

Key Features

  • Broad protocol support: Covers smart home protocols, audio/video devices, weather services, online calendars, and more.
  • Automatic device creation: When data arrives from a new device, the corresponding device and logs are created automatically, and sensor charts appear right away.
  • Event logging: Events can be logged to files or databases, with support for filtering by regular expression.
  • Event notification: External programs or scripts can be called when specific events are received.
  • Timed commands: For example, keeping a light on from sunset until midnight.
  • Multiple interfaces: Plain text, JSON, and XML interfaces are available, all accessible via TCP/IP, SSL, or HTTP.
  • Modular architecture: There are currently more than 430 modules, making it easy to add support for special devices.
  • Multiple front ends: A built-in web front end (suitable for desktop and mobile, with SVG charts), plus optional FLOORPLAN floor plans, InfoPanel, FHEM Tablet UI, smartVISU, and iOS and Android clients.

Supported Protocols and Devices (Partial List)

  • eQ3 series: HomeMatic, MAX!, FS20, EM1000, FHT80b, HMS, S300, ESA2000
  • KNX, Z-Wave, EnOcean, Philips Hue, FRITZ!DECT, Intertechno, HomeEasy, X10
  • 1-Wire, Firmata, panStamp, LIRC, JeeLink, RFXCOM/RFXtrx, Wireless M-Bus
  • Weather stations: Davis VantagePro2, Oregon Scientific
  • TVs: LG, Panasonic, Philips, Samsung, Sony
  • Speakers and amplifiers: Bose, Sonos, Squeezebox, Denon, Onkyo, Pioneer, Yamaha
  • Media: iTunes/Apple TV, Enigma2, Kodi, MediaPortal, Plex
  • Alexa, HomeKit, HomeBridge, MQTT (using the built-in server or an external one)

For the full module list and detailed descriptions, see the official commandref documentation.

Target Users

  • Users who want to build a local smart home hub without relying on cloud services
  • People with devices from multiple brands and protocols at home who need to manage them in one place
  • Tech enthusiasts who are willing to configure things by hand and know a bit of scripting

Technical Requirements

  • A server that runs 24/7, such as a NAS, Raspberry Pi, PC, or Mac mini
  • A Perl interpreter, and usually the Device::SerialPort module as well
  • Hardware to connect sensors and actuators, such as a CUL, EnOcean, or Z-Wave USB stick

Installation and Deployment

  • Debian / Ubuntu / Raspbian: Install the official .deb package. For better system integration, use the debian.fhem.de repository, which also offers daily builds.
  • Unix / macOS: First install Perl and Device::SerialPort (sudo cpan Device::SerialPort or apt-get install libdevice-serialport-perl), download and extract the tar.gz package, then run perl fhem.pl fhem.cfg in the extracted directory.
  • Windows: Follow the Windows installation guide in the official Wiki, or install it the Unix way inside Cygwin.
  • Containers: Docker, Kubernetes, and Podman are supported, with the image ghcr.io/fhem/fhem-minimal-docker.
  • Trying it out: Run perl fhem.pl fhem.cfg.demo to load the demo configuration.

Notable Points

  • It follows a continuous development model, in which an official release is just a starting point for updates. The project recommends using the built-in update command to get the latest version, and you should especially update before reporting problems in the forum.
  • It offers commandref reference documentation, a Wiki, a forum, and a getting-started tutorial that requires no hardware. The community is mainly German-speaking, but questions in English are also welcome.
  • The project is developed by Rudolf Koenig and numerous module maintainers, and is supported by the non-profit association FHEM e.V.
  • Deployment on newer Fritz!Box models is not officially recommended.