I am trying to use the Markers to “illuminate” parts of a floorplan with self-designed oh custom icons to overlay them on the floor plan.
However the icons aren’t equal in width and height. For some reason the oh-marker was designed in a way that it doesn’t allow to set the size individually, so I digged in the source code and hoped I could supply something like [width, height] but it isn’t supported as the size is assigned to both height and width.
I saw in git that you wrote that part of the code.
So I wonder if there is something that speaks against the idea to provide the dimensions individually like
Ok but iconSize still has to be taken into account
i.e. config.iconSize || config.iconSizeWidth || 40
And the iconSizeWidth / iconSizeHeight should be made “advanced” as I believe in general square icons cover most common use cases.
I started the development and therefore setup the environment locally on 3.1.0 M3. It turns out that without changing anything I get the following error in the console on version
Hence, it complains about a missing stylesheet configuration in the component (oh-plan-page and others).
Running the same on
openHAB 3.1.0
Build #2243
I don’t get that problem (note: replacing the imageUrl with something else doesn’t make a difference).
Any idea how I can track down the root cause of that error? I just want to make sure I don’t produce issues with my changes, so I want to know where this comes from before I even start (actually I had started already and first thought I had caused it so I stashed everything but the problem stayed on a clean check out).
I made it. Not really a huge commit but at least my first one in the UI
I haven’t created a MR yet because I forgot to put it onto a branch , so I wanted to ask you if that is still okay?
You can have a first glimpse here:
Here is an example of what is possible with that change:
Merge Request: As soon as you give it a go I will create a Merge Request.
Deploying the new version
I would like to deploy my own version on my production system:
I built the project resulting into org.openhab.ui-3.1.0-SNAPSHOT.jar
In general can I just copy it to the addons folder replacing the current one?
Is this related to the following bundle “195 │ Active │ 80 │ 3.0.1 │ openHAB UI :: Bundles :: Main UI” and should this be stopped first?
As you can see I am on 3.0.1 which is the stable release (I think). Do you recommend to upgrade to the milestone release 3.1.0 M3 via openhabian-config?
It’s easier to do in the console with bundle:update org.openhab.ui file:/<location> or even bundle:update org.openhab.ui https://<location>
(practical when you let the build server produce the binary for you i.e. bundle:update org.openhab.ui https://ci.openhab.org/job/PR-openHAB-WebUI/lastSuccessfulBuild/artifact/bundles/org.openhab.ui/target/org.openhab.ui-3.1.0-SNAPSHOT.jar).
No need to restart openHAB in this case but I believe it will revert to the previous version if you restart/empty the cache. It also might not work since you have different versions.
When running node generate.js in the docs/components/src it in “/openhab-webui/bundles/org.openhab.ui/doc/components/src” I get the following error:
..../openhab-webui/bundles/org.openhab.ui/doc/components/src/generate.js:1
import fs from 'fs'
^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Any idea, why? maybe too old node version (v10.19.0) ?
I didn’t dare yet to go this way because I wouldn’t have known how to rollback if something went wrong (which eventually did), so I went the old-fashioned way to copy the jar to the addons folder. Note that it doesn’t make a different whether 194 is stopped (“resolved”) or not.
Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.ui-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.ui [233]
Unresolved requirement: Import-Package: org.osgi.framework; version="[1.9.0,2.0.0)"
Would the update method you described above work differently?
What if the update doesn’t work either? Is there a mechanism to rollback the bundle update to the installed bundle or do I just “uninstall” and it reverts back to the old one?