Error with better laundry monitor

I installed the Better Laundry Monitor and set up, and then I noticed this in the logs:

java.lang.NullPointerException: Cannot invoke method minus() on null object on line 194 (method powerHandler)

I also heard my (google home/nest audio) "make a sound" but NOT state "laundry has started".

Is there a better app for laundry cycle management (power monitoring plug)? I would also love to eventually add a door sensor on the washing machine, so that it can notify/remind me about the wash being done until I actually open the door. I recall hearing others doing something like this?

There's not much info to go on.. I maintain Better Laundry Monitor (BLM) and I haven't seen this error previously. The code had an update 2 weeks ago and there's always a chance I typo'd something. However, nothing has changed in the Line 194 area for months, probably longer.

There are enough options in BML that I think it best if you give me a screen cap or two. The screen above shows two monitors, and each can select its own Device to monitor. The error indicates you've picked Power Meter.

Please enable Debug and run it again. Capture the logs and PM them to me.

It seems it's "working" although I think I definitely need to tweak some things. The ZEN15 plug is also newly installed today, so wrapping my head around all the various options.

No idea what that error was then, but seems it hasn't popped up again since (although it did pop up like 10 times in a row...?)

The code shows I'm on 1.5.0 which seems to be the latest.

One issue I just ran into is, it seemed to properly detect the cycle start but not finish - possibly due to the reporting params of the plug or the threshold settings. I went to my devices info page, and I THINK at that time it sent another power report data, and at that point it triggered the cycle as done.

It did turn on my kitchen light when the cycle finished, but also didn't send anything to my speaker again.

One useful option is Additional Devices:

Screenshot 2023-12-20 at 3.18.57 PM

Create a virtual switch, name it something related and select it in BLM's Inform section.

The switch will 'track' the cycle. It comes on at the start, and off at the end. You can then use it in any notification or Automation you want to fine tune the alerts. It's basically a way for BLM to feed into other apps.

Glad you suggested it because using a virtual switch was the way I was thinking to extend the functionality... just haven't used any virtual switches yet.

Looking through my power reporting log for a cycle, at least on the one I used, It looks like it drops below 4W threshold multiple times - I presume when it is paused spinning.

But when it's truly done, it doesn't end up reporting the power multiple times. So it would seem the way I need to trigger the done is via the optional time, and use 1 minute?

For the power plug I have it as the default in reporting power changes of 10W or 10%, which seems pretty good options? Not sure how I would otherwise have the power plug report the low power more frequently and I don't want it to be spammy.

But it just seems my machine goes from very much on to almost instant-off, in terms of power reporting.

It's normal I think for power metering to just report once per change. So once it gets to zero, it's unlikely to send a second report of zero.

That's the reason for the optional Maximum Cycle Time:

Screenshot 2023-12-20 at 5.56.08 PM

In my case, I'm saying, "ok, it will never take more than 54 mins to run the washer." If the reporting from the power device doesn't catch every watt of change, then the 'dead man timer' forces an end.

What I've suggested in the past is to look at the logs for the device during a cycle and plot it out and determine the high and low values.. and it may be very close.. 5 watts or more means ON.. so what if it's 250 watts, it's still more than 5... same at the OFF range. You may see 4 watts multiple times but not 3.

That's the down side of these wonderful Low Energy products. :smiley:

Screenshot 2023-12-20 at 6.05.27 PMScreenshot 2023-12-20 at 6.07.39 PM

I've just done/tracked another load of laundry and have some questions/issues:

For stop cycle below threshold, I have 4W and "2" for sequential reportings and minutes. Are those an AND or OR? Because here it looks like I hit two low reportings in a row, but it waited a further 2 minutes to mark as done?

app:662023-12-24 08:01:14.062 PMdebugsend: Laundry is done
app:662023-12-24 07:59:14.040 PMdebugEnding duration is set, waiting
app:662023-12-24 07:59:14.034 PMdebugPower: 1.817W, State: true, thresholds: 8.0 4.0 2 2 optional: 1500.0 null 90
app:662023-12-24 07:56:19.212 PMdebugWe hit Power Delay 1 times
app:662023-12-24 07:56:19.208 PMdebugPower: 2.679W, State: true, thresholds: 8.0 4.0 2 2 optional: 1500.0 null 90

To the best of my knowledge every system time is accurate, yet before my laundry cycle I noticed this for the banner... 12/31 hasn't happened yet!

Additionally, I just ran a spin cycle which did start the monitor again, as expected. Now it's complete and showing:

app:662023-12-24 08:27:52.701 PMdebugWe hit Power Delay 1 times
app:662023-12-24 08:27:52.697 PMdebugPower: 1.997W, State: true, thresholds: 8.0 4.0 2 2 optional: 1500.0 null 90

But 8:27 is 3+ minutes ago, shouldn't "Stop after power has been below the threshold for this many continuous minutes:" being at 2 have triggered it to complete?

Stop after power has been below the threshold for this many sequential reportings:
Stop after power has been below the threshold for this many continuous minutes:

The two Thresholds are sequential. Here's my first example: thresholds: 10.0 4.0 2 0 Those values are what I have set: 10W (on), 4W (off), 2 times, 0 minutes. I then set power to 50 W and that starts the cycle. I lower power to 2.678W and the first delay occurs. I then set power to 1.567 and the cycle ends.

dev:1   2023-12-24 09:01:24.263 PM info  pseudoSwitch was turned off
app:904 2023-12-24 09:01:24.255 PM info  Cycle finished.
app:904 2023-12-24 09:01:24.249 PM debug banner: today at 9:01pm
app:904 2023-12-24 09:01:24.236 PM debug send: Washing is done!
app:904 2023-12-24 09:01:24.160 PM debug Power: 1.567W, State: true, thresholds: 10.0 4.0 2 0 optional: 500.0 null 6
dev:464 2023-12-24 09:01:24.120 PM debug pseudoPowerPlug setPower: 1.567
app:904 2023-12-24 09:01:11.311 PM debug We hit Power Delay 1 times
app:904 2023-12-24 09:01:11.305 PM debug Power: 2.678W, State: true, thresholds: 10.0 4.0 2 0 optional: 500.0 null 6
dev:464 2023-12-24 09:01:11.262 PM debug pseudoPowerPlug setPower: 2.678
dev:1   2023-12-24 09:00:54.397 PM info  pseudoSwitch was turned on
app:904 2023-12-24 09:00:54.390 PM info  Cycle started.

I think that most closely matches your intent. By setting number of minutes to zero, then when the 2nd power report below 4 W, the cycle ends.

The answer then to your first question is that the 2 min timer starts after the 2nd low power occurrence. If I set the minutes to be anything, 2 in your example, and only get 1 low power report, the cycle does not end until the deadman timer fires, which confirms the sequential nature of the two thresholds.

Here's the example for 1 low power and zero minutes:

dev:1   2023-12-24 08:57:56.065 PM info  pseudoSwitch was turned off
app:904 2023-12-24 08:57:56.056 PM info  Cycle finished.
app:904 2023-12-24 08:57:56.045 PM debug banner: today at 8:57pm
app:904 2023-12-24 08:57:56.038 PM debug send: Washing is done!
app:904 2023-12-24 08:57:56.024 PM debug Power: 2.678W, State: true, thresholds: 10.0 4.0 1 0 optional: 500.0 null 6
dev:464 2023-12-24 08:57:55.981 PM debug pseudoPowerPlug setPower: 2.678
dev:1   2023-12-24 08:57:36.180 PM info  pseudoSwitch was turned on
app:904 2023-12-24 08:57:36.174 PM info  Cycle started.

Got it - wasn’t clear if they were sequentially processed or two diff ways to end a cycle.

If threshold is ie 2W and only 1 sequential, but 2min time - if it drops below 2W but then hits a higher W will it cancel out the stoppage, or continue cycle end because it did get below and it’s simply waiting now. (I guess if it DOESNT get canceled I don’t get the use for the delay time)

Indeed I’m having some trouble due to the energy efficiency I guess? And also with configuration of the power reporting so it’s not overly chatty (but maybe chatty isn’t the end of the world if it’s basically only chatty during a cycle?)

I regularly see the power drop low below threshold, but it seems just because it’s pausing for a bit during the cycle (soak I guess?). But also when it ends it drops to a very similar power, but also only reports it once.

And then just dealing with having it sort of notify me in a timely manner

I use BLM myself, still... and in the past year I replaced the Washer and Dryer (gas) and had to reconfigure the Thresholds. I did the same as I had done with the old set. I ran a cycle or three and captured the logs. I then, more or less, plotted the power values. That allowed me to set a low power value and really, anything above that was good enough to be the cycle start level. Then, looking at the end cycle, I had to count how many times it fell below. Finally, I set a Maximum Cycle time, with some round up, so that no matter what, I'd get an end.

No one in my family is hovering around the laundry, eager to start the next cycle. 5 mins late, 10 mins late, wouldn't matter. The alert has to go out 5 times before someone grudgingly does what's needed. :smiley:


Haha that’s fair! I have this internal issue of letting damp clothes just sit there for too long - even though a few minutes isn’t too long! I also inherently want to be notified as close as possible to when the machine itself does the done chime.

On a separate note - I touched on it initially but I have a Google home and it’s not outputting anything when I have “laundry has started” and “laundry is done”.

I have 4 hubs that "own" different areas of my home. All Internet facing services are on their own hub. The hub that has the ZWave Laundry Power Monitoring outlets does not have direct access to speech. Therefore, in my home, BLM uses the optional switch, which is mirrored to the hub with Google Home, Alexa and Siri. In other words, my setup is vastly different from yours :slight_smile:

However, on my development hub. I have BLM using virtual Power. Monitoring devices. I can just type in power values and watch what BLM does in response. That development hub has access to AirPlay and I selected it (for the first time :slight_smile: ). I was unable to duplicate. Voice messages came out of my connected HomePod Mini as expected at the start and end of the cycle.

AirPlay device info page offers text to speech:
Screenshot 2023-12-25 at 12.10.44 PM

Which looks the same as Google Home (ChromeCast):
Screenshot 2023-12-25 at 12.11.06 PM