When the below flow is enabled for execution Homey crashes and restarts every 1 to 2 hours. If the flow is disabled, there are no uncontrolled restarts. I have tried to find memory or CPU starvation, to no avail. Any pointer appreciated.
Are you sure you don’t get a divide by zero at some point?
Yes I am as I initialize both variables with a number >0. Both variables are also monotonically incremented and never increment above 500 before Homey crashes. However, I would in any case not expect Homey to restart if a division by zero occurred, at the most the script/flow.
Homey isn’t a Commodore 64, divide-by-zero should not crash the machine.
I don’t see anything strange.
Maybe this helps: select all the cards and copy/paste them in a new/blank canvas.
It shouldn’t indeed. But with computers you never know …
Because the issue is not clear you need to isolate possible issues step by step.
Maybe temporarily remove the “Set measure_battery to” card to rule out that writing this value every 30 seconds is causing the issue?
Will try. Is there a known issue that can be resolved by this?
Will try without writing to a device.
Not an expert. Thought to have read this somewhere on this forum.
You need to isolate the problem, for example by adding a message card after every card.
Sometimes a flow is corrupted, but not marked as “broken” by Homey.
One “fix” by Homey is to disable a flow without any comment or suggested fix (how lovely..).
Creating a new flow, like @Wim_Post suggested might just solve it.
Your flow design is fine though, you should be able to write values to devices quite often, but avoid “extremes” like “every second” I’d say.
Well @Peter_Kawa…
The suggestion made by @Wim_Post seems to be on the spot. I copied the configuration to a virgin canvas and lo and behold. I have not had a single crash/restart in two days.
If this issue has been discussed before without Athom correcting at least the lack of error reporting to the user reflects badly on the ambition of Athom.
@Wim_Post thank you very much for your suggestion, and to @Peter_Kawa for attesting to the fact.
