Next generation design : Ideas & Discussions


(Rich Koshak) #177

I don’t know. I think just rules. And the more powerful machine may get you past it. I’m on a VM (two cores CPU, 8 gig ram) and my startup time is less than a minute. When I heard that RPi users routinely see load times in the tens of minutes I was very surprised. I would not be surprised is there is something about how the ARM processors on SBCs work that could be a problem. I should note that I only recently added a core to this VM because I plan on running IP Camera stuff on it (up to four cameras). I was seeing similar performance with only one CPU. And it has WAY more RAM than it needs, but I’ve plenty of ram to spare on the host.


(YF) #178

Rich, that speed statement is in the context of making backward-incompatible changes. I do see strange issues as well, and when the system acts up, the solution is to restart OH. It’s definitely not the proper way to fix it, but IMO this only affects a small set of people making changes on the production machine.

I also believe if we look deeply at the problem, the issue is not because of the slow loading of the xtend rules. It is likely caused by a lock or unsynchronized states. The slow hardware just makes the problem more likely to happen.


(marcel_erkel) #179

No need to apologize. Just because I’ve been around longer does not mean that I’m more important that you are. In my opinion we’re all equal sharing the same goal, we just have different opinions on some things. These different opinions can only make openHAB a better product.

So you don’t count, because you didn’t complain. That’s my point. The people that complain are usually not the ones stepping up and take action. And those that take action usually do not complain because they simply fix what is wrong.

If I read ‘imagine’ as in ‘dream’ then for me that would be a nightmare :wink:

I didn’t understand it that way, but maybe I was put on the wrong foot when David wrote that he wasn’t going to write a JavaScript parser for the current syntax. That to me seemed like the parsing was going to be part of PaperUI-NG, not a separate tool. But maybe he meant to use the parser for syntax highlighting and verification.


(David Graeff) #180

Exactly. If I want to support a textual mode in Paper UI with the current .thing / .item syntax, I would need to write a parser for that syntax. And that is a nightmare.

Because this thread is going out of hands a bit (a lot of repetitive comments), does it perhaps make sense to close this as resolved and open another Thread with the same name?

I would then summarise my proposal again, considering all comments. Unfortunately I can’t please Markus @mstormi in my proposal and let the current .thing / .item files stay as they are. XTend really needs to go. Starting up OH shouldn’t take half an hour for a decent setup.


(Markus Storm) #181

I don’t feel this to be that much of a repetition. No I don’t think that makes sense as it likely won’t change anyone’s position.

I do think that it makes the most sense to wait for @Kai to come up with his view on things as he announced.


(David Graeff) #182

He’s not exactly talking about this topic, more about the generell forward direction as some things have changed.
Will still need to find a solution for this particular subject.


(Juelicher) #183

Blockquote
Unfortunately I can’t please Markus @mstormi in my proposal and let the current .thing / .item files stay as they are. XTend really needs to go. Starting up OH shouldn’t take half an hour for a decent setup.

I understand the need for removing XTend and I agree with that. I am also not opposed to change the file format, if this has benefits. ( so, not a total die hard old timer and btw. I just finished rewriting all of my rules in Jython). I just prefer having editable files in text format.

I agree with what rlkoshak wrote, some tools for making the migration easier would be needed, as nobody likes spending hours and hours, just to have I system with the exact same functionality as before.

What I would like to understand, just to get a better insight is, why there is such a big dependency between XTend and the current file syntax. Would it not be possible to rewrite the parser using one of the parser generators available? Of course this would leave the problem, that this solution would have to o be maintained by the openHAB developers.


(David Graeff) #184

That is possible. The grammar need to be written though. And there is still the problem that there is no tooling for our custom syntax. xTend is not the only problem. There is no file writer existing for exporting the internal openHAB state back to files. And if you read through the forum you will find especially newcomers to struggle with the syntax. It is not structured enough, to be honest. But you will find all of this discussed in this thread already.


(Malte Wedel) #185

I am completely new to OpenHAB, just installed a week ago. I tried to use PaperUI for about 2 hours, before I gave up on it and switched to edit files in /etc/openhab2 - not just because I have to use some v1 bindings, but because of the amount of clicks/interactions needed to add things/items and the fact that it does store the created objects in a different location than /etc.

If there was an editor in the browser UI which is editing the files in /etc, that supports syntax highlighting and is showing contextual help for the type of object I am currently editing, so I don’t have to open a browser window next to it, I would use it.


(Rich Koshak) #186

It’s really Xtext I think which is the base language parser that is used to define the syntax for both. In short, we currently have the exact situation you describe with Xtext being the parser generator that was used for the config files. Xtend is a programming language whose parser was also generated using Xtext.

So moving to some other parser generator doesn’t really improve things all that much because we are still on the hook to maintain a custom grammar and reliant on a single source for the parser generator libraries.

And the parser generator only gives you half of the problem (reading). We still need to be able to write in order to have a migration path between text and UI configs.

In short, IMHO, moving to some other parser generator will be a lot of work for very little long term benefit.


(Branden Smale) #187

Though I’m only halfway through the thread, as a user since 1.5, I would prefer a GUI solution. I’m on board with your solution.


(David Graeff) #188

My proposal is online: Next generation design: Paper UI design study


(Michael Parment) #189

When Paper UI arrived i started to use GUI for both things and items.
After a while i went back to text files depending on that i had to recreate many things when i updated different bindings- When i use text files i do not have to recreate things when updating.

I we can solve that issue i think it is best for general users (the ones that is not daily here :smile: ) to use gui for configuration.

/Mike


(David Graeff) #190

Yes that’s a known issue in the core that hopefully is resolved some day. In the meantime a simple “Recreate that Thing” action in the openhab-cli or via GUI would already be helpful.


(Christian W) #191

+1 yes would be really helpfull :slight_smile:


(Jan N. Klug) #192

And perhaps (should be easy if the other thing can be done) „change thing type“.


(John Chiasson) #193

Aren’t comments an issue with JSON currently? Does yaml allow comments?


(Hilbrand Bouwkamp) #194

Yaml supports line comments. Json doesn’t. However gson the json parser used by oh does support al kind of commennts. Reading is one thing, writing yaml or json removes all comments.


(David Graeff) #195

I have put together a “roadmap” document and one point on it is to let Things/Items/Scheduled-Tasks have a generic comment/annotation. When presented in textual form to the user I thought about pulling that field out and put in front of the object, like so:

Database form:

{
  id:"abc",
  some: "value",
  annotation: "my little comment"
}

Textual form (yaml in this case):

# my little comment
abc:
   some: value

WDYT?


(John Chiasson) #196

Looks good David. IMHO, I can’t remember what I did last week without comments in the files :slight_smile: