HABpanel bundle proof-of-concept (aka. Panel UI)

Hi,

I had a little free time today so I made a proof-of-concept bundle for my alternative GUI project as suggested by Kai :slight_smile:

If you want to check it out, download the .jar here: https://github.com/ghys/openhab2-addons/releases/tag/panelui-2.0.0-SNAPSHOT and drop it into your addons folder. It will install automatically.
Check the logs for:
[INFO ] [b.ui.panelui.internal.PanelUIService] - Started Panel UI at /panelui
It should also appear on the home page dashboard:

Remember, persistence is still restricted to the current browser (in local storage) and not saved on the server at the moment.

14 Likes

Cool, I simply dropped it in my addons and it worked on my openHAB 2 instance - nice dashboard integration :thumbsup:

I definitely encourage you to continue that work :slight_smile:

Great! Looks very promising … and the switch in my test operates in practice with first trial!

Very nice.

I have some sensor data being called by a curl script and my item then rounds this number to 1d.p. so it looks pretty in my sitemap. However trying to use this data in HABPanel has it show as a unwieldy long string. Is there any way to clean this up?

The formatted value (that is, the label text) is not accessible with the items API, so for now you would have to use another item to hold the formatted value, and do the formatting via a rule or do it in advance via a script.
I might allow some formatting in the widget though, I’ll think about it.

In openHAB 2, it is:

  {
    "link": "http://localhost:8080/rest/items/Temperature_GF_Corridor",
    "state": "20.4",
    "stateDescription": {
      "pattern": "%.1f °C",
      "readOnly": false,
      "options": []
    },
    "type": "NumberItem",
    "name": "Temperature_GF_Corridor",
    "label": "Temperature",
    "category": "temperature",
    "tags": [],
    "groupNames": [
      "Temperature",
      "GF_Corridor"
    ]
  },

So you can use something like sprintf to format the value in the client. This is how the Paper UI does it. (Btw, you can probably look at a lot of code from the Paper UI as its “Control” page also work on item level (no sitemaps involved) and it is also done with AngularJS).

1 Like

Ah cool, I’ll have a look at it then.

Very nicely done. Dropped it in and worked great on the first try.

how cool is this!?

Love it!

If this now could show webviews frames I could throw away my dashing dashboard!

Is there something in planning?

Very nice! Easy to set up and use.

Keep up the good work!!

This is AWESOME! :grin:
I was thinking about trying something with Dashing but my knowledge is very limited so your project is a godsend! And I truly think that this is one thing that was always missing in OH.

The possibility to define a dashboard once and use it on other devices would be one of the more important features for me.

Keep up the good work. Thanks!!

You can find a workaround here at the end of 1)

Hi,
Have just had a chance to test in on my OH2 installation - its awesome, you got a fan.

I’m ready for testing / comments etc. if you need it.

Best regards,
Peter :smile:

Thanks, that works for now!

Great. Now you’ve done it…

I’m going to have to port my OH 1.8 to OH2

Like I needed more work to do :smile:

Hey there,

I’ve been working a little bit on the lack of a server side storage problem tonight and come up with a quick, probably (!) temporary solution until a new sitemap concept is introduced.

https://github.com/ghys/openhab2-addons/releases/tag/panelui-2.0.0-20160815

The above release is able to transparently store “panel configurations” in a service configuration property using the API.
This means you can now share the same dashboards to different devices if you use the same panel config in the new advanced settings page:

Once you switch from local storage to a panel configuration (by saving a new one using the provided link), it’s uploaded to the server when you save a change made in the designer.

You can inspect the configuration using Paper UI (Configuration > Services) or with the Karaf command line:

openhab> config:list "(service.pid=org.openhab.ui.panelui)"

Obviously, it’s not recommended at this point to edit it by hand.

Feedback is appreciated as always, especially if you run into issues.

Cheers!

1 Like

Hi,

I have HABpanel installed by loading the code into the conf/html/habpanel directory (from github), to ensure I got updates as they were released, e.g. icon support.

Is the above feature also there or do I need to change to loading the JAR file into the addons directory? If yes, how often do you intend to update the JAR file?

Thanks,
Mike

The client-side commits are in a new “openhab2-panelui” branch which is also pushed to GitHub.

Meaning you have to load the new .jar file to have the service configuration and its description, but once you do that, you can keep on using your installation in conf/html, as long as you pull the “openhab2-panelui” branch from the HABpanel repo (for now). It will be merged to master eventually since it’s falling back to local storage gracefully if server support isn’t available.

Edit: .jar snapshots will be released from time of time, or if there’s a change on the server side.

Thanks for the quick reply.

I will try it out tonight.

Cheers,
Mike

I can confirm that the server storage is working well on my Windows (server & client) and iPad clients. Looks like a good solution and I like the ability to save multiple configurations on the server.

Thanks,
Mike