Facing problem in getting value of DHT11 temperature sensor connected on my RPi3 in openhab android app using Basic UI, exec binding

Facing problem in getting value of DHT11 temperature sensor connected on my RPi3 in openhab android app using Basic UI, exec binding.

I have python code to read temperature sensor value and printing it to CLI, then i made a .sh script to run that python script and print the value in command line consol through “echo” command.

As per my understanding exec binding is used to run any shell script.

What steps I should follow to get my temperature sensor value in openhab android app?

I am new to this just few days back I started my work on OpenHAB.

Thanks in advance.

at first, please take the time to read the basic introdution to openHAB

two things on your question: openHAB isn’t “just an App” - it’s mereley and importantly a backend system, capable of connecting different hardware and systems and appliances. In your case it can connect to either sensor directly via so called bindings - or you can use custom made script, which import data and information into openHAB Backend.
The App is only one of many User Interfaces, which use the information present in the backend.

So, that being said: You need a way to Import your temperature into the Backend and then you can expose this item to a sitemap and then you can use the App to display the sitemap … and the item’s state.
For an external ressource like your bash script you can use the REST API (is linked in the user manual), which you can use from within the script and update item states. and yes, the exec-binding can trigger the script. and yes, you could easily write a so-called rule (which in turn can have a cron trigger) to read the bash output and put it directly in to a item.

But before doing one of those things, I highly recommend reading through the mentioned docs and get a better understanding of openHAB. You can of course come back here, if you have any questions.

1 Like

Additional you can find detailed explanation in this two posts. Read them before you start. Then use them as step by step instructions to set up your system.

One thing ahead, the exec binding can directly call your php script. No need to wrap it in a shell script.

1 Like

Thanks for the information, I will come back if any doubt.

Thanks for information

did you make it through
?