Help with HTTP-Binding channel configuration

Hello,

while migrating from OH2.5 to OH3 i need a little help with a http-binding item.
Its controlling the motion detection on my motioneye server.

At OH2 the item had a textual definition:

Switch      Cam_Terrasse_MD   "Cam_Terrasse_Bewegungsmelder aktiv"    { http=">[ON:GET:http://localhost:7999/1/detection/start] >[OFF:GET:http://localhost:7999/1/detection/pause]" }

Now i would like to configure the item through the UI, but i just get the following error:

18:58:40.175 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://192.168.178.11:7999/' (method='GET', content='null') failed: Connection refused

Thing/Channel configuration:

You need to add the state to the commandExtension (just append %2$s).

Thanks for that fast reply, but i seems like, i am still doing something wrong:

19:12:14.485 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://192.168.178.11:7999//1/detection/pause' (method='GET', content='null') failed: Connection refused
19:12:18.468 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://192.168.178.11:7999/' (method='GET', content='null') failed: Connection refused

Looks like you have a // after the port. Either remove the trailing / on the baseURL or the leading / on the commandExtension.

Thanks, again - you were right. I removed the / but i get the same error:

19:28:19.389 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://192.168.178.11:7999/1/detection/pause/' (method='GET', content='null') failed: Connection refused
19:28:21.688 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://192.168.178.11:7999' (method='GET', content='null') failed: Connection refused

Only difference is, that i now got this message in log:

19:27:21.684 [INFO ] [inding.http.internal.HttpThingHandler] - Using the secure client for thing 'http:url:Cam_TE_Cam01_URL'.

Seems like something blocks access. This is more likely a configuration issue with the device (you used localhost before and now an IP address. Maybe the web server is blocking outside-access.

Thank you, i will check it out the next days. The motioneye config seems to be ok - access for all IPs is allowed.

Step by step i am getting closer :smiley:

Problem was, that port 7999 was just reachable from localhost. Now i turned on the webcontrol but still get errormessages:

19:20:15.556 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://192.168.178.11:7999/1/detection/pause/' (method='GET', content='null') failed: 404 Not Valid Command

19:25:28.394 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Cam_TE_Cam01_Rec_Ready' changed from ON to UNDEF

Calling the URL (http://192.168.178.11:7999/1/detection/start) in the browser works fine:
grafik

Maybe remove the trailing slash in the commandExtension?

1 Like

Thats it! Thank you very much for your help and patience!