Required expression rule stops

This rule has stopped before, for no reason I can see. This rule calculates my whole house energy cost. I use a virtual device that is updated every time the actual HEM device updates. I made a couple of post in this thread by @BorrisTheCat that I had seen this and I thought it might be a similar issue to theirs. I said nothing derogatory, only that I would be diligent in the future to capture all data and post when it happened again. I had seen this behavior intermittently over several months, but I always felt maybe it was just an issue with rebooting the hub at an inopportune time. I also mentioned that for me it always seem to involve rules with Private Booleans. Apparently my comment was not welcome, as my post was flagged. So I deleted my post. So I am starting a new thread and I guess this one can be flagged if someone feels it is somehow not relevant as well.

So here is the rule:



Here is the log.

This is not a full log only the items I have set up to be logged. See rule. It shows the last time the rule ran was at 8:06PM.

Here is the device event page.

It is updating every few minutes. as you can see at the time of this screen capture the last update was at 10:56PM

Here is the event subscription for the rule.

It shows no event subscription. The rule has just stopped. My power company resets energy usage on the 28th. I noticed that on my monthly graph that the energy usage was correct, but the cost was too low. This rule had not ran in several days. I had seen this before and this time I started watching it more closely. The rule has been running since the 28th of Feb with no issues, until today. The hub has not been rebooted. It has been running for over 7 days at the time of this post. The private Boolean is True so it should be updating but it is not. This page has been refreshed and that is the current state of the Boolean.

I have gone back and forth several times between the app and settings page and I can see over time that the HEM device energy has been updating where it shows the value on the trigger line.

I am currently on version .119. I like to wait until there has been no updates in week or two before I go to latest version. Unless I see a note that suggest it might help with an issue I have or have seen. I saw nothing in release notes that suggest there is any kind of update for an issue such as this. Also I did not want to reboot the hub until I saw this happen again.

The rule is currently in this state and I will not click done in case there is additional info needed. I know from past experience if I click done and do nothing else the rule will start up again.

3 Likes

? On my thread? I never saw this but it wasn't by me. However my rule doesn't use PB and I'm having the same issue.

I had the same thought

The issue is the logs and data are good when it works when it stops as you mentioned there are no subscriptions so no logs it's just as if it's been stopped.

2 Likes

I never thought it was you. I was pretty sure it was a staff member, but for what reason I don't know. I guess they felt it wasn't relevant.

Since no one has any ideas. I opened the rule and clicked done and it is now running again, did nothing else. It is now subscribed to the device.

2 Likes

Yes this is exactly what I do. I have said the same to Bruce on the other thread.

I had something yesterday when I did go though the rule when the trigger was in the past and I gave a error. Maybe could mess something up when it re subscribes after reboot?

Rule just stopped again today. The Private Boolean is true so it should trigger, but there is again no event subscription. This time I didn't notice until I updated my hubs.

I updated them all at around 10:45PM. After all the hubs were back up and running I looked at the RM logs and noticed it again had not updated since around 8:45PM. The reboot did not initialize the rule it still shows no subscriptions, and is not running.

Maybe I am doing something wrong in the rule but I don't see it.

1 Like

I don't think so it's a bug, just need to convince @bravenel where to look for it.

That may not be true. Look at the App Status page Application State, for the object called 'private':

If the Required Expression is false, there won't be Event Subscriptions for the triggers. The logs you posted are inadequate as they don't show any of the trigger events. If this is an intermittent failure of the rule, then it will most likely be very difficult or impossible to reproduce for testing and debug. I need to see something that can be reproduced.

I have now enabled full logging and when it happens again I will verify, by looking at the apps status as advised, but I am 99.9% sure the variable was true. When I click done on the rule to get it started again I did not update, the variable and if it were false it would have continued to remain in active.

It is intermittent, in that it does not happen every time. It is consistent in that it will happen again. It has been happening for quite some time, and I had not always realized it. Going back over my cost data I have now realized that many of my past data is incorrect.

Just hapoened again, but I am, of coarse, on my way out of town. I had on full logging and the rule ran all the way till the end and the last action was to set the private Boolean true.

I checked the app status page and it showed the private Boolean as true I took
A screen shot on my phone,

I again opened rule and clicked done and it is running again.

Screen shots are not great as I am on my phone and won’t be able to get to my desktop for a few days.

This topic will be closed now. Create a new topic if there is an issue that can be adequately documented.