Reducing CPU load % from 150% to 30% on a HP2023.
Although this thread is somewhat older, I would like to share my experience. It will help mainly those with many (motion) devices or time repeating tasks.
In the past weeks I had CPU often at 120-180% leading to longer response times for example for motion controlled lights. I had 25+ Hue motion sensors generating recurring and even almost simultaneous motion events when moving between rooms.
Here is what I did.
- Reduced simultaneous motion flows and prioritized them
- Reduced the use of calling flows and especially those with “This flow is started with a text tag” and reduced text filtering (equals, contains)
- Reduced CPU intensive tasks of the app Device Capabilities (such as constantly showing a chronograph) or removed the old status field (deprecated). I’m waiting for the app to be migrated to the homey-api which uses less resources.
- Grouped all “repeat every” 5 min/30 min/60 min/1 day flows and let those flows be run sequentially instead of at the same time.
- Used helpers for time sensitive flows that have many conditional cards: A helper is set each time one of the conditions changes.
- I also used Advanced Triggers to ignore multiple motion events within a certain timeframe (debounce).
This brought down CPU load to a level of 20-30% and I have now great response times at any motion sensor. Hope this helps.