[SOLVED] Simple HTTP binding

Seem to be really struggling to get some very simple HTTP bindings setup.
I’m new to OpenHAB but should have enough skills to get this working!

I have a home made home automation system and I initially want to do 2 things

  1. Pull temperatures from a URL
    URL is formatted like “http://ipaddress/ha/temp.php?room=room” - this always returns just a number to 2 dp (eg 19.56) - no other formatting (HTML or otherwise)
  2. Switch some switches from a URL
    Also very simple URL - “http://ipaddress/ha/switch.php?switch=1&control=on
    No output, so just a HTTP get type command should work

So far every guide I’ve tried has resulted in OpenHAB rejecting whatever has been put in services/http.cfg

I guess what I want is a very simple few steps/instructions to do (what I feel is) these two simple bindings.

Can anyone help?

I’ve currently got various Items created like a temp sensor “FF_Bedroom_Temperature” & light switch “FF_Bedroom_Light”

http is an openHAB 1 binding (a version 2 is currently developed, but not yet available).

That means, you cannot use Paper UI at all. You need to define the items in an items file. Have you read the documentation of this binding? https://www.openhab.org/addons/bindings/http1/

I find this example very like what you need for example:

Switch MyItem1 { http=">[ON:POST:http://sample.com/myitem1:on] >[OFF:POST:http://sample.com/myitem1:off]" }

http is an openHAB 1 binding (a version 2 is currently developed, but not yet available).

That means, you cannot use Paper UI at all.

That will be my problem!
You’ve pointed me in the right direction, now have the switch setup working!
Now onto temperatures.