Roadmap to Happiness - What is missing in the core framework

Yes please, but with grep like filtering. :smiley:

I’d be very interested in SSL certificates with the embedded MQTT broker.

Yes please.

:+1:

This one is huge. I can’t tell you how much time I and others spend on this one issue on the forum. I just spent 10 minutes helping someone with this very issue. The big deal is rules start running before Items are done being loaded and restoreOnStartup causing havoc.

I think David’s comment means that GUI based Rules editing is already in work. We don’t need to open new issues for stuff that is already being worked. I don’t think anyone is saying that the ERE is done and usable yet. As you mentioned, the documentation isn’t there yet.

The ERE will make this very easy FWIW. You can do this right now with just a few clicks.

:+1:

NOTE: depending on what you are using these for, there might be other options. I documented a few in Design Pattern: Encoding and Accessing Values in Rules

The problem with this is Groups, despite how many people use them, are not strictly hierarchical and Items can belong to any number of Groups. I’m not sure using a Group name would work in this context.

Rules are event driven and are processed fifo. An event occurs and Rules configured to trigger based on those events. And no two events ever really occur at the same time. And unless there is something wrong with your Rules there should always be a thread available to start processing the event.

Given this is how it works today, how would you define the priority and what would you do in all the various cases? For example, I have a Rule that is already running at a lower priority, do I kill it if a Rule at a higher priority comes in?

I’m not arguing against the idea, just trying to understand how it fits.

Then one would argue you need to make sure the events occur in the order you want them to run. Short of a complete rewrite for how pretty much all of ESH/OH works I don’t see how priority can come into it. Maybe instead of fifo a priority queue could be used to assign a Rule thread to an event, but unless you have long running Rules, which is a problem unto itself, there should be no wait. No wait, no priority.

From an architectural purity perspective I agree with you. However, I have helped many users over the years with use cases that became somewhat needlessly complex because of this.

I think the sticky point is if one wants to display the lastUpdate on the sitemap there is a need to create separate Items and Rules to populate those Items. I’m personally kind of meh about the idea since it is so easy to solve with Design Pattern: Associated Items but I do understand the annoyance.

My list:

Generic Transformation Service

Can I expand nested transformations to pulling transformations out of the bindings entirely into a generic transformation service? Why is it I can only use a transformation with certain bindings (e.g. HTTP, Exec, MQTT, etc) but not others (e.g. Zwave, Zigbee, etc)? Why are the bindings involved at all? I’d like to see a way to link a Channel to an Item and apply a transform to the Channel at the Item, not on the Thing.

For a relatively trivial use case, let’s say I have a bunch of Contact door sensors. Contact is the appropriate Item type for this type of sensor. But all the Zwave door sensors require the use of a Switch. Now I either need to create a bunch of proxy Items and Rules to convert the Switches to Contacts so I can now use a Group:Contact for all of them or I have to deal with a Group:Switch and Group:Contact and duplicate the logic.

For another simple use case, I sometimes want to use a Number Item to store the result from an Exec script, but the output channel only lets me store the result in a String. Maybe a generic transformation service would let us write transformations that frees us to use the appropriate Item type for our home automation model instead of what the binding developers decided was appropriate.

Higher Default Number of Rules Execution Threads, Dynamically Sized Pools, Error Logs When Threads Are All in Use

I’m hesitant to request this as at best if masks a problem in people’s configurations. Five should be enough, but for some power users it seems not to be.

And 2 is definitely not enough for the Quartz thread pool. Especially with the natural human propensity to schedule events to happen at midnight or on the hour.

Very simple changes but I don’t know the overall implication.

Even better would be a pool that grows to some maximum and then starts logging errors when we get to the maximum.

At a minimum, it would be nice to get some logs stating that we have X rules awaiting an execution thread. Right now it kind of fails silently.

Sitemap Widgets for Filling out DateTime Items

It’s pretty self explanatory but one just needs to look at the massive complexity and pain involved in all the Alarm Clock examples to see how nice this would be.

It would be nice if it handled full DateTime as well as just a Time.

This may not fit with the core framework but it is a prerequisite for…

Dynamic Scheduler

Related to the previous, a built in scheduler. Lots of people go to great lengths to be able to dynamically set up a schedule for things to happen at certain times on certain days of the week on a repeating basis. For now all we can do is rely on something like the CalDav binding, which doesn’t work well for a lot of users or the creation of dozens of Items and complicated ugly sitemaps.

This is a major weakness in OH right now.

What people need is a way to say from their sitemap/HABPanel “Send MyItem the ON command every weekday at 8:30am” and create a Rule that triggers when MyItem receives the ON command. The Scheduler is smart enough to interpret the Item’s state and schedule the events accordingly.

Maybe this belongs in it’s own binding, but I’m pretty sure there is a need for at least one new Item type to make this work which does impact the core.

Add/Edit Tags in PaperUI

This one is a real challenge for less technical users who want to use Alexa/Google Assistant/Hue Emulation.

Elimination of Contact or Creation of A Standard that Gets Enforced

Contacts are supposed to be used for sensors, Switches are supposed to be used for actuators. But this convention has not been followed by the binding developers. In fact, rarely do I see Contact used at all. While there will be much wailing and gnashing of teeth, I’d like to see either the binding developers follow the standard convention or the elimination of Contact as an Item type.

Status Update on the ERE

This probably doesn’t deserve a an issue and may not even belong here, but what’s the status of the ERE? I know simple Rules can be set up but it is hard to judge it’s maturity. Can we access Actions (I know executeCommandLine is not available yet based on a recent thread)? Logging? Timers?

I’m willing to take a shot at starting the documentation for it but don’t want to start unless it is nearing completeness.

I’m sure I’ll think of more in the shower tomorrow morning. :wink:

Improve Performance of Rules DSL Parsing

There might not be much that can be done with this but users are reporting start up times of 10-40 minutes on RPi 3s due to Rules parsing. I suspect the main focus is on the ERE right now, but the Rules DSL will be around for a bit and we shouldn’t ignore this pain point.

3 Likes

Create a new bug report for every single wrong usage you’ll find :slight_smile:

1 Like

No, not yet, but I plan to… unless someone else gets to it first!

Yes, it would, but very unlikely :wink:. I’ve done some other simple pages that used the REST API, so I figured I’d throw one together in the interim, if making changes without a UI bugged me enough… but without the ability to read metadata through the REST API, I don’t believe this would be possible. I don’t have the ESH knowledge to develop the Paper UI, and there would be deeper work needed to be done first. With the recent work in Semantic Tagging, I also expect there isn’t a very firm codebase to work on. I think this is one that would need @Kai’s lead, if he doesn’t kibosh it all together.

Rich also mentioned editting Tags in a UI, which is closely related to this.

This is a PaperUI, ClassicUI shortage and need to be reported as an issue, I strongly agree. There are so many basic widgets missing actually. Like Push Buttons and Multi-State Buttons.

Yes (executeCommandLine works fine… which thread?), yes, and yes. :smiley:

@chris is going to hate me…

He doesn’t agree (we had a thread on this a year or so ago) IIRC.

I’m talking ERE, not JSR223. Specifically editing the JavaScript in the browser.

2018-10-23 15:51:04.416 [ERROR] [internal.handler.ScriptActionHandler] - Script execution failed: ReferenceError: "executeCommandLine" is not defined in <eval> at line number 1

I’ve tried several formats and ways to define the script, mostly blind since I don’t know what is appropriate here but I always get something indicating that my JavaScript is completely malformed or it doesn’t know what executeCommandLine is. But based on the JSR223 Actions.js examples that line should work.

I know there is some overlap between the ERE and JSR223 but they clearly are not the same and features that are available in JSR223 are not in native ERE. And since the vast majority of ERE users will be writing the scripts like the above that is what I’m looking for status on.

Jython and Groovy are not options under “the scripting language used”.

tl;dr, just because it works in JSR223 doesn’t mean it works in ERE, yet.

I don’t remember disagreeing with this ;). I don’t mind people opening up multiple reports unless they are clearly linked and we’re trying to solve a specific issue. One thing I do dislike is people assuming that two issues are the same when often they aren’t…

I have one: The ability to tell if a device was changed from outside of openHAB (for example a user manually turned on a light) or from within such as a rule. Even something as simple as the triggering source property being either something like “system” or “binding” would be useful I think.

  1. Id like to see the Private cloud of Openhab Cloud being intergrated, ie a component fully installed as part of the install. You either select internal or external. Not that the external cloud is unreliable but I prefer all on premise

  2. Echo the remote access restrictions, there needs to be more granular control over security for other users as Vincent as mentioned. Allowing certain users to see/do certain things would be great

  3. Graphical interface of the debug system with the ability to easy filter based on binding etc

Hey

That’s a great question thanks for asking! So here are just a few ideas for issues i have had:

  • Built in user authentication (Instead of using nginx proxy)
  • Built in SSL generation using Lets encrypt (Instead of manual generation) or manual addition using Paper UI (this would also solve the need for nginx)
  • Built in configurable proxy (give the ability to access things like camera images and video streams without opening individual ports for each camera on the router)
  • Built in Terminal client in Paper UI for CLI access instead of using third party tools
  • Built in DynDNS or other DDNS reporting (auto update dynamic dns)
  • Built in UPNP client to open router ports (auto open router port for access)
  • Separate log/register for device state changes (Instead of scrolling through miles of log files)
  • Tagging support in paper UI (instead of having to manually add them through the console, useful for Alexa integration )
  • Ability to trigger zwave inclusion and exclusion from sitemap items
  • Ability to have code generated sitemap items or dynamic drop down lists (Listing radio stations, songs, etc)
  • Ability to have multi-line sitemap items
  • Built-in GPS tracking and reporting in the mobile app (This might be a bit out of the core scope)
  • Built-in Text input fields in the mobile and basic UI (This might be a bit out of the core scope)

I know there was a couple more things that would be nice to see but I cannot remember them right now, so I hope this list helps.

Thanks!
Sebastian

2 Likes
  1. Scheduling…Scheduling…Scheduling
  2. A method to see the status of timers…how much time is left

It is not. Depending on the item, you may want to reset it to default or keep the persisted value, so you need a rule in any case. You can deploy a single rule to trigger on ‘System started’ to set all default values in one go, and unlike with a simple item property, you can even apply conditions here.
I’d even go further and say that the ability to set it via config will result in a number of issues where people set defaults and forget about when programming their rules. From someone’s point of view to spend a lot of time on supporting other people debug their rules I’d therefore even vote against having this.
Yes the need to check for NULL is annoying but that’s integral part of proper programming anyway, and the main root problem is the unreliable startup order so rules sometimes get processed while items aren’t available yet. But that issue already is on the list.

Either way, this thread is meant to consolidate needs that several people have in the core framework so developers know what they should focus upon, and my point was that none of your points require any changes to the core but can be solved differently without too much hassle really.

On Smart Home Day, @henning reported plans to replace the current scheduler.
I agree it would be great to also allow for user-provided scheduled actions/rules to be managed by the framework, maybe there’s a chance to combine this ?

@kai stated that essentially ESH automation engine is to replace the ‘old’ engine in the foreseeable future (here’s the recording).
But I think there’s still many details that need to be sorted out.

I like this point. An automatically updated list of running timers (more than 2 seconds timeout time) would be amazing.

As an end user of Openhab, the one thing I would really like to see improved is the App functionality and the ability to do most things that PaperUI and Habmin can do but with greater ease through your phone or tablets Apps.

Currently, to add or exclude zwave devices, enable/disable bindings, and so forth requires a web browser to do those various things. I would really like to see back-end administration functionality added to the Apps. The ability o restart your System via the APPwithout needing rules, and so forth.

Just think about multi-user supports. If/when that gets added. Would I need to add users and permissions via logging in via a web browser?

One other item is the ability to both Upgrade and possibly downgrade your OH2 Version via a GUI and/or thru an app. Currently this can sort of be done with some rules and dummy switches, but a built it upgrade option would be highly desirable.

Sorry to be a bit unfriendly here but I think you quite misunderstood the way OH is composed and built.
PaperUI/habmin and BasicUI/HABpanel/ClassicUI are intentionally separated as they serve different purposes. PaperUI/habmin is for administrative tasks only such as to add devices.
These are more or less one-time (or few-times) tasks. This functionality isn’t needed by and not meant to be accessible to end users, so there won’t be any apps to duplicate this. Stick with using the browser.

On upgrades, there’s another (intentional) separation/layering. The OH core is built to run on top of Java but it doesn’t include all the functionality OS, Java and external helper apps such as mosquitto provide.
The upgrade process in turn is highly OS specific and as such out of scope for the OH core framework.
If that’s what you’re looking for, have a look at openHABian or any of the commercial appliance type solutions built on top of Eclipse Smart Home.

Not unfriendly at all :slight_smile: And perhaps I misled by saying ‘enduser’, and by that I meant someone like myself who is not a developer, but runs their own OH2 system at home and is familiar with the setup, installing from scratch on a linux or other OS machine, setting up mosquitto, etc.

And by enduser, I was more implying the ‘administrator’ of the system. The person who may be adding devices, enabling new bindings, etc, giving mult-users rights and permissions, etc… I think Zwave may be a good example. You add a new sensor, switch or something. But then need to go a web browser to add this device into your zwave network. Yes, all controllers and hardware different, and I understand that as well.

Having an ‘admin’ account with PaperUI and other access from your Phone or Tablet and not needing a web browser I think would make OH2 more user friendly to the the novice in setting things up. This sort of goes along with the multi user and permissions request. Just adding on to request that the Admin or Super Admin of OH2 should be able to do things without needing to go a web browser. Many of today’s younger generation do everything off their phones and tablets with various apps, and very little actual web browser stuff.

Perhaps this not a core framework item, but is something I think many would like to see.

On a final note, I could one day foresee the Road to Happiness following a similar path of XBMC/Kodi. What started out very small now has various 3rd party vendors selling prebuilt Kodi boxes. Similarly one day to see 3rd parties selling prebuilt OH2 boxes with the main zwave, zigbee, Bluetooth, wifi sensors and a preconfigured OH install.

Not really, it would just be another frontend to the same API, without any added benefit.
You (the user) would still need to understand the meaning of all the settings - and there are so many more than are in Kodi.

What you probably mean is to turn all of OH into an appliance, so it’s rather the following you want:

I don’t, this is illusive. OH is so much more complex and flexible than Kodi is, effectively exponentiating the efforts of turning openHABian or even openHAB itself into an appliance.
For reference as there’s apparently a larger number of people to totally underestimate the efforts involved:
this has been discussed e.g. here.

@opus

Export (Dump) and Import. So you can prune the obviously bad entries in the RRD…