Omnilink - "Cannot retrieve item for widget" error

Hi!

I’m begginer to openhab. I’m trying to get a working model for my HAI OPII with omnilink 2.0. I use org.openhab.binding.omnilink-1.9.0.jar addon and openHAB 1.x compatibility layer. It’s seems omnilink connect to the OPII and get it status:

System: SystemStatus ( timeDateValid = true year = 17 month = 3 day = 10 dayOfWeek = 5 hour = 16 minute = 18 second = 43 daylightSavings = false sunriseHour = 6 sunriseMinute = 25 sunsetHour = 17 sunsetMinute = 55

Than I create item and sitemap files but I get error message “Cannot retrieve item for widget”. Below my item and sidemap files:

Thanks for any help!

my.item:

Dimmer GymSpotlight {omnilink=“unit:2”}

default.sitemap:

sitemap default label=“Main Menu” {
Frame label=“Test” {
Slider item=GymSpotlight
}
}

openhab.log:

2017-03-10 16:22:25.666 [INFO ] [ng.omnilink.internal.OmniLinkBinding] - System: SystemStatus ( timeDateValid = true year = 17 month = 3 day = 10 dayOfWeek = 5 hour = 16 minute = 18 second = 43 daylightSavings = false sunriseHour = 6 sunriseMinute = 25 sunsetHour = 17 sunsetMinute = 55 batteryReading = 223 alarms = {} )
2017-03-10 16:22:27.403 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:27.406 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:27.409 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘GymSpotlight’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:27.414 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘GymSpotlight’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:27.417 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘GymSpotlight’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:49.742 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:49.745 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:49.747 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘GymSpotlight’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:49.750 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘GymSpotlight’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:22:49.752 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘GymSpotlight’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-03-10 16:23:18.961 [INFO ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/GymSpotlight’ for the unknown item ‘GymSpotlight’.
2017-03-10 16:23:19.125 [INFO ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/GymSpotlight’ for the unknown item ‘GymSpotlight’.

The errors indicate that for some reason the Items put on your sitemap do not exist.

Load your configs into Designer and look for syntax errors in your .items files. Once a syntax error is encountered it stops loading Items from that file.

Make sure your Item names are identical in all places, including case.

Thanks for the answer, Rich!

Somehow my Smart Home Designer does not check the syntax. But my.item file syntax is very simple, I took him numerous examples and I think the problem is something else. In addition, of course, I use the same item name everywhere.

And I do not quite understand the purpose SmartHome Designer. It’s just a more convenient way to browse and edit the configuration files compared to conventional editor, But where is the “design”? ))

Designer does indeed check the syntax. It also will automatically complete lines with <ctrl><space> or show you valid ways to complete a line. It is invaluable to check the validity of your configuration. Whether or not you want to use Designer day to day, it should always be your first stop when you encounter errors, particularly errors like these which indicate a syntax error somewhere. This is the purpose of ESD.

First, are you running version 0.8?

Second, what do you mean by “it doesn’t check the syntax”? Do you not see any red or yellow underlines anywhere?

There are very few errors in OH that are obvious and clear but this is one of them. “Cannot retrieve item …” means one thing. You have an Item on your sitemap that does not exist. So either you have a typo on the sitemap such that the Item names do not match (case matters) or you have a syntax error in your .items file preventing it from being loaded and parsed.

There might be hidden characters hanging around in the .items file which can cause problems. Designer is not always able to identify this sort of problem. Some people have solved errors like this by copy and paste or retyping their .items file into a new file.

First, are you running version 0.8?

Yes and I downloaded it from here (Windows 64-bit) https://github.com/eclipse/smarthome/blob/master/docs/documentation/community/downloads.md#designer-builds

Second, what do you mean by “it doesn’t check the syntax”? Do you not see any red or yellow underlines anywhere?

No, I do not see. In addition, also does not work.

Perhaps something strange is happening to me. ) I’ll look for the cause of what’s what. Thank you for help, Rich!

For that version to work you need also java 64 bit.
Even while running on a 64 bit operating system most people have 32 bit java installed, so you will need the 32 bit version of the ESHD.

1 Like

Thanks! I’ll check, it’s seems to me, I have 64 bit java, but I reinstall to be sure…

It’s ok - Designer check the syntax now. I changed the System editor to Item Editor:

Right Clik my.item file -> Open With -> Other -> Internal Editor -> Item Editor

1 Like

is your file called my.item? it should be my.items, thats also why the designer is not syntax checking it or opening it automatically.

Shit … Everything is much simpler )

Thanks, Dan!