Service Discovery

dakalff edited this page Nov 22, 2013 · 5 revisions

This page describes what the service discovery feature is and how it can be used by UIs


The Service Discovery bundle provides Multicast DNS/Bonjour functionality to openHAB. It is available in openHAB since version 1.0.0. This bundle is based on a well known java MDNS library - jmDNS. The library is included into the bundle so no additional actions are needed to make this bundle work.

How to use Service Discovery

The Service Discovery bundle was created mainly to simplify interaction between User Interface applications on different platforms (Android, iOS, etc) and openHAB. It provides service interface to register and announce different services, provided by openHAB to MDNS/Bonjour.

This interface is currently used by REST bundle to announce available REST interfaces on local network. REST application announces both HTTP and HTTPS connection points depending on their individual availability.

  • HTTP is announced as _openhab-server._tcp.local. and it's name is openHAB
  • HTTPS is announced as _openhab-server-ssl._tcp.local. and it's name is openHAB-ssl

Both service announcements include additional uri attribute which shows the path ("/rest" by default) to REST interface. User Interface applications should use this attribute to form the base URL of REST interface before connecting to openHAB.

The same java library (jmDNS) can be used to discover openHAB on local network from java applications, including Android applications. MDNS/Bonjour is built in iOS application development framework. Plenty of examples can be found in corresponding platform developers documentation and on the internet (Android example, iOS example for MDNS/Bonjour usage).


To discover HTTP REST interface application must resolve _openhab-server._tcp.local. service.

Service discovery will return several parameters of openHAB:

  • IP address (like
  • TCP port (like 8080)
  • uri attribute (like /rest)

The base URL for openHAB will look like this:


We recommend using MDNS/Bonjour tools to check if openHAB announcement is available on the network for developers:

  • iStumbler - a good network tool for Mac OS which includes MDNS/Bonjour browsing functionality
  • Bonjour Browser - an iPhone/iPad application to browse MDNS/Bonjour
  • Android Bonjour Browser - an Android application to browse MDNS/Bonjour
  • Any windows tools links are welcome!

feature overview


Setup intro

Linux and OS X





User Interfaces



(link to openHAB forum)



Application Integration



A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.

Please update the wiki if you do come across any out of date information.

Binding configurations

Use case examples

Item definition examples

Sitemap definition examples

Collections of Rules on a single page

Single Rules


Syntax highlighting for external editors

Release Notes

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.