Making OH Rules Easier for Everyone

No i don’t have a better idea (except slowly moving the community over to JSR223 Js/Python, offering more copypasta code examples on the forum etc), i was just genuinely wondering if learning a few JS bits wouldn’t be easier for a non-technical person. It’s hard for me to imagine to be a noob so maybe i’m wrong but the rules DSL seems quite cumbersome and quirky in many regards, like datatypes, date and time, lambdas and such, JS is much easier to grasp and is more forgiving on syntax/datatype errors, plus runs and compiles faster, has full IDE support and such.
People wouldn’t be stuck with seeking help on the openhab forum too because this is pretty much the only place on the net where you can get help regarding Rules DSL. On the other hand you can find JavaScript tutorials all over the place, i guess you can google and copy paste your stuff together without even knowing the basics and the error messages you get are much more detailled so you know what went wrong.

The only easy thing about Rules DSL is probably the “when, then, end” syntax, but if you are using some helper functions with JSR223, it’s pretty much the same, see https://github.com/illnesse/openhab2_pub_001/blob/master/automation/jsr223/00_scripts/01_system.js

Plus JS/Python etc isn’t a dead-end, the knowledge can be easily applied to other projects, so learning a few bits here and there won’t hurt. Xtend / Rules DSL on the other hand, idk. it’s pretty specific to Java stuff.

Anyways, i was just wondering if people actually find it easier to work with Rules DSL

Also Lucid looks interesting and i’m glad you like my tutorial stuff but it’s actually not HABPanel but BasicUI on steroids :smile:

1 Like