Hi, just wrote some Block Library to use the NSPanel Lovelace UI with openhab. How to share this library? I have found some information about how to write some Block Library, but none about howto share these. Please point me to the right documentation source or give me some hints…
Thank you all for your input. Some of the resources had been new to me, but still only the Tutorial suggested by @JustinG contains some sparse information. Some questions are still open:
is the publication of an BlockLibrary some automated process or is the forum entry checked manually by some Admin and copied somewhere else?
maybe related: how are code updates handled? If I provide the code via a " direct link to a *.yaml file hosted by [my] preferred service", will the (openhab marketplace) accessible version of the published file immediately change when I change the hosted file?
How to release a bundle of multiple BlockLibrary files, which are required to be used together?
As long as the post is formatted properly, given the correct tags, and in the correct category it will get automatically parsed and added to the Add-on store.
There seems to be very little lag in this process, so changes made to the original post will be re-read fairly quickly and, in my experience modifications either of the code in code fences or the directly linked resource will be available shortly after the post is modified.
I don’t use block libraries, so I don’t know what capability there is for combining them into one file, but right now all such marketplace contributions are limited to one file. There are several discussions about if/how to allow full bundles but right now that is not possible. Your best bet under those circumstances is just to make the initial post as clear as you can about the dependencies and how to ensure they are installed.
On a related note, the actual Marketplace → Library category should only be used for posting the actual entries. Discussion such as this should be in a more general category. I’ve moved this one for now.
Hi, thanks for moving this to the right category and for your helpful information.
The limitation of the marketplace contribution to one file per library is a real drawback. Every yaml can only contain the description of one section in the blockly toolbox, therefore any bigger project will require multiple files. Still unsure how to handle this situation, it does not make sense to publish 5 Block Librarys for the required functionality of my add-on (openhab-blockly-nspanel).
Can you point me to some of the mentioned discussions about the option to use bundles?
I’m afraid I don’t know. I know that I’ve had no trouble with the marketplace logos I have added, but I always paste the images directly into the post instead of linking to offsite images. Maybe that’s the problem?
Just realized today, that the addon, which can be found in the openHAB automation section, is not updated at all. I changed the publication post last week to point to some dedicated release in github (instead of main branch), which is still not reflected by any links in openHAB application. The icon is not there, and the current change to a new release is also not shown in openHAB automation results. Seems like the page is not updated at all…
Do I need to set anything or change anything in the publication post to get the page refreshed?
That certainly didn’t used to be the case. In my experience, edits to the marketplace topics get picked up and propagated to the marketplace fairly quickly.
When I look at an entry in my add-on block library section (e.g. your part 1/5) it looks entirely correct. It matches the version on the forum and links to a 0.3 release page not the main branch of your repo.
Are you by chance using firefox? This could be another symptom of the firefox page caching issues that are becoming very common.
Good to hear that - the issue pointing to the main branch instead of the tagged releases was really giving me some headaches. If error reports come in and you have really no idea what in-between version people are using, ohoh…
Ok, I will check what might be the issue on my side and post it here when resolved.
Some things I’ve done with my rule templates might help with this:
Add a comment somewhere that shows the version number. You can tell users to look for that and tell you what version they are running.
Add a debug or trace level log somewhere that logs out the version number or relevant version numbers if there are dependencies (e.g. my rule templates often depend on recent versions of the openhab-js library and openhab-rules-tools library).
Add checks where possible and generate meaningful error messages if version numbers are not up to date.
Religiously keep the version list on the post up to date (with 1 and 2 a lot of users will realize they need to update on their own).
Not all of these are possible for widgets and blockly libraries but some might be useful.
Thanks for all the suggestions. Finally got my add-ons updated and I can see the real version with the right links now. But I had to remove the previous ones again (as I did this afternoon already) and re-add them. Now I even see the Icon, maybe that’s it than.
One thing, how should some update happen? After I release some new version, will this get indicated to the user in any way? Will there be some update-button? Is the Changelog section somehow parsed? Or is removing and re-installing the way to go? The version-information in the JSON retrieved while opening the automation-addon-page for my libraries is empty: