OH2: Which prerequisite must a device fulfill to be able to be "autodetected"?

I have some Arduino compatible devices here, which use an ESP8266 to be connected with my local WiFi.
Now I ask myself, what information/services/ports/… these devices need to provide to be recognized by OH2’s autodetection and to provide channels and stuff.

Is there somewhere a tutorial or documentation about it?


You simply implement the discovery in a way that your device permits to be discovered. You can find the documentation on how to implement a discovery service here.


thank you. If I interpret your answer right, this meand I have to develop a binding for each purpose/device.

My approach followed a more general approach:
A “generalized” binding - I’d call it “wrapper”, which is able to provide the necessary elements to openHAB, but understands e.g. XML or similar.

Means: If the device is being recognized in the WiFi AND providing some special information (e.g on port 80), then take the provided information on OH2 autodetect and present them together with the thing.

Is it clear what I mean? Does something like this exist?

BTW: I love openhab and this forum here - a great piece of development and a lot of nice, helpful people here! Kudos to the development team!


I don’t think so. Discovery of the devices is only part of the problem. One also needs to know how to know how to talk to the device which includes both transport, framing, and message format. Each technology does this differently so a generic binding has never been attempted.

Even in your case, you can make a binding that is generic to all of your devices, but it will still be limited to your DIY devices.

But, Kai isn’t saying you need to create a binding for every purpose/device. You would just have to create the one binding for all of your devices. The binding is the bridge between the technology (in your case WiFi and a certain XML) and OH.

There are also “general purpose” discovery services in place already: The UPnP and the mDNS discovery. So if you can make your device speak either of these protocols, all you need to do is to register a discovery participant in openHAB, which will listen to the identifier of your device type (as they announce themselves on the network).

Kai, thank you. I’ll look in to this topic. There seem to be already some implementation available:
If I’m successful, I’ll share my knowledge here of course. My goal is to create a cheap temp/humidity wifi based sensor (less than €/$ 10.- per device)

Hi Boby,

any updates on your knowledge?

No, there was too much to consider - I’m still including new Arduino/WeMos/NodeMCU sensors manually