Http.cfg file location on Raspberry pi

I am trying to set up HTTP binding to control a roku.

I am running OpenHab2 on a raspberry pi using the Paper ui.

I think I can see how to do it in that I need to add the command:

http=">[*:POST:http://<ROKU IP:8060/keypress/home]" (Simple test comand)

to the http.cnf file. However I am not sure where this is.

I found a file at /etc/openhab2/services/http.cnf

but adding the line here doersnt seem to do anything. Am I in the right place?

Any help would be most apreciated

The folder location is correct, your desired usage migth be FALSE. Reading the documentation migth give a hint.

Can you give me any suggestions, as far as I can see from the documentation and other posts I have seen, the code is correct.

I am trying to send a home key press to the roku

I’d say you need to define just the item:

Switch MyItem2 { http=">[*:POST:http://<ROKU IP:8060/keypress/home]"}

Thanks, I will give that a try

Where should the defined thing show up? I have gone to things. hit add and selected http, but the page is blank. Am I in the right place?

Http binding is an OH1 binding, because of that it doesn’t support things.

After creating an item you can include it to the sitemap, that’s it.

Ok thanks, so http binding won’t show up in paper UI. Is that correct.

You can install the binding via PaperUI, however you can’t create things with/for it You need to create the items directly in an items file and use them on your sitemap.

just to clarify:

  1. openHAB2 can use so-called “legacy-bindings” (which were originally written for OH1.x), if they’re compatible with OH2, they’re called 1.9 bindings.
  2. openHAB2 can also use 2.x bindings

ad 1)
1.9 bindings must be configured as openHAB1 wants you to:

  • edit the <<bindingname>>.cfg in the services folder (in your case /etc/openhab2/services) for binding configuration
  • edit .items files to use the binding in a item
  • edit .rules files to use the binding in a rule

for http1 (1.9 bindings have a 1-suffix to distinguish them from 2.x bindings), the binding is 1.9, so you could activate (meaning install) it via PaperUI, but all the rest has to be done in files:
read this one carefully for your intended use:

ad 2)
openHAB2 bindings can be configured via PaperUI (but also via files, but that’s a different story).
be aware: Items have to be written in .items files for 2.x bindings also