GroovyRuntimeException

I have a rule that monitors the energy consumption of my dryer, and notifies me when the device is done.
This has worked perfectly for over a year, but is now giving errors:

The rule:

Is this a bug, or has something changed and I need to re-define my rule?

I'm not sure if anything has change but I think it's a good time to rewrite your rule to simplify it.

Required Expression:
Private Boolean is true

Trigger Events:
Power level of Droger reports >= 10.0 and stays that way for:  0:01:00

Actions to Run:
Set PB to false
Speak on ... 'Droger is gestart'
Wait for event: Power level of Droger reports <= 3.0 and stays that way for:  0:03:00
Speak on ... 'Droger is klaar'
Set PB to true

Hmm, strange. Did a reboot, and now the error seems to be gone.

Feels like we could sit here and speculate on which part of your RM rule is producing the error, but @bravenel or one of the other dev's could likely tell us at least what is being called on line 9464, which could help narrow down the search for what you need to look at.

Also instead of a complicated rule, you could use laundry manager instead (covers washers, dryers, dishwashers etc)

Turn on Action logging, and capture the log from the app with a screenshot. It could be a driver issue, but not enough information to go on. What driver is in use for "Droger"?

Like stated, the error was gone after a reboot, so turning on logging also shows no errors anymore.

Hmm, again the errors came back, but this time a reboot did not solve the issue.
I tried the rule like @pseudonym stated, but that turns on the notification, and never ends the routine.

The routine:

What I see in the logs:

So the rule seems to start, but it just never seems to evaluate the power usage after starting.

To answer @bravenel, the driver I use: https://raw.githubusercontent.com/Fanman76/Hubitat/master/HomewizardP1/hwsocket_driver.groovy

Have you looked at the power Events for the device? i.e. can you post the events for the device? That or turn on logging for the device as well.

The device is reporting power just fine. If it was not reporting, the rule would not be triggered/started.

I wasn't thinking so much about it not reporting, more if there was a pattern of events that somehow meant the rule would cancel the wait, or something similar.

Would need to see these interleaved with the rule logs to be sure...

To debug this rule I would create a Virtual Omni sensor to simulate the power of your dryer. Turn on logging for it, add it as a trigger, and replace it for the Droger in the Wait for event. You can then set different power levels and see how the rule responds.

I'll note that you didn't add the suggested Required Expression. You have a local variable Droger loopt but I don't believe a local variable will work in a RE. Either make it a Hub variable or use the rule's Private Boolean instead.

1 Like

Set it to the exact code you suggested now.

The result is that the rule never gets triggered.
The socket is using power now (dryer is running) but the rule is not getting triggered because of the required condition is false.

You'll have to change it to true (use the table at the bottom to do so) to start.

2 Likes

With the dryer running you could also use Run Actions of the rule but don't hit Update Rule or Done. Go to something like the Logs page. The rule will run and the PB will get set correctly.

It's running.
Now waiting for the device to finish its cycle.

Seems to be working, and no further errors in the logging.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.