Next generation design: A Paper UI replacement proposal

(Hilbrand Bouwkamp) #61

It is common enough for you to have put it in your experimental design example :wink:

(David Graeff) #62

I might have shamelessly borrowed that from, maybe ^^.
We need to find a good way to express those rules graphically. Yannick with this FlowBuilder app chose another way. He “compiled” the designed flow into multiple rules, which allowed him to have branches.

(Rich Koshak) #63


I’m not sure I follow what you mean by an else condition.

Anything you can do inside the body of a JSR223 Rule can be done in a Script Action. It also supports all the usual triggers (though it is currently missing Member of, though that may just be a PaperUI limitation). It also has a “but only if…” section where you can specific the states under which the Rule is allowed to Run (essentially all the if return; statements at the top of our currently Rules).

Thus far I’ve not run into any use case that cannot be implemented in NGRE as it is, except for the lack of certain necessary Rule triggers, most of which are a PaperUI limitation, not a NGRE limitation.

Maybe an example will help me understand what you mean.

But that is what the Script Actions are for, or am I missing something?

Though indeed, the equivalent to “global vars” in Rules DSL is absent. There is no way to preserve data in a variable from one run of a Rule to the next or across multiple Rules except by using Items.

(David Graeff) #64

We are talking about the json files, the real rules, not the “JSR223 Rule” (aka Script). We really need to sort this terminology problem.

(Brian OConnell) #65

Also, some kind of docker module integration would be nice. In my case, on my openhabian raspberry PI, i’ve installed some modules with openhabian-config, and also manually, for my openhab ecosystem (like ZIGBEE2MQTT, MIFLORA2MQTT, TASMOADMIN,GRAFANA,…). It would be nice to have this integrated in some way into openhab, and docker seems to be a good way to do it. (I think home assistant works this way).

Not to take this off topic and I am not sure exactly what you are looking for but I wrote a binding to integrate docker with openhab.

(Rich Koshak) #66

But my point is if you use a Script Action you do have else, if, loops, variables, and all the rest. I can import libraries, create functions, call other rules, create classes and can do pretty much anything you can do in Javascript as the Action of a NGRE Rule.

It might be more clear what I mean if you look at the Your First Rule section of the NGRE docs post (I think I linked to it above).

You are not expected to handle all your Rules programming with just the pre-built Actions (e. g send command to Item Foo). If you need something more involved you code it up as a Script Action, which IS Turing complete. and can do pretty much anything you can do in JSR223.

As I showed in the example above, the Javascript does get saved to Jsondb. Look at the example Rule I posted in above. In the “actions” section there is a “configs script” which has my Javascript code I wrote for that rule using PaperUI. It’s mainly importing lewie’s library and calling with some commented out lines of code.

(Rohnny Swennen) #67

@David_Graeff My 2 key bindings are Nikobus for lighting, gates/doors, screens/rollershuttens and SiemensHVAC binding for heating the 2 most crucial components in my home. Everything else is great but will be only nice to have if I loose control over heating and light, gates and rollershutters.

Hence my concern as neither of these are actively maintained and my software skills just aren’t good enough. I have done some basic perl, PHP coding in the past but taking on Java is just a barrier to high to overcome for me.

(Christian W) #68

Really nice work!

There should be a way to control the items / groups
If it’s on the Items tab (green background on mouseover), I would remove the trashcan near this button - big fingers on touchscreens might get nervous :wink:
I personally would put them on a extra control tab.

Regarding “filters” would really like to have a save “custom filter”.
Maybe a setting to apply “filters” to current or all to all relevant tabs.
So you could work on an zwave devices in one room, without switching filters every time. Maybe a predefined filter “edited today” ?

Snapshots /Backups
I really like the idea of creating a backup or snapshot from the UI. (Would be ok with import/ export functionality). Node-Red for example is using GIT for this Node-Red Docs

Would like to be able to add Custom links/tabs f.e. to my running Node-Red.

For new users it would be nice to have some wizard. So you could see all Steps in an overview. Go forward an backword until it works and then “Save” or “Discard”.
Steps like: Add thing(s), Add item(s), Add (to) groups , test controls.

So now I’m really excited about it :slight_smile: :+1:

(David Graeff) #69

I like to remind everybody that this is not a wishlist, but a community involvement request.
I’m not paid for this and to be honest my free time activities are suffering because of this project.

When I have finished the last few missing pages (thing channel configuration and timer page) I will retreat a while from this project. To actually finish it, we would need a full-time funding for about 6 weeks and I guess nobody is willing to back that.

Please, everyone, post your ideas with concrete screenshots and drawings etc in the github issue list, so that those ideas are not lost.

Cheers, David

(David Graeff) #70

Friday weekly progress update

Changes: + 3886 insertions / - 2466 deletions

  • All lists (addons, rules, things, items, scheduled tasks, inbox, …) are now fully dynamic.
    • The content is fetched from a backing store. Just one-step away from a real openHAB instance.
    • Predefined filters work.
    • Prepared for sorting.
    • All actions (Remove, Install etc) are connected to the backing store.
    • A limited amount of items (150) is displayed by default with a “Show more” button at the end. Even large installations should render super fast.
    • A warning is shown if you are currently editing an Item/Thing and openHAB changed the same in the meantime.
  • The Thing channel configuration page received some progress.
  • A language switcher on the maintenance screen
  • A dark-theme switcher on the maintenance screen
  • Changed the items layout.
    • By using tabs the overall layout should look more clean on the Items screen
    • A new separate control tab as recommended by a user
  • Map component. See usage in the Maintenance->Configuration screen


The following tasks are going to happen next. As I’m doing this in my free time I can’t say anything about the due time.

  • Cache system + actual connection to openHAB instance

As usual I’d be happy about contributions (text/images for the tutorial part, design suggestions with screenshots or detailed explanations or even pull requests) or funding.

Cheers, David

(Kobi Kobsen) #71

I´m not sure if this is the right place for this kind of bug / ui-reports:

If you are on a long list - for example add-ons and you scroll down and then click on documentation, this content is loaded into the right sidebar but on top of the page. The sidebar should be position:fixed; so it is always in view.


(David Graeff) #72

That’s unfortunately not that easy, because the sidebar is part of a grid layout.
If you can come up with a solution, I’ll happily integrate that.

(Kobi Kobsen) #73

Yes I have already checked it but I can help with a solution. I do mostly front-end in my daily job. I am glad if I can assist you. I get back to you tomorrow.

(Micael ) #74

Maybe there should be a companion thread about textual configuration; I am also worried about this being mentioned as change proposals in this thread. To me, textual configuration is a much bigger feature than web UI, and I worry that most of us textual users might not even open this thread. I chose OH because of this feature over other home automation set-ups. This was in the early days of OH2…

While I applaud the effort to update Paper, I just hope the current (or similar) textual configs are not at stake here. (I would see item configurations in multi line as something really worrying).

Just saying. :slight_smile:

(David Graeff) #75

There is: Configuration of openHAB

In the OP there is not a single proposal to remove text files. Where do you get that from?

(Micael ) #76

In the OP there is not a single proposal to remove text files. Where do you get that from?

I got it from your advocating it in this thread.
Just voicing my concerns…

Edit: thanks for the link, it is indeed the companion!

(Kobi Kobsen) #77

Hi David, you could use position:sticky on the content element of aside. I think I would add a wrapper div as direct child of aside and apply the positioning to this div.

Only an example:
aside > * { position: sticky; top: 0; }

This has to be modified for your “reload / home” and “close” button also. Sticky-Positioning will work for the most of our current browsers. So I would not polyfill for the older ones as they will ignore it.

(David Graeff) #78

Works really well.

(Rich Koshak) #79

It just occurred to me that there is nowhere to configure persistence in the UI. I suspect this is because there is nothing in the core to support that, but we will need it.

I’m OK with sitemaps going away to some extent, though until and unless the phone apps start to work with HABPanel I don’t know how good of an idea that is. But we need a way to configure persistence.

Should I open an issue on the study, on the core, or wait a bit for the merge with ESH to be completed?

This is probably worthy of a separate discussion unto itself, but I really really dislike simple mode. There is so much that is not workable when using simple mode that IMHO it causes way more problems than it solves. Should we do away with it?

I love the ability to control Items from the Items page.

Similar to the above, there is no way to configure a Profile on an Item through the UI. But looking at the REST API there doesn’t appear to be a way to do it through the REST API either, unless Profiles are stored in metadata. So should I create the issue on the study, the core, or wait?

Over all I like the changes and improvements. I’ve opened a few new issues as well for some things I noticed. Great work!

(David Graeff) #80

That’s out of control of the UI. The core decides if simple mode is on or off. And yes I’d vote for removing that as well. The UI can have a button “Create links for all visible channels” or so. It is really just for UI users anyway, a text file user will not use simple mode.

There is. A profile is a “configuration” on a Link. Those can be configured in my design study on the thing channels page like in Paper UI.

This UI should just be for “Setup & Maintenance”. Sitemaps are for the layout of the “Control” part already. A separate sitemaps layout app might make sense or sitemaps should be editable by all apps that can visualize sitemaps, like the iPhone, android and classicUI app.

I have no idea how persistence works. I have never used it. But I know that there is a REST interface and I agree that it deserves a place in the UI somewhere. Maybe as sub-page within “Maintenance”.