I have RaspberryPi2 with Aeon z-stick. I use OpenHabian, installed the latest testing 2.4.0 Milestone build. Recently I’ve migrate from S2 to Gen5. Initially I manage to add the new Gen5 into the network as secondary controller, but after some playing around with Zentools I managed to reset somehow the S2. So I’ve decided to start from scratch with Gen5. I added all the zwave things, but kept the existing sitemap with the items names inside. When adding the new things I’ve created items with same names as before. I have influxdb persistence that restores items on reboot
So now I have this problem that sensor data items like Temperature, Humidity, Luminosity, Battery, etc are not updated on the UI. The place where it’s supposed to have the number stays blank. Only switches are updated. In the karaf console when I list the items everything looks good, data is there and items are updated.
I’ve cleaned the cache couple of times, restart the raspberry, openhab, but nothing helps. Interestingly when I create item with another name on a channel with already assigned item and I add the new item in BasicUI then I see the new item is getting the updates. So is there some kind of cache of BasicUI?
Any ideas …?
Edit
To summarize the root cause and the remedy:
Problem was that when deleting the old things not all old items were deleted. I did that using Habmin and it seemed that when you delete a thing all associated items get deleted also. Seems this is not the case.
Then I created new things and items with same name to preserve already defined sitemap. That created a mess in jsondb where items are stored. So at the end I had two items with same name pointing to different z-wave nodes. One item left orphaned for non existing thing and the other attached to a newly added thing. May be ESH reads jsondb sequentially and for some of the things it gets items that point to another (non existing) node resulting into no value shown/updated in BasicUI.
So remedy was to stop OH and delete all problematic items from userdata/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink file.
Did you delete your old items? I think you must have, since you wouldn’t be able to create new ones with the same names if you hadn’t. If you look at your new Things in Habmin or Paper UI, do they show as linked (blue circle with a white dot in the middle)?
Are all of your Things and Items managed (not in files)?
Since you updated to the M4, you now have the new Z-Wave binding, so maybe your channels have changed. Which version did you upgrade from?
I’ve deleted the old things and corresponding items were automatically deleted. Then I started adding new things on the Gen5 stick. Things are linked, just checked in PaperUI. As I mentoned in karaf console when I list items values are there
Here I’ve added KitchenTemperature1 that is the same as KitchenTemperature, but as new item it started immidiately showing value on BasicUI
Everything apart the sitemap is in ESH. To upgrade to M4 (as you reffer to it) I used openhabian_config tool. I see that z-wave binding version is binding-zwave - 2.4.0.M3
OK, then you’re not on the latest, which includes a major Z-Wave binding update…
Strange! The items have the data, but Basic UI does not display some values. A newly created item linked to the same Thing displays properly. Clear browser cache? Which version of OH did you update from? Does the Paper UI> Control also have missing data?
I think that I’ve upgraded from last stable, that was 2.3.0. That was what openhabian brought. I’ve cleared the browser’s cache several times already.
That’s why I thought that BasicUI app could have something like local cache (server side) of the content it displays.
z-wave binding shouldn’t be a problem here, right? I mean karaf shows proper values, it’s just that the UI for some reason is not showing them. As if it thinks that they’re already up-to-date…
cheers,
Vladimir
First thing I’d do is look in the browser developer tools (usually f12). but doubt this would help. Maybe there are some errors in the logs? Since you’re already on a milestone build, try upgrading to the latest, just be aware of the Z-Wave binding changes. Maybe something was fixed?
This doesn’t sound right. When Things are deleted, the Links will be removed, but the Items should stay.
Hmm is it possible that old items were not deleted and I’ve created new ones with same names? And now on the UI are the old ones that are not attached to the new things? Quite weird scenario…but karaf should show me such doubling of items, if at all possible, right?
Is an item name unique…or they have something like UUID assigned that’s uniquie?
It’s the third time I’ve asked, but does the Paper UI> Control also have missing data?
Could you post the portion of your sitemap with these items? I’ve looked through the ESH issues and I didn’t spot anything close to what you’re experiencing, but you may want to take a look.
To be frank I’ve never paid attention to PaperUI > Control as it always was empty. I see now that I needed to wait like 10sec to see what it had to offer. everything is there, no missing data.
here it’s the items file
sitemap home label=“Home control”
{
Frame label=“corridor” {
Slider item=CorridorNewDimmer
Text item=CorridorMotionAlarm
Text item=CorridorTemperature
Text item=CorridorSensorBattery
Text item=CorridorIlluminance
}
One more thing that I’ve just recalled. When I was adding the new things I had several occasions where I defined Items in Habmin, using the ‘+’ button available per channel. Then at some point I realized that some of the items were missing and I had to do the same action again. I did this for at least 6-7 items…but I thought it’s just buggy Habmin UI and moved on without investigating the issue.
what I mean is that I define the items for a Thing, then save it and then move on. Later I realize that some of the items that I already defined were missing…or some were doubled per channel. Really weird
Some of your items are missing their labels… maybe they are also the ones missing data? You don’t have labels in the sitemap, which is fine, but if you don’t have one for the item, maybe this could cause an issue. I’m guessing…
Yes, I intentionally tried to have minimalist definition in the sitemap so I can do the definitions via Habmin. every item has label. In Habmin when you create new item you have default label, which usually I change
Lol… my eyes are getting tired… I looked back at your post and the labels are all there. Thought for sure some were missing the first time I looked!
Hmmm. Have you tried deleting the items that are missing data and recreating them again in Paper UI? I don’t see how this would help, but could eliminate any possibility.
Thanks a lot for your help! I’ll continue to dig…
What I see now when BasicUI loads is that every item is some kind of UI widget with following HTML construct
The ones that are missing values in the UI are with this flag data-has-value="false"
so the BasicUI servlet or whatever is there server side is telling the browser that there will be no updates for this widget. Any idea where is the source code of BasicUI?
I’ve seen something like this before. I think if you delete an Item without first removing the link to the Channel, the Link sticks around and OH gets confused thinking there are two instances of that Item still.
@v_velinov, I’d recommend removing all your Links, stop OH, then open userdata/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink and remove all the sections that reference the Items that you are having problems with.
This will at least clear up the potential that OH thinks it has two Items with the same name hanging around.
@rlkoshak Bingo! Thanks for the hint. Indeed it was mess up from old items and current one with same name, distinguishable only by the node ID. What a mess inside the Items table of jsondb and Karaf runtime seems to be unaware of this. That’s why neither PaperUI nor Habmin could show anything wrong. May be if debug level for logs would show some signs
As I mentioned I spotted the old node IDs that were higher due to experiments over time, nothing else was different.
Again thanks a lot. Also to @5iver that gave a hand. Lost one day, but eventually worth the effort since learned some more of the internals oh OH2 :)