# Node-RED as Alternative Rule Engine

**URL:** <https://community.openhab.org/t/node-red-as-alternative-rule-engine/29509>\
**Category:** Tutorials & Examples\
**Tags:** rules, node-red\
**Created:** [June 5, 2017, 4:48pm UTC](https://community.openhab.org/t/node-red-as-alternative-rule-engine/29509 "2017-06-05T16:48:54Z")\
**Posts on this page:** 1\
**Showing post:** 56

<div class="post-metadata">

**Author:** ![rgerrans](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@rgerrans](https://community.openhab.org/u/rgerrans)\
**Post date:** [September 8, 2017, 2:12pm UTC](https://community.openhab.org/t/node-red-as-alternative-rule-engine/29509/56 "2017-09-08T14:12:41Z")

</div>

Adding Node-RED definitely increases the overall complexity, but also increases the overall flexibility.

When I look at OH I think of it as three layers: the bindings (the interface layer); the rules engine (the application layer); and the GUI (the presentation layer).

By moving to MQTT to sit on top of the interface layer, I made it so I can isolate the OH bindings as interfaces and expand the interface layer through other programs. A specific example in my case is that I have an NX584 alarm system. The current OH binding didn’t quite meet my needs so I was able to use a 3rd party interface to map the communication to MQTT (I did it through Node-RED temporarily but will make some tweaks to do it direct to MQTT).

With Node-RED, I’ve pretty much replaced the application layer from OH and also using it as an additional interface layer by replacing a number of the bindings (I use a WeatherUnderground node to replace my WU binding, a timer node to replace Astro, and a harmony hub node to replace harmony binding) and then feed the outputs back into MQTT. I figure going direct through these nodes should improve performance (though I’m sure it’s a pretty minuscule improvement)

Now I’m looking at some MQTT GUI interface tools to potentially replace the OH SItemaps/App which will give me the ability to not have to map back into OH items that I control outside of it (like the alarm system, harmony, etc.) and give me more flexibility:

> [@Need for a cross platform, customizable ui](https://community.openhab.org/t/need-for-a-cross-platform-customizable-ui/33340/17):
>
> I was in the same situation as TS some time ago, when I started. But then I found, that there are many nice products on the market, which you just need to find. So if you need cross-platform customizable UI without any programming I know at least two options. They both provide responsive feedback due to MQTT nature(no REST stuff). All you need is to set up MQTT event bus binding in OpenHAB and … [CommandFusion iViewer](http://www.commandfusion.com/software/iviewer) - for this you will need [MQTT Plug-in,](https://github.com/syoma755/Commandfusion-MQTT-Plugin) which I provided in it’s group. Afte…

If all you are looking for is a more visual rules interface, it sounds like this is an interesting alternative:

> [@Flows Builder - a visual designer for the new rules engine](https://community.openhab.org/t/flows-builder-a-visual-designer-for-the-new-rules-engine/33443):
>
> Hi, I’ve been playing with the “experimental” rules engine lately, to see if I could migrate most of my DSL rules to it (they are pretty simple). It’s working OK so far, and I think it has a lot of potential, especially with the JSR 223 scripting support, but the Paper UI interface to design them was IMHO not great - lots of clicks, dialog boxes, unneeded animations and so on. So I went ahead and forked HABPanel to make my own IDE smiley … it’s still good old AngularJS 1.x, not the fancy new …

---

_[View the full topic](https://community.openhab.org/t/node-red-as-alternative-rule-engine/29509)._
