HTTP Binding Not Working OH2

Hi,
I have Openhab2 and try to geht http binding working.
I have a PHP-Site in my Raspberry pi which Provides the Outside Temperature.
Example:
4.4

I have the following entry in /etc/openhab2/items/http.items:

Number OutsideTemp "OutSideTemp" { http="<[192.168.0.120/disp/getTemp.php:10000:*]" }

And in my /etc/openhab2/Services/http.cfg:

http="<[192.168.0.120/disp/getTemp.php:10000:*]"

But i doesn’t work… what am i missing?

Two things. First, you shouldn’t need to configure anything in http.cfg. Second, I don’t think that a simple wild card is sufficient. My working example has a regex at the end of it (this pulls my WAN IP address):

String httpExternalIP { http="<[http://icanhazip.com:600000:REGEX((.*?))]" }

1 Like

Hi John,
Thanks for your Support!
Just to get your answer right:

  • i only Need to edit the .items File, no .cfg file needed?
  • The Transition rule has to be some REGEX-Term? I was thinking about leaving it blank or try the wildcard-Thing… i have to damit that i don’t get this REGEX-Thing right… i don’t understand the Logic behind that :frowning:

I will give your Version a try, thanks!

Still no success… :frowning:

Okay i got it working :wink:

This did the Job for me:

String OutsideTemp {http="<[http://192.168.0.120/disp/getTemp.php:1000:REGEX((.*?))]"}

The missing “http://” in Front of the URL was the Last thing i Changed in Order to get it working. But Regex has to be correct too of course.