Best way to handle scene controllers?

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Posts: 4
Joined: 29 Jun 2017 23:28

Best way to handle scene controllers?

Post by roger » 03 Jun 2018 16:14

I have some Remotec ZRC-90 8-button scene controllers with 4 functions on every button (single- double- long press and release button).
For now I handle them with one if-then app for every function (I use 3 functions/button, 24 functions on every controller), and handle the output functions with triggered scenes.

That give 2 problems, first all if-then apps become hard to overwiev when editing, but the more worse problem is that I get the following warning in the logfile when starting z-way-server when this if-then statements is being loaded:

Warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListener() to increase limit. 11

Maybe the reason that I have problems with peridical crashes of z-way with 1-3 Days intervall?
I have understand that the event emitter only can handle 10 listeners to one single event as standard, and I have 24??

Any suggestions how to handle this in a both practical and system-friendly way?
I Think about a switch-case statement with 24 case entries, but I dont find any app that handle this. Maybe Writing some JavaScript code to handle it, but I haven't any experience with JS.

The end functionallity must be easy to edit within the UI, preferable with scenes in the same way I do for now.

Or is the best solution to increase the listerners limit as described in the warning message?
In this case, where should I Place the code with this command?

Post Reply