EnOcean via Homegear

Tags: #<Tag:0x00007f6ce5279da0> #<Tag:0x00007f6ce5279af8> #<Tag:0x00007f6ce52799b8>

(Andreas) #1

Right now (September 2017), there is no native OH2 EnOcean binding available, which is due to some license issues (as discussed here). As I used to use FHEM, which supports EnOcean without any problems, my workaround so far has been to use FHEM’s MQTT bridge in order to pass EnOcean signals/states to OH2. However, I would like to completely avoid using FHEM.

Recently, I set up Homegear in order to incorporate my HomeMatic devices into OH2. That worked flawlessly, including auto-discovery. While informing about Homegear, I read several times that the software is also supposed to support the EnOcean protocol. However, if you do a Google search for ‘Homegear EnOcean’, you basically don’t find any information about setting up the whole thing. The official Homegear documentation at www.docs.homegear.eu doesn’t even mention EnOcean at all. However, over at a German speaking forum, @sathya and @pmayer helped me to set it up. At the end of the day, using Homegear in order to get EnOcean support in OH2 isn’t that complicated at all. It even features auto-discovery in Paper-UI.

The following short tutorial is meant to be a first introduction for all users who are struggling with the current situation regarding EnOcean. It’s pretty brief and is mainly based on the introduction of @sathya and @pmayer.

Step 1: Installing Homegear

@ThomDietrich’s openHABian distribution for raspberry pi makes installing Homegear quite easy. Just use his configuration tool and you should be good to go.

sudo openhabian-config

As an alternative, you can follow the official instructions on the Homegear documentation website. Here you’ll find instructions for different operating systems. Make sure that you install the EnOcean family module after installing the main Homegear components.

sudo apt install homegear-enocean

​Step 2: Set up your gateway

The EnOcean protocol will be set up via a configuration file at /etc/homegear/families/enocean.conf. This file is pretty staightforward. It contains three settings:

  1. Gateway ID
  2. Device type
  3. Interface device name

If ​you are using an USB 300 stick or an EnOcean Pi 868 GPIO (as I do)​, you should be good to go.​ My enocean.conf file:

sudo nano /etc/homegear/families/enocean.conf

--------------------------------- EnOcean ---------------------------------

#[USB 300 / TCM310]

# Works with any device using EnOcean's TCM310 module.

## Specify an unique id here to identify this device in Homegear
## After devices are paired to Homegear don't rename the interface
## as the ID is used to assign it to the peers!
id = EnOcean_Pi_Gateway

## Options: usb300
deviceType = usb300

## Device name of your interface
device = /dev/ttyAMA0

Using the EnOcean Pi 868 GPIO, you need to set up the serial port. You can use the openhabian-config tool, again.


After these steps, if your gateway is not working properly, you may want to think about freeing up the serial line and enable UART. You can follow these instructions: Free Up Serial Line and Enable UART. Don’t worry about HomeMatic, it’s the same process.

Step 3: Pair your devices

First, log into Homegear.

sudo homegear -r

If you are not familiar with Homegear, simply type help.

In order to pair your EnOcean devices, you need to select the EnOcean family module. ls will list all device families that you previously installed (see above). With fs 15 you can select the EnOcean device family. Again, help will list all device familiy specific commands. With peers create you can pair your devices.

pc help brings up the concrete syntax for this command. You basically need three pieces of information.

  1. Your gateway ID (that’s what you set up in /etc/homegear/families/enocean.conf).
  2. The EnOcean Equipment Profile (EEP) of the EnOcean device that you would like to pair.
  3. The device address. This is usually some kind of serial number that you’ll find on your device.

General syntax:

peers create <Interface-ID> <EEP> <Address>

In my case, I do have a bunch of Hoppe SecuSignal FHFS-vw window handles (EEP F61000) as well as an Eltako FT55-rw switch (EEP F60201). That is, the commands to pair a window handle and the rocker switch may look like this:

pc EnOcean_Pi_Gateway F61000 01A93E7E
pc EnOcean_Pi_Gateway F60201 FEF9EB23

After pairing your devices, ls will list all your devices.You may find the column ‘name’ to be empty. You have the possibility to apply some telling names to all of your devices within Homegear, which I highly recommend. It will make your life easier further down the road. You can do that with peers setname or short pn.

pn PeerID Name

For example, you can see my devices after I paired them all:

Step 4: Incorporate it all into openHAB

Using Paper UI, this step is quite straightforward.

  1. Install the HomeMatic Binding (YES, HomeMatic!)

  1. Go to your inbox and scan for new HomeMatic devices

  1. Go to Configuration/Things in order to configure your devices.

That’s it. You’re good to go :slight_smile:

Any suggestions for improvements? Let me know!

Proposed Enocean implementation
Set up EnOcean Hoppe SecuSignal FHFS-vw window handles (EEP F61000)
[SOLVED] Raw state transformation
(Patrik Mayer) #2

This is great! Thank you very much for the write-up. Especially the opehabian part on freeing up the serial port ^^

These are the same steps as for the HM-MOD-RPI-PCB described in the docs: https://doc.homegear.eu/data/homegear-homematicbidcos/configuration.html#homematic-wireless-module-for-raspberry-pi-hm-mod-rpi-pcb
Obviously your described way using openhabian is far simpler than editing the files by hand.

If you have time, maybe you can write the openhabian part over at the homegear forum in german?


( ) #3

Hey @KraxelHuber, great article. I’m sure you are not the only one that will benefit from this possibility :smiley:

Hey @pmayer, what are you thinking about? If it is a posting about openHABian and it’s options, I could come up with something :wink:

(Patrik Mayer) #4

Hey @ThomDietrich,

thank you for your reply.

In the first place we encounter much problems in the community to free up the serial port to use the mentioned HM-MOD-RPI-PCB or the EnOceanPi-Module or Razberry (e.g.). That’s what I asked @KraxelHuber about :slight_smile:
Homegear will get a Z-Wave module in the next months.

But in general, a write up on how to install openhabian would be great! I already wrote a beginners guide on how to install raspbian: https://github.com/codmpm/node-red-contrib-loxone/wiki/Anfänger%3A-Installation-RPi%2C-node-red%2C-nodes and basic guide about homegear and it’s possibilities: https://forum.homegear.eu/t/Grundlagen-Homegear-Starter-Guide/1143
The installation guide has a more node-red context, but the parts to get the system on the sd-card an do the first steps, including basic shell/linux-knowledge, will remain the same.

But I have to admit, that the biggest part for most people is the connection between the different software products. This is where openhabian steps in, of course with the very simple solution to get the different communication ports running :+1:
@sathya tries what he can to document the possibilities of homegear but naturally his time is limited. In combination with openhab homegear is a strong companion through the complete implementation of the homematic protocol including auto-discover and “translating” all it’s communication possibilities to this protocol. Same as with mqtt, what I love it for :wink:

So, every contribution is welcome. Let me know if I can support you in any way.

(Andreas) #5

I attached it to our earlier discussion at https://forum.homegear.eu/t/EnOcean-Pi-868-GPIO/1450/6

(Andreas) #6

Well, after successful setting up EnOcean, I am struggling with the raw states for the window handles, that will be transmitted from Homegear to openHAB 2. If there’s a solution to this Problem, I will incorporate it into this tutorial.

The issue is described here: [SOLVED] Raw state transformation

(Ferry) #7

Great work Andreas.

My window handle is working well.

I only get my FUD61NPN-230 not connected.
How do I associate this with the homegear?


(Andreas) #8

I don’t know this device, sorry. However, it might be helpful to ask here: https://forum.homegear.eu/. Maybe somebody is able to help you.

Let us know, if you succeed!

(Marcel Hell) #9

I do have homematic gear installed in homegear and openhab2 and everything works well. I also installed a USB300 stick for enocean devices and am struggling to pair a PTM200 switch… It does not have an EEP profile.
Has anyone managed to get this working? I am completely new to enocean, so any help would be highly appreciated!


(Patrik Mayer) #10

Have a look over at the homegear forum: https://forum.homegear.eu/t/Pairing-NodOn-Enocean-Einbaumodul-2-Kanal-D2-01-12/1487

Maybe sathya can help out there.

Also see page 14 here https://www.enocean.com/fileadmin/redaktion/enocean_alliance/pdf/EnOcean_Equipment_Profiles_EEP_V2.6.3_public.pdf

(Bernhard Geis) #11

Thank you for the description. I tried to follow your instructions to add a EnOcean USB stick. The family “15” does not show up in the Homegear family list even the subfolder “15” is in the folder “devices” … instead family “254” show up in the familiy list.

The following USB devices are listed:

I assume the USB device on /ttyACMO0 is the Z-Wave USB stick and the USB device on /ttyUSB0 is the EnOcean USB stick
The GPIO module for Homematic works fine but the EnOcean does not
I’m using Openhab2 and Homematic show up there (twice)

with a 4 channel switch
and the Z-Wave USB stick also shows up as "Z-Wave Serial controller"
but the EnOcean USB stick does not show up

Could you please help?

(Bernhard Geis) #12

now it works after I changed two lines in the enocean.conf

I changed line
#[USB 300 / TCM310]
[USB 300 / TCM310]
(I did not question the instructions and therefore forgot to remove the “#” in front of the section line)

… and changed line
deviceType = usb300
deviceType = tcm310

one of the two or both changes fixed the problem

now the EnOcean switch works and show up in OpenHab … as Homematic device (instead EnOcean device)
… the EnOcean USB stick (Gateway) does not show up
… anyway it seems to work

(Mischu) #13

Hi All.

I got it run with homegear but i can’t see any device. I mean OH2 does not find any device.
with PC TCM310 EEP MAC i was able to put in all devices.
I just followed exactley these steps. But i i didn’t got it run.
When i check the homegear log i see all the actions of my actors / sensors.
Do i have to install the homegear gateway as well or something else ?
I tought this is not necesary because its all on the same device.
I am Running openhabian with OH2.2 on rp2 with enocean PI.

(Mischu) #14

I got it.

I had to add in manually in the binding the local ip address:

Callback Network Address & Gateway Address as

Then the Enocean Devices popped up emediatly.