Help with HTTP Binding item configuration

Can you show us what your Item definition is like, now that you have made changes?

Can you confirm that pasting
http://hp27/deviceajax.do?cid=9&did=1010042&goto=50&command=0
into your browser moves the blind to half way?

yes it do

Dimmer Raffstore "Text [%d %%]" { http=">[UP:GET:[http://hp27/deviceajax.do?cid=9&did=1010042&goto=%2$s&command=0](http://hp27/deviceajax.do?cid=9&did=1010042&goto=%252%24s&command=0)]" }

Sitemap:

sitemap home label="Rooom"
{
    Slider item=Raffstore label="Büro Jens"
}

You know the way you see replies to your posts? Please use ‘reply’ yourself when answering posts, or the person you are replying to doesn’t know about it.

Okay, so you used code fences in your post, but your Item -

Dimmer Raffstore "Text [%d %%]" { http=">[UP:GET:[http://hp27/deviceajax.do?cid=9&did=1010042&goto=%2$s&command=0](http://hp27/deviceajax.do?cid=9&did=1010042&goto=%252%24s&command=0)]" }

includes some unwanted URL encoded characters, like &gt:
That may be due to how you copy/pasted it, or it may be wrong in your xxx.items file. Please look very carefully.

For some reason you have added your URL a second time in brackets (), I don’t know why but it is not wanted there.

Next, you have defined your HTTP binding only to respond to the command UP, and when it gets it, to send “UP” in your URL.
It’s a Dimmer type Item, it will never get the command UP.
If it were able to get the command DOWN, it would do nothing at all.

So let’s change it so that it responds to the numeric commands from your slider, using * to represent any command.
We also need to change it to insert the number into the URL goto= position, using d to format the number.

Dimmer Raffstore "Text [%d %%]" { http=">[*:GET:[http://hp27/deviceajax.do?cid=9&did=1010042&goto=%2$d&command=0]" }

thank you for your grat support but It still does not work…I give you the logs

events.log (116.7 KB) openhab.log (656.5 KB)

Extract from your log

2019-06-11 15:42:51.121 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.items'
2019-06-11 15:42:51.121 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'http' of item 'Raffstore' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig '>[UP:GET:[http://hp27/deviceajax.do?cid=9&did=1010042&goto=%2$s&command=0](http://hp27/deviceajax.do?cid=9&did=1010042&goto=%252%24s&command=0)]' doesn't contain a valid binding configuration
	at

Your items file home.items still contains exactly the same erroneous Item definition for Item Raffstore from before my suggestion to fix it.

How are you editing your items file? Have you defined the same Item Raffstore in more than one place?

no I havent

I’m losing the will to live here. I understand there may be language problems, or difficulty typing or reading, but you still have to give us something to work with.
You haven’t what ??

Let’s go round again.
Stop openHAB.
Look carefully at your Item definition. Make any changes you need.
Post your Item definition here in code fences.
Reboot openHAB.
When ready, use the slider in your UI.
Post openhab.log here.

1 Like

@rossko57: The hints you gave today (12 june) could not give an error message with a timestamp of 11 June.
Looking at the openhab.log entries of today I see WARN messages about “d” not being of percent type, while the event.log shows such commands are received (correctly?).

1 Like

You’re quite right, I went back too far in the log looking for a reboot to begin from that didn’t happen.

Today’s relevant log

[org.osgi.service.event.Event [topic=openhab/command/Raffstore] {item=Raffstore, bridgemarker=true, command=47, timestamp=1560340491904}
...
Bundle(org.openhab.binding.http_1.12.0 [261])]
java.util.IllegalFormatConversionException:
 d != org.openhab.core.library.types.PercentType
	at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) 

I’ll interpret it the other way round I think; it’s not the percent type that is the problem it is the $d format?
Looking at old threads for people struggling with HTTP controlled dimmers, I cannot find anyone successfully using the %2$d substitution. It ought to work, but?
%2$s does seem to work with dimmers though.

So, @usr, let’s try this, to format the numeric command as string.

Dimmer Raffstore "Text [%d %%]" { http=">[*:GET:[http://hp27/deviceajax.do?cid=9&did=1010042&goto=%2$s&command=0]" }

I would still advise a reboot after this.

No still does not work.
I made a step back and reinstalled openhab2. The percent are now gone but it is still the same item txt…only a new openhab

events.log (604 Bytes) openhab.log (25.0 KB)

thank you beforehand for your grat support @rossko57 and @opus

openhab.log last line

Received HTTP POST request at 'items/Raffstore' for the unknown item 'Raffstore'.

Did you look at the log at all?
Whatever it is that you have done now, you no simply longer have an Item called Raffstore.
Perhaps your items file got overwritten in the unnecessary reinstallation.

no i have copyed the item file on my desktop and then paste it so it is exactly the same

Alright. If you are still getting the
unknown item 'Raffstore'
messages in your openhab.log, there is either something wrong with your xxx.items file or it is in the wrong folder.
There’s nothing we can do about that from here.
If you look in your openhab.log when you boot or edit the xxx.items file, you should see a message about
Loading model 'xxx.items'
(with your filename of course)
If that is not there, your file is in the wrong folder or not called .items
If it is there, look to see if an error message follows it to show a problem.

2019-06-14 13:23:17.534 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘home.items’
2019-06-14 13:23:18.769 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-06-14 13:23:19.245 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘home.sitemap’, using it anyway:

Good. So … no more unknown item 'Raffstore' messages now?

Your sitemap has some problem. Do you get your Raffstore slider? If you slide it, do you get commands in your events.log? If you do, do you get errors in your openhab.log?

May we see your current items file line for Raffstore?

Dimmer Raffstore “Text [%d %%]” { http=">[*:GET:[http://hp27/deviceajax.do?cid=9&did=1010042&goto=%2$s&command=0]" }

Splendid. How about that log stuff? This is like pulling teeth.