Performance on RPi and lighting hardware recommendations

I’m still building my home, it looks like this (photo) so we have a long way to go until I start to run cables!

I’m crazy about dimmable lighting. This creates all kinds of problems with compatibility of dimmer and bulb, as well as control.

I haven’t used DMX but I found a cheap 12 channel high quality DMX mains dimmer on ebay which I bought. I need about 35 channels in total so I’d need to invest in more.

Question 1: should I stay with DMX, or use something else?

Here’s what I want:

  • to send signals from OpenHAB to 5 lights at the same time to set a scene
  • to fade the scene nicely (presumably this is a function of the dimmer unit itself?)
  • to make instantaneous changes to dimmer status, e.g. I send fast messages to OpenHAB to increase or decrease the dimmer by 1% as I turn up or down a knob.

For testing in my current home I’ve used LightwaveRF, but each message takes 1 second, so the above specs are not possible.

Also did I mention - I need this to be cheap. I can’t afford £50 per channel!

To give an idea, I bought 12 channels for £150 … and they are high quality by a UK company called Mode Lighting. (Used equipment.)

Question 2: RPi2. Is this thing fast enough - I mean is it REALLY fast enough to run lots of OpenHAB commands, like 5 per second? Right now I use Windows with 8GB RAM and a good processor but I want to move to RPi for reduced energy…

Just a bit of a warning, the “at the same time” part of this requirement will not be as straight forward or perfect as you may hope, no matter what hardware you run OH on. There are several tricks I’ve come up with helping others solve this particular problem but be aware that there will be a delay (maybe 50-100 msecs) between each command sent to each light; perhaps less if using JSR233 and Jython.

Some support this, some don’t (my main experience is helping people with zwave, DMX may be a different story) and you have to implement the fade yourself in rules. The delay I mention above is primarily a concern in this scenario where you do have to implement it in rules.

Depends on how fast is “instantaneous”. I don’t think any technology can support the true meaning of that word. However, in my experience with zwave sub 200 msec is easily achievable with sub 50 msec possible. OH processes events in parallel so if they come too close together, they could be processed out of order. If all you are sending are increase/decrease commands this doesn’t matter but if you are sending absolute values it may jump back and forth.

The above comments stem from the perspective of the limitations of OH architecturally and not related to any specific technology.

Most people I’ve seen running it on a Pi on this forum are using a RPi2. If you are buying new I would buy a RPi3 instead or one of the beefier board computers. However, be aware that if you want this server to be rock solid for many years to come you will have to go through some extra work to make it basically a read only server (at least when it comes to the SD card) as repeated writes will ware out the SD card and your server will crash and have to be rebuilt.

Personally for something as important as home automation which I would want to run trouble free for months or years without maintenance I would choose something a little closer to a real server like a Nuk.

I have a dmx setup running. I chose it because I needed cheap dimmers and for the possibility to use them with an artnet - dmx gateway (check ulrich radig homepage for a cheap one).
DMX offers quite fast response times bus-wise.

I have 6 x 4Channels in my living room. I do custom dimming routines with the dmx and JSR223 (Jython) on the PI2 and I get a cylcle time of ~150ms for all lights. This means ~7 Updates per second for all lights (~42Commands/sec).
However, this is not achievable with the normal rule-engine, you need to use the JSR223 binding (you can find the threads in this forum if you search).
I started implementing a DMX-Artnet binding which would do this its self so it would be available in the normal rule engine but I gut lost somehow.

If you buy new hardware, go for the PI3 or the Odroid C2 or something with even more performance.

@rlkoshak Thanks for the excellent pointers, and for giving such a clear idea of delays! Personally I can live with delays like 50-100ms between each command - with 5 circuits in a room that’s only half a second which I don’t think will look too bad. I’m not familiar with JSR233 and Jython - just checked out the OpenHAB pages and to be honest it may be beyond me to learn a different scripting language at this stage.

Perhaps a better option might be to set up some intermediate hardware (Arduino) to store and activate the scenes using a single MQTT message from OpenHAB. It’s an additional layer of configuration but perhaps it could be automated (by storing scene settings in OpenHAB and “downloading” them at Arduino startup. Better still I could cut OH out of the processing loop altogether, and get the DMX driver Arduino to listen to messages on a topic, and get OH to listen to the same topic, to ensure OH is kept updated with the current situation.

I’m sure a superior option would be to go for a standalone lighting solution, but I really wanted to develop my own wall control panels!