# Properly configure http binding channel in openhab3 for URL with parameters

**URL:** <https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256>\
**Category:** Beginners\
**Tags:** httpbinding, openhab3\
**Created:** [December 31, 2020, 2:53pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256 "2020-12-31T14:53:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rui](https://community.openhab.org/user_avatar/community.openhab.org/rui/32/63870_2.png) [@rui](https://community.openhab.org/u/rui)\
**Post date:** [December 31, 2020, 2:53pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256/1 "2020-12-31T14:53:14Z")

</div>

I’ve just installed openHab 3 and successfully setup my Homematic Rolleshutters with homegear. For my Somfy rollershutters I’ve created a separate solution with an ESP8266.

Here I’m sending the commands with a simple URL and URL parameters to activate my rollershutters like this (e.g. send UP command to my rollershutter #4):

[http://heimfunker/somfy?remote=4&command=U](http://heimfunker/somfy?remote=4&command=U)

Now I’m trying to create in the new openHAB 3 UI a proper Thing via the http binding, but I’m not successful with it. This is the code that the UI created with my configuration:

UID: http:url:3ddbea21e7  
label: Rolladen Schlafzimmer  
thingTypeUID: http:url  
configuration:  
authMode: BASIC  
ignoreSSLErrors: false  
baseURL: [http://heimfunker/somfy?remote=4](http://heimfunker/somfy?remote=4)  
refresh: 30  
commandMethod: GET  
timeout: 3000  
bufferSize: 2048  
location: Schlafzimmer  
channels:

- id: position  
channelTypeUID: http:rollershutter  
label: Position  
description: “”  
configuration:  
commandTransformation: “&command=”  
downValue: D  
stopValue: S  
upValue: U

Any hint what I’m doing wrong here or where to find a good resource in the documentation? I might be missing something very fundamental here.

Best,  
Rui

---

<div class="post-metadata">

**Author:** ![hafniumzinc](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@hafniumzinc](https://community.openhab.org/u/hafniumzinc)\
**Post date:** [December 31, 2020, 3:04pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256/2 "2020-12-31T15:04:34Z")

</div>

> [@rui](#):
>
> good resource in the documentation

> **[HTTP - Bindings](https://www.openhab.org/addons/bindings/http/#url-formatting)**
>
> This binding allows using HTTP to bring external data into openHAB or execute HTTP requests on commands.

---

<div class="post-metadata">

**Author:** ![rui](https://community.openhab.org/user_avatar/community.openhab.org/rui/32/63870_2.png) [@rui](https://community.openhab.org/u/rui)\
**Post date:** [December 31, 2020, 3:15pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256/3 "2020-12-31T15:15:22Z")

</div>

Thanks. That’s the documentation I’ve found and that I’ve tried to apply my values. But it didn’t help as I might be misunderstanding the documentation.

As you can see in my code above I’ve set the commandTransformation and the values for downValue, stopValue and upValue. As it is not working I’m kind of lost now on what to try differently. Any hint on what I am doing wrong is highly appreciated.

---

<div class="post-metadata">

**Author:** ![hafniumzinc](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@hafniumzinc](https://community.openhab.org/u/hafniumzinc)\
**Post date:** [December 31, 2020, 3:19pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256/4 "2020-12-31T15:19:03Z")

</div>

The link points to a very specific section of the docs which shows how to transfer the command into the URL. Your YAML code shows that you are not using the notation documented, hence the link.

I think you probably want something like:

```auto
commandTransformation: "&command=%2$s"

```

---

<div class="post-metadata">

**Author:** ![rui](https://community.openhab.org/user_avatar/community.openhab.org/rui/32/63870_2.png) [@rui](https://community.openhab.org/u/rui)\
**Post date:** [December 31, 2020, 3:26pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256/5 "2020-12-31T15:26:00Z")

</div>

> [@hafniumzinc](#):
>
> `=%2$s`

Yeah!!! That did the trick! Together with using “commandExtension” instead of “commandTransformation”.

Here’s now my code that works (in case others are wondering what the complete solution looks like):  
UID: http:url:3ddbea21e7  
label: Rolladen Schlafzimmer  
thingTypeUID: http:url  
configuration:  
authMode: BASIC  
ignoreSSLErrors: false  
baseURL: [http://heimfunker/somfy?remote=4](http://heimfunker/somfy?remote=4)  
refresh: 30  
commandMethod: GET  
timeout: 3000  
bufferSize: 2048  
location: Schlafzimmer  
channels:

- id: position  
channelTypeUID: http:rollershutter  
label: Position  
description: “”  
configuration:  
commandExtension: “&command=%2$s”  
downValue: D  
stopValue: S  
upValue: U

Thanks so much for your help @hafniumzinc !

---

<div class="post-metadata">

**Author:** ![hafniumzinc](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@hafniumzinc](https://community.openhab.org/u/hafniumzinc)\
**Post date:** [December 31, 2020, 3:29pm UTC](https://community.openhab.org/t/properly-configure-http-binding-channel-in-openhab3-for-url-with-parameters/112256/6 "2020-12-31T15:29:36Z")

</div>

> [@rui](#):
>
> Together with using “commandExtension” instead of “commandTransformation”.

Oh yeah, I didn’t spot that! 🤷‍♂️

Good work!
