This problem persists. I'm finding that Rule 5.1 is too buggy to be fully useful. I have had to rebuild the rule every time I use it, and it takes hours to craft.
I have several energy-metering devices, of 3 different types, one a whole-house meter. The types are 1.) Zooz Double Plug, 4 devices; 2.) Zooz Power Switch, 3 instances; 3.) an Aeon Labs HEM 5.
I want an app that will collect the HEM total energy, duration, and calculated cost and write that to a text file, then reset the accumulators.
The HEM has several parameters with a single 'Reset()' method. The Double Plugs have single 'Reset()' method for each. The Power Switch has 'Reset()' methods for Power (min/max), Energy, Current (min.max), and Voltage (min/max). Thus, several methods must be called.
Originally, I tried to schedule this for an automatic reset at 12:01PM on the 17th day of each month, a very tedious trigger to establish. When that worked once and self-destructed, I removed it and later created a virtual button to manually perform the actions.
This latest, with a virtual button, just worked, in that it appended a line to the file, then called the reset methods successfully. However, it then went berserk, just as its ancestors, and could no longer be edited. What's more, it appears to start running is some sort of delayed loop, creating log entries
app:9732022-09-17 07:23:59.944 am errorjava.lang.NumberFormatException: null on line 5935 (method mainPage)
app:9732022-09-17 07:20:06.971 am errorjava.lang.NumberFormatException: null on line 5935 (method mainPage)
app:9732022-09-17 07:18:44.676 am errorjava.lang.NumberFormatException: null on line 5935 (method mainPage)
app:9732022-09-17 07:17:03.784 am errorjava.lang.NumberFormatException: null on line 5935 (method mainPage)
and when I attempt to edit it, the entire app is blank. How can one edit a blank page? I am able to retrieve the json details of the app, which I seem unable to attach here. It's rather large anyway.
Since I can't see the rule, I cannot edit it, nor find the referenced "line 5935". This is not useful. I guess Hubitat is only capable of calling each method manually (17 of them!) to reset energy. Why can't this obvious, glaring editor bug be fixed?
This is why I so despise Javascript in machine control/automation applications!