I made the change to the database and requested review. I also downloaded the XML file to my system and tried to update the JAR file locally and do a bundle:update but it still doesn’t work, so I think I didn’t do something correctly trying to update the JAR file. After doing the bundle:update, the userdata/tmp/kar folder still has the old JAR file, so not sure how to verify if/where the new version went. I tried resetting the door locks and re-adding them, but no luck so far.
There is so much I don’t know about openhab yet. Anyone have a link to read up on how to know when a new zwave database snapshot is available, and how to download it?
Thanks Bob, I followed your post on updating the jar file and I’ve confirmed that I made the file with the new XML included, but after doing the bundle: update, the jar in userdata/tmp/kar/… is still the old one.
Is this correct or should that file be replaced with my new one?
It is a temp folder so maybe that folder has nothing to do with the bundle:update just the original bundle:install ?
How can I confirm what jar file openhab is actually using?
First welcome. I missed that this was your first post here.
The jar that you found and modified (in a separate location) will not change in the original location. I recall the updated jar is in the cache folder, down a few layers and Id’ed by the number of the bundle. (I have converted to docker, so don’t recall exactly now and haven’t run bundle:update recently). I think it will work to run the “find” command again after bundle:update to find it.
The simplest is if your device is now discovered. You may need to delete the thing using the UI (do not exclude it) and then go to inbox/zwave/scan to pick it up with the new properties.
If that doesn’t work something may have not gone right. One option since you are only adding a “fingerprint”. If you have a zip-like utility you can look into the jar (the XML section is “flat” (not compiled) and can be edited to add the new type:id (or see if the jar update worked) rather than the jar update procedure. That is less error prone for changes of this type.
Another option, a little more complicated, is to uninstall the zwave binding using the UI and drop the modified jar in the addons folder. That way you know that is the one being used. However, to get that to work, in the karaf console you have to manually add the dependencies
feature:install openhab-transport-serial
Lastly, I thought the date changes when running bundle:list -s from the console, but I could be wrong if you are only modifying an XML.
Hope this helps, but if not let me know. We’ll get you going.
Ok, I found the cache folder under userdata. I was originally thrown off by it being org.eclipse…, but I see that must be the caching mechanism. I haven’t done any Java development since college and that was 20+ years ago.
I grabbed the bundleFile from the cache and extracted it, it contains the correct xml file for ks620_0_0.xml
I downloaded the xml file from OpenSmartHouse.org after I made the database change. The only difference is adding “,0811:23A9” to the manufacturerRef property.
Sadly, the binding still shows Unidentified for my Thing. I’ve tried removing the thing. I’ve tried factory resetting the lock. I’ve tried rebooting openhabian.
I was able to do bundle:list with -u and it shows that bundle 284 in my case comes from /home/openhabian/jarmodify/… I changed the file name last time, adding my initials to be sure I got the latest since I hadn’t found the cache yet.
Hmm, opening what I uploaded, looks like I might have a copy-paste problem, there’s no opening xml tag on the first line. I’ll try grabbing the xml from the original jar file and making the edit instead of the copy-paste from the website.
It Works! I didn’t even have to remove the thing, the channels just showed up! Of course I was lazy and my thing names are ugly, so I’ll do that anyway.
For future reference (if an existing XML is not available), use the gear icon for OH2 XML in the smarthouse DB and copy paste from the window that opens up into the correct file name on your local machine. It is not formatted very well but will work.
@apella12 Thank you for referring me here from another thread. I plan to go through the process as @bcarp did, but I’m also wondering: do you know when these DB updates will be included in a future OpenHAB version so we don’t have to go through this manual process?
The developer does a lot of international travel, so the DB updates tend to be when he is infrequently home, so it is hard to say.
More info: The ZW DB updates have not been ported back to the patch releases (5.0.x). If you are on at least 5.0 you should be able to update the binding to a 5.1 ZW snapshot as explained here. The zwave snapshots are here after a ZW DB update. If you want a full consistent OH version you will need to use a 5.1 snapshot after the ZW DB is updated.
@apella12 I’ve attempted this fix a few times, and I keep getting Permission Denied error on bundle:update. I’m ssh-ing into my raspi as openhabian user - I can’t log in with openhab user. I’ve tried chown to update ownership of files/folders, but still no luck. Do you have any suggestions? Do I need to nuke everything and attempt to start from scratch with OpenHAB?
Another option: on the UI remove the ZW binding, then drop the modified jar into the addons folder, then in the console run feature:install openhab-transport-serial
I will try the other option you noted with the modified JAR file. Do I need to do anything with the existing.kar file from the addons dir or leave it there?
I have a little different setup, but I think it is okay to leave the .kar.
I’m not sure about the permission, I’ll need to look a sec. EDIT: I don’t have time right now. The other method should work, but maybe there is an issue between users openhabian and openhab. Could move the merged jar into the openhab structure usr/lib/openhab (I’m on docker now, so that’s from memory).