openHAB 2 Enigma2 Integration with HTTP binding

Hinweis: Diese Seite enthält Werbelinks

Smart Home – openHAB 2 Enigma2 Integration

This post all about the openHAB 2 Enigma2 integration. It explains how to integrate Enigma2 boxes like for example a VU, Octagon, Xtrend or Gigablue in openHAB 2 by using the HTTP Binding and a Regex Transformation. You will receive step by step instructions how to send commands like mute or others to the Enigma box. Furthermore, you will learn how current information is shown, like the current station or program. You will also learn how to send a message to the box to immediately receive important information from your Smart Home as another integration. The only prerequisite for the box is a system operating with openWebIf. I use openATV 6.2 on my box.

Integration of Enigma 2 is only an example. As long as your other devices are able to work with http requests you can control anything. Even with your voice!

Smart Home – openHAB 2 Enigma2 Hardware

As I’ve mentioned already, you can practically control any Enigma 2 box. A little while ago, I searched for a good Enigma 2 box.  Please keep in mind to pick the correct receiver like DCB-S2, DVB-C/T2.

There are lot of good ones, but I have gone for the Gigablue HD Quad.

GigaBlue UHD Quad 4K SAT TV Linux Receiver 2x DVB-S2 FBC Twin Tuner PiP CI SmartCard PVR Streaming SAT>IP Webif APP Ultra HD + 6.3cm (2.5') 1TB Festplatte HDD SATA3

311.00  in stock
as of 25. September 2021 11:34


  • FBC-Twin Linux HD TV Satelliten Receiver mit Hybrid Eigenschaft; 12K DMIPS Dual Core ARM Prozessor; DDR4 MEMORY 2GB / eMMC FLASH 4GB
  • FBC-DVB-S/S2, DVB-C/C2, DVB-T/T2 und IPTV bieten eine vielseitige Nutzung
  • 2x Ci, 2x Kartenleser, TFT- Farbdisplay, Gigabit Lan Anschluss, 2x HDMI, SD Card, 5x USB Schnittstellen
  • SAT>IP Streaming Multiroom Serverfunktion, Live-Streaming, Heimnetzwerk
  • PVR, Fernprogrammierung über App oder Webif

Neuestes Modell GigaBlue UHD Quad 4K mit 2x Ci, 2x Kartenleser, größeres TFT-Farbdisplay, Gigabit Lan Anschluss, 2x HDMI, SD Card und 5x USB Schnittstellen zeichnen die neue Serie zum Vorgänger aus. FBC-TWIN LINUX HD TV Receiver mit Hybrid Eigenschaft. FBC-DVB-S/S2, DVB-C/C2, DVB-T/T2 und IPTV bieten eine vielseitige Nutzung. Die GigaBlue UHD Quad 4K lässt weiterhin Träume wahr werden..
Zwei eingebaute DVB-S2 Tuner ermöglichen eine uneingeschränkte Twin Nutzung so wie 8 Tunern (FBC Tuner). Darüber hinaus bieten ein weiterer Tunersteckplatz die Möglichkeit den Receiver mit DVB-S2, DVB-T/T2 oder DVB-C2 Twin Tuner zu erweitern. Der starke Prozessor bietet dem Betrachter ein 4K hochauflösendes Bildmaterial und eine noch nie erfahrene schnelle Umschaltzeit. Über die Gigabit Lan Schnittstelle oder den optional erhältlichen Wi-Fi Stick können Sie ihren Receiver direkt mit dem Internet verbinden. Features und Ausstattung: 4x PiP, 2x USB3.0, 3x USB2.0, 2x HDMI...


openHAB 2 Enigma2 – Paper UI Binding and Transformation

openHAB 2 Enigma2 Configuration – HTTP Binding

First, you install the HTTP binding through the Paper UI. Call up extensions and bindings.

After that, install the binding with a click to ‘install’ right next to the binding. If everything worked, you will see the following.



openHAB 2 Enigma2 Configuration – RegEx Transformation

Now click on transformations and install the RegEx transformation.


openHAB 2 Enigma2 Configuration – SmartHome Designer

To control everything with openHAB 2 we now need the relevant items, the adaptation of the sitemap and the rules.

openHAB 2 Enigma2 – SmartHome Designer Item

It’s best if you create a group in your items configuration to bundle the functions.

Following that, you define the items. The first two items retrieve the information from OpenWebIf via HTTP request and RegEx transformation. There are loads of possibilities to access the information on the Enigma2 box. You will find a useful reference to the web interface with this link. Referenz zum Webinterface. The second item triggers a rule, which will be explained later.

So what is happening with these first two items?

  • The first part is the HTTP request via the HTTP binding { http=”<[]” }. It executes the HTTP binding and delivers the value (<) of the URL in the square brackets back to the item.
  • http://<ENIGMA_BOX_IP>:<PORT>/web/getcurrent is the original URL, which retrieves a XML formatted text from OpenWebIf.
  • The following part “:3000:REGEX(.*?<e2eventname>(.*?)</e2eventname>.*)” is very cryptic at first glance and not self-explanatory. This passage takes care that the relevant content is extracted from the XML via RegEx transformation, passing it on to the item as a value.
To get a better grasp, here’s a small example. If the URL http://<ENIGMA_BOX_IP>:<PORT>/web/vol is called up, according to Reference to Webinterface you receive the following XML text.

You now have the chance to extract the value from this XML structure. For that, the text from the element is read by entering the relevant syntax. For example, if we want the status “mute” to show on openHAB, we would use the following syntax.

This implies that all the content between <e2ismuted> and </e2ismuted> is being read. The syntax isn’t exactly simple, but it is logical. I can recommend the following aid. If you would like to now about Regex, read this Regex tutorial. The site RegEx 101 contains a very useful tool for testing your queries. There are also examples.

Use the tool as follows.


  1. On the right choose python under flavor. This will save you the use of the so-called escape characters, which you have to use for the slash in the example above if you don’t change it.
  2. Enter the RegEx expression, in our case:
  3. Enter the RegEx text, from which you want to read.
  4. Check the results. Here you see the result in the brackets as Group 1. In this case, the Engima2 box would not be mute (ismuted = False).

openHAB 2 Enigma2 – SmartHome Designer Sitemap

Now integrate the group into a frame on your sitemap.

As soon as you have done this, you will see the items within the group with their relevant values, if your Enigma2 box is switched on.


 openHAB 2 Enigma2 – SmartHome Designer Rule

In the next two chapters, we will define a rule for sending a command and for sending a message.

 openHAB 2 Enigma2 Rule – Send a Command

Below you see the rule for the third item GB_sendMute. Whenever this item receives a command, the rule will be executed. If the command is ON (case ON 🙂 or OFF (case OFF :), the HTTP request sendHttpGetRequest(“”) is sent. This will take care of muting your Enigma2 box. In both cases it is the same HTTP request. This way it is switched back and forth between mute / not mute as soon as the switch is activated.

 openHAB 2 Enigma2 Rule – Voice Control

Althoughit is in german the following video demonstrates the control of various commands via voice control. How to realize the voice control, you can read in the post KNX Speech Recognition.



By loading the video, you agree to YouTube’s privacy policy.
Learn more

Load video


To control the Enigma2 box via voice openHAB uses the following item, for example.

Now enter the relevant rule.

As soon as this item receives a command, the rule will be executed. If the command ON is received, I switch on the box with an HTTP request. That way you can control your box solely by voice.

If you experience any problems, this might be because of active authorization. Try to add the user root and your password like this.…

 openHAB 2 Enigma2 Rule – Send a Message

We also use a rule for sending a message. I have thought of the following. If I’m sitting in front of the TV, relaxed and absorbed, I don’t notice if someone comes to visit. Which is why I want to check if the motion sensor in my driveway is detecting motion. If this is the case, I send the relevant message to the box and can see it on my TV. With the aid of my webcam I can then decide whether the visitor is worth getting up for.  =)

Whar are your projects and ideas about using the HTTP Binding?

 openHAB 2 Enigma 2 – Ressource

I showed only an extract of what is possible. If you would like what is possible please check the resources.


Thomas has build its own Smarthome in 2010. In 2016 he started a German blog about Smarthome to share his knowledge. 2017  he started consulting customers that needed help setting up their own Smarthome. In 2018 the first German course about cloudless Smarthome was launched at Udemy. This course became one of the top rated Smarthome courses. This Smarthome course is now also available in English.

We will be happy to see your thoughts

      Leave a reply

      Smarthome Training and Tutorials