Help with HTTP Binding item configuration

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.

openhab.log (1022.2 KB) events.log (42.8 KB)

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

In your item definition, between GET: and http://hp27 you have a [ which must be removed.

I notice that this additional [ was my mistake. Just make sure that you remove it.

Well spotted! That was very well hidden and I’ve carefully copied it too even while looking at binding docs …

I wrote a little application in Java to receive the command to make sure that the command was actually sent. Then I noticed the stack trace in my openhab.log log file indicating that something was wrong with the URL… The command is ok now, if I move the slider then I see the different values appearing in the java application. So now it should ‘just work’ for @usr :slight_smile:

1 Like

openhab.log (33.6 KB) it is not working on my device

The item Raffstore does not exist.

2019-06-17 08:57:45.459 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Raffstore' for the unknown item 'Raffstore'.
2019-06-17 08:57:45.587 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Slider
1 Like

how can I get it?

Does your .items file still exist and does it contain the Raffstore item?

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

Oh great, anyway it works now. I am so happy!

Thank you @marcel_erkel and @rossko57 for your great support!
The community here is great.

Super toll :slight_smile: