All my automations are RM rules. Random delays (this most likely never will be fixed) are most noticeable for the lighting related rm rules. The most annoying occurrences related to the Bathroom and Kitchen lighting rm rules. My question is - If I create a Custom App for the Bathroom and Kitchen lighting will it eliminate this annoying random delays or the delays still could be a case? I would like to hear a professional comments before messing up with Custom Apps. My goal is to make sure the delays will be completely eliminated for these two critical lighting apps.
I doubt your question can be answered with any precision but a few thoughts.
I suspect any delays in an RM rule has little to do with internal processing load or cpu availability. My thinking is that triggers which originate from a wireless device (ZWave, Zigbee, WiFi, motion sensor, door switch, wall switch/keypad,...) can experience delays due to interference/weak path (forcing retransmissions) or a busy network (many things going on at the same time). Once the trigger, triggers, then the queuing up of the actions is probably only a few msec. but then these actions have similar RF pipeline delays so you get delays on the front end and the backend.
Because an RM logic pipeline is entirely deterministic, a rule and a custom app will process the command at virtually the exact same speed. The randomness you are experiencing is due to non-deterministic latency (unpredictable latency) at the physical radio layer. Since a custom app is paced by this same unpredictable wireless environment, it won't see any better performance than a standard rule.
Anyway others with deeper knowledge of RM might have more professional comments.
It was proven multiple times the delays are between trigger event was logged and first action executed. This clearly pointed to a processing delay and it was confirmed by staff.
The few details you have shared in the past reveal automations that are quite complex, highly customized to your environment, and therefore quite difficult to answer with any specificity. In general, a custom app is going to perform faster than a Rule, because you can write an app to directly to whatever you want in your Groovy code itself, whereas a Rule effectively reads your settings and then decides what to do using conditionals and other Groovy language features (settings being literal app settings, the selections you've made in the UI -- Rule Machine isn't using any magic, just another app that for the most part anyone could have written, albeit a very complex one made by a highly skilled founder of the platform ... and, if you know the history, quite possibly the reason it exists in the first place).
This is something I have previously suggested to you, so you already know my answer.
However, no one can answer your question with any certainty given that the above plus the fact that I don't think any particular cause was ever pinpointed for whatever is happening in your specific environment. And while there are bad ways to write Groovy apps, just as there are bad ways to write Rules: in general, I think you're likely to get worst-case "the same" performance from a Groovy app but quite likely something at least a little better. But in general, it's also true that the difference for most users would be negligible. For whatever reason, it's possible your setup does not fall into that category.
What rule could be simpler which was discussed here:
And here is a comment from staff:
Bottom line: Ocasional huge delays are platform related. Cases confirmed and proven by staff. Platform complexity groves exponentially. This definitely will not help with these annoying random delays. Out of hundreds rm rules only 2 lighting related rules are very eye catching. I am looking for the way how to make these 2 rm rules 100% reliable (now they are 99% good).
I too noticed some delay being introduced when I went to 2.5.1, but I have been gone too much for work to really verify what's going on and report on it. I'm curious to see if 2.5.2 fixed it as I haven't been home in a several weeks.
These delays are here from day #1 (i.e. this problem is not new). However, with each new platform release frequency is less often but when it happens the delays are getting longer. I am not really surprised because platform complexity is increasing exponentially but hw performance is not infinite.
Seems to me the only way to answer this question with any degree of certainty is to test it out for yourself in your own environment?
Ahh, OK. Mine has never been laggy until recently, and it seems to only effect zwave devices in a very specific way, having to do with multiple actions from the same device. For example, let's say I have a button controller with multiple buttons that turn on different light. If I press two buttons one after the other, the first light turns on immediately, the second light take 5-6 additional seconds, pretty much every single time. This behavior is new for me.
Happy to assist if you decide to give it a shot. Worth it IMO.
Thak you very much in advance! First, I will try this myself. But eventually I will need a professional code review.