Bindings with External Devices

Tags: #<Tag:0x00007f5ca0b98670>

Hi

I’m being new to openHAB and I found a lot of interesting there like how it works, home automation, etc. Actually I have a scenario that I want to build it with openHAB but the thing is I’m not able to develop or find any references regarding the same.

The query is like I have a raspberry pie & DHT11 sensor and I want openHAB to give me its system configurations. So do I need to bind it to openHAB or is there any mechanism or REST services that automatically register or only the binding is the only way? Because if I have 10 devices then do I need to bind every particular device to openHAB.

Please correct me if I’m getting it wrong.

You might want to review this

This development forum sub-section is generally used by people writing binding code.

How are you expecting to communicate from your DHT11 sensor to your Pi? That would influence what existing binding you would choose.
The combination of the binding and the communication method it uses will dictate what can “discovered” and what you must manually configure.

@rossko57, Thanks for replying but i think you got me wrong I don’t want to communicate DHT11 sensor to Pi. As I want to send those sensor data to my server application with the help of openHAB. So I just want to know the process, a generic way to add any devices to openHAB other than the binding process.

Okay, where is openHAB running?
How would you like OH to communicate with this “server application”?
What is this DHT11 connected to, how will that communicate with openHAB?

There isn’t one. This is what bindings do, interface openHAB to devices or external services.

FYI, most use MQTT for communication with simple sensors that are connected to ESP8266 devices.

But, as rossko57 mentioned, what are your sensors connected to? More info = more help. :wink:

@rossko57, DHT11 is connected to the Raspberry Pi and my openHAB is on being installed on a device also. Btw thanks for letting me know about the bindings info.

@H102, Like these, are used for communication b/w the devices and the application, but if I use openHAB then I think there is no need to use MQTT, as I can get device profile information & it’s functionalities with the help of REST API’s available. But the thing is as I always need to bind that device to openHAB so that to gather these info.

What kind of information are you expecting to get here?

Why is that a problem for you? You cannot do anything useful with openHAB without bindings.

@rossko57, Data related to Items, Things & Bindings, also read DHT11 sensor’s data and use it on other programs. Basically I need to use openHAB for device profiling but the process of doing it is a manual process i.e; binding. After binding we can do a lot of useful things in openHAB but that isn’t my requirement.

Buy a zwave temperature sensor and it will be automatically discovered? You’d still have to install a zwave binding though, so I suppose that won’t do either.

The DHT11 will probably be connected using GPIO? There is a OH1 GPIO binding you might be able to use for reading values. There’s also a PR for an OH2 binding, but it’s a bit stale. Some people also succesfully got readings from it using pi4j, see stackoverflow.

@rossko57, yes it can be used but here’s my query does it automatically discovers all the temperature sensors associated with that, if possible in openHAB that if I bind a device type to openHAB, so does it auto discover all its similar devices associated with it. Like if I bind a device type which basically list out all the temperature sensors devices, is it possible to do so ?

I’m not sure you understand the terminology here. A binding is a kind of plugin that handles communication between openhab and other devices/systems. There are for example the z-wave binding that can send and receive data from z-wave devices (through a bridge, mostly a USB dongle) or a few different weather bindings that gets weather data from different web-services. You seem to confuse this with the act of binding, where a better word would be connect. We are still not sure what you are trying to accomplish here.

  • What data do you want to get from the sensor?
  • How is it connected to your rpi?
  • What do you want to do with the data?

I think he wants openHAB to magically discover all the devices he is interested in, then report everything about them - not just sensor readings, but settings, addresses, serial number, model etc. - to some other system. I’ll guess the “other system” is a commercial product or academic project.

@pacive, Actually I’m new to openHAB and there’s a lot of things which confuses me especially in terms of bindings, I just want to know whether its possible that openHAB discovers the devices once I bind that device type. Like I have a printer binding so does openHAB lists all the printer associated with printer type or not as I will define the profile for all the devices, i just want to discover those devices then later on I can use those devices profile information or its functionality somewhere else like my local storage or on my network.

@rossko57, No I don’t want to discover all the devices magically, I will define that device profiling and after then i want openHAB to discover the associated devices based on a particular typed binding.

If the device is discoverable and the binding implements a discovery service, then yes.
For example : The HP Printer binding is able to discover all printers defined in the binding.