-
Notifications
You must be signed in to change notification settings - Fork 4
Service Discovery
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.
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 192.168.1.20)
- TCP port (like 8080)
- uri attribute (like /rest)
The base URL for openHAB will look like this: http://192.168.1.20:8080/rest
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!
Installation
Community
- Support
- News Archive
- Presentations
- How to Contribute
- IDE Setup
- How to Implement a Binding
- How to Implement an Action
- Projects using openHAB
- User Interfaces
- Classic UI
- iOS Client
- Android Client
- GreenT UI
- CometVisu
- Bindings
- Asterisk Binding
- Astro Binding
- Bluetooth Binding
- Comfo Air Binding
- CUL Binding
- CUPS Binding
- digitalSTROM Binding
- DMX512 Binding
- EnOcean Binding
- Epson Projector Binding
- Exec Binding
- Fritz!Box Binding
- Fritz AHA Binding
- GPIO Binding
- HDAnywhere binding
- Heatmiser Binding
- Homematic Binding
- HTTP Binding
- IHC / ELKO Binding
- Insteon Hub Binding
- Insteon PLM Binding
- Ir-Trans Binding
- KNX Binding
- Koubachi Binding
- MAX!Cube-Binding
- MiLight Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- Neohub Binding (Preview)
- Netatmo Binding
- Network Health Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Philips Hue Binding
- Piface Binding
- Pioneer-AVR-Binding
- Plugwise Binding
- PLCBus Binding
- Pulseaudio Binding
- RFXCOM Binding
- Samsung TV Binding
- Serial Binding
- Snmp Binding
- Squeezebox Binding
- System Info Binding
- Somfy URTSI II Binding
- Sonos Binding
- Swegon ventilation Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- VDR Binding
- Velleman-K8055-Binding
- Wake-on-LAN Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Z-Wave Binding
- Persistence
- db4o Persistence
- rrd4j Persistence
- MySQL Persistence
- MongoDB Persistence
- Sen.Se Persistence
- Cosm Persistence
- Logging Persistence
- Exec Persistence
- MQTT Persistence
- Automation
- Scripts
- Rules
- Actions
- Misc
- REST-API
- Security
- Google Calendar Support
- Twitter Action
- Service Discovery
- Dropbox Bundle
Samples
- Item definitions
- Sitemap definitions
- Binding configurations
- Rules
- REST Examples
- Tips & Tricks
- FAQ
- XSLT Transforms
- Scripts
- Integration with other applications
- Syntax highlighting for external editors
- Update-Scripts
- Samples-Comfo-Air-Binding
- Samples WAC Binding
Release Notes