HABPanel - Yet another implementation of a no-frills dashboard

Hum, apparently the persistence API changed right after I last updated my openHAB distro… I’ll have to update and fix.

I don’t think the toFixed(1) part is needed though, the ng-knob code seems to do that for you automatically when you set the precision (“step”).

I can’t reproduce your issue of the value set back to 0 when refreshing the page though (but I tried with a simple Number item without a binding).

I’ll test a little bit more this weekend and merge the change to parseFloat (for the slider as well).

Thanks for figuring that out!

Hi @ysc ,
Here is my item and SiteMap configuration for reproducing the issue:

Number TERMOSTATO_T_SET_POINT "Temp. Impostata[%.1f °C]" (gpTermostato)

Setpoint item=TERMOSTATO_T_SET_POINT minValue=15 maxValue=28 step=0.1 icon="temperature"

As you can see is a simple number without a binding. This item is used as setpoint for thermostat done with openhab, for this reason has not a binding.

If you need some logs or some other information to troubleshoot, let me know.

For my modification, I forked your repo, so if you wan i can do a pull request. Let me know.

Marco

Hi @ysc,
I did another test. I mod the slider to support float and added a slider to my configuration, with same settings of the knob, and i do not have the zero issue on reloading the page.

I hope this can help you on troubleshoot.

Marco

Hi @ysc
another small issue. Dummy do not round decimal:

Marco

How to install HABPanel to OH1?

Take a look at the first post!

I didn’t find ‘static’ folder in OH1 folder. I use synology package.

Take a look at this post, there is a picture with the folder structure.
According to that you should find your webapps/static folder at @appstore/OpenHAB/webapps/static.

When I start HABPanel, I can add new dashboards and widgets. However, when I try to link a widget to an openHAB item, I cannot select any item. The box is empty. A check of bundle:list shows that the HABPanel user interface is installed, and all items perfectly work with the other UI’s. I installed HABPanel from PaperUI. Any idea what I am missing here?

@marcolino7 I reproduced your issue with the knob widget and have a fix, though I’m not happy with it… Still, it should do the trick. If you got the occasion, try to pull the latest changes from GitHub.

No idea, try hitting F12 from a Chrome browser and check if there’s red in the console or in the Network tab.

Checked the console tab and found some “red” but I have no clue what this is saying me. Any Idea?

The value “device-width;” for key “width” is invalid, and has been ignored.
index.html:9 The value “1.0;” for key “initial-scale” was truncated to its numeric prefix.
index.html:9 The value “1.0;” for key “maximum-scale” was truncated to its numeric prefix.
index.html:9 The value “0;” for key “user-scalable” was truncated to its numeric prefix.
index.html:9 Error parsing a meta element’s content: ‘;’ is not a valid key-value pair separator. Please use ‘,’ instead.
widgets.module.js:31 Registered widget type: button
widgets.module.js:31 Registered widget type: chart
widgets.module.js:31 Registered widget type: colorpicker
widgets.module.js:31 Registered widget type: dummy
widgets.module.js:31 Registered widget type: frame
widgets.module.js:31 Registered widget type: image
widgets.module.js:31 Registered widget type: knob
widgets.module.js:31 Registered widget type: label
widgets.module.js:31 Registered widget type: slider
widgets.module.js:31 Registered widget type: switch
chrome-extension://khhknibajnglicphgmcljopiboihjdgn/js/popup.js:1 Uncaught TypeError: Cannot set property ‘innerHTML’ of null
openhab.service.js:184 openHAB 2 service configuration loaded
http://192.168.178.38:8080/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)
http://192.168.178.38:8080/rest/items Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Found the issue. A MAP statement in the items file was wrong (%s instead of %d). Works now.
Thanks for showing me the way …

Hi @ysc
your trick work, now know show the right value on browser reload.

Hi have another issue, but I have not understood if this is the expected behaviour or not.
If I change one value on OpenHAB interface, the value do not chance on HabPanel, until I refresh the page or I use the reload button. I’m running openhab 1.8.3

And a question. I have not understood how button work. It’s a Bistable button as openhab do? I’m not able to create a simple ON/OFF button to turn on and off a light. Can you helpme to understand?
Many Thanks

Marco

@ysc,

MAN, great work. It so nice!

I ve some ideas if it will be part of the distro we may lookup to integrate a kind of user model/profiles?
I mean it would be great if the user opening his habpanel could have a personalized view on his panel.

As there are activities going on with authentication for oh2, we could think about glueing this together?
So HABpanel would be multi user agnostic…

Really great stuff. We were praying for a UI expert…here you came :slight_smile:

Best Regards
Mehmet

Live refresh has issues on 1.8. It stops working after a while - I gave up trying to work around it and switched to 2.0 for this reason to be honest.

The button is for sending a fixed command to an item, usually you have one for each value you define and some rules behind to trigger actions on other items. The switch widget is what you want to use to send ON/OFF commands to a Switch item.

Well, we’ll see. For now you can define your panels separately on each browser instance, then flip the “Lock editing” switch on HABPanel’s config in Paper UI to prevent changing them (it’s not a proper security feature, you can bypass it with the browser’s developer tools).

Hi @ysc,
thanks for explanation, switch works.

Regarding the refresh, I’m very sad to hear this news from you. I have OHab 1.8.3 and use it as Thermostat, so I have no time to move to OpenHab 2.0 before winter. The main binding i use to control my house (Souliss) is not ready yet for 2.0, so i have to stay on 1.8.3 for now.
There is a lot of people on 1.8 yet, so I very appreciate if you can take some time to try to fix the refresh on 1.8. I really appreciate.

Reagrds

Marco

Unfortunately it’s out of my control (believe me, I spent hours trying a lot of things). The server simply stops sending the updates until you restart it, I believe this occurs when you connect a second client…
The best I could eventually do is add an option to refresh the complete list of items every x seconds, which is far from ideal for both the server and the user experience. I’ll consider it though.

Just seen this, looks great, I am OH 1.8 so will give this a try over the weekend :smiley: