Actually I just want it to remove regarding of the value… As usual, I dont have a need of clicking/pushing anything on my floorplan… But it would be a nice feature to read a meter or something simular using a knob or like…
I´m 99% possitive its possible… It´s just a question of how… Probably by the use of a javascript, I guess.
Like the meters in this video:
1 Like
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
232
So what you want is a non-interactive Gauge, rather than Knob or Slider ??
A quick search found these…
I thought this last one was really interesting, if a little off topic when looking for a Gauge.
The sentences towards the end are most interesting;
Well, one of the peculiarities of styling SVG with CSS is that there are only certain properties we can control. If we want to change the x or y coordinates of a g for instance (without using the CSS transform property) then we’ll need to use JavaScript. What makes this even stranger if you’re unfamiliar with the SVG syntax is that CSS properties will have an affect on certain elements, but not others.
I’m just getting caught up on this thread and somehow missed your comment.
You would define it in an items file. I don’t want to take the thread off topic so I’ll just recommend you look at the documentation page, and open a new thread if you still need some assistance!
EDIT: I may have misunderstood your question. You can either make the item a string or a number, and decide a name (or number) value for each page on your dashboard. You then set the buttons to indicate the active panel with ng-class, and use ng-click for the action of changing pages. Does that make sense?
Hi All,
I was inspired by the SVG integration in OpenHab Widgets and wanted to start with a simple “winamp” like title scrolling label to able to show longer texts in a small window (smartphones).
I hope the idea is inspiring for others.
The ‘static text’ is working ok (although some more customization dreams to make it useful for larger audience (fi: colour picker etc).
Unfortunately i’m a bit stuck to make the config parameters dynamic. The idea is to adjust the duration & shift parameters based on the (dynamic) text. I’m targeting to build this in the OpenHab rules, so would like to avoid/limit usage of JavaScript (not supported?) or angularjs (not familiar with).
(general design concept is to put all my logic in the OpenHab rules)
Can you help me with the syntax or help to be able to change the duration like we can change the text?
(attached the widgets so far … and the challenge below)
dur=“itemState(’{{config.txtOpenHabSVGDuration}}’) + " s”" ==> NOT WORKING
ng-bind=“itemState(’{{config.txtOpenHabSVGString}}’)” ==> OK
Note: ideally I would like to keep all the code in the widget itself, but i’m ok to load CSS or supporting files if required.
I try to open a browser window when clicking a SVG shape embedded into a HABPanel widget. I tried setting the standard SVG onclick attribute to “window.open(“myhtmlpage”);” and it is working fine when opening the SVG file in a browser. Once this SVG is embedded in the HABPanel widget, it does not work (no error in the logs neither). I tried ng-click too, using the same script, but do not get the HTML page displayed either.
Meanwhile I was able to solve my little challenge with the great support from MDAR.
Happy to share the current results. Now able to update scrolling speed/length the text and colour through openhab items and dynamically adjustable through openhab rules.
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
242
Hello
By any chance…
Have any of you any ideas how I / we can get an itemValue to affect an sodipodi:end attribute of an arc?
@Kim_Andersen and I are trying just trying to create a nice little gauge in an SVG.
There is this fabulous gauge widget for HabPanel that works perfectly, which I guess uses something similar to the rotation technique described earlier in this thread.
EDIT: I made some adjustments and moved to the modal, as defined in this link, and it works as expected.
I swear I had this working, but… if I want to use an angular variable (as opposed to using an OpenHab switch) to activate a modal defined in the custom template, ex: <div ng-click="Item_Modal=true">clicky</div>, how would I format the ng-click on an item in the svg? Just having Item_Modal=true in the svg value doesn’t seen to do it.
I know openHAB 3 will bring many changes to the UIs, specifically, that some or all of them will be merged into a new universal UI.
Does anyone in the know have any insight into how that will affect our ability to display SVGs in a HABPanel style as we have in the past? I’m really hoping that kiosk mode will remain available.
hello, always work with lights and UP&DOWN rollershutters
I would like to intert a kind of slider for rullershutters position (read-only)
Is there an object or I’m thinking about a “line” and trasform: scaleX or scaleY on % of the roller position (itemState) : can anybody help me?
PS: I have tryed scaleX on chrome but the line moves in a strange and non-standard way
hello, I would like to share my solution: this is my living room and my kitchen whit lamps and rollershutters.
The up and down button are green if the position is 0%(opened) and red if is 100% (closed) and normally black from 1% to 99%.
Thanks to @ysc and all, for this wonderful SVG dashboard design.
But is there a way one can navigate between the buttons on a dashboard using only the arrows keys on a keyboard? and also click by using the enter key? eg move focus using a keyboard.