Struggle with item file

Tags: #<Tag:0x00007f38816ed898>

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 '&gt;[UP:GET:[http://hp27/;did=1010042&amp;goto=%2$s&amp;command=0](http://hp27/;did=1010042&amp;goto=%252%24s&amp;command=0)]' doesn't contain a valid binding configuration

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])]
 d != org.openhab.core.library.types.PercentType
	at java.util.Formatter$FormatSpecifier.failConversion( 

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/$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/$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/$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: