Introducing "Yet Another Power Monitor"

@jpansarasa Would you mind adding an option to add the cycle time to the notification message? That would be great. In the past I had trouble configured an aeon outlet to report the power consistently and seeing the cycle times might help me to know when the outlet is reporting correctly and when it is not reporting correctly.

Thanks in advance!

Looks like it should be easy to add.
I will make it an option in the configuration.

Cool, thanks!

Done.

Code is merged.
New options available

@jpansarasa

Thanks I just pulled in your updates. The repository was colored purple so I updated.

I then enabled the new option on my iphone.

Thanks again!

BUG FIX!

The option to not include the duration was not working, so that is fixed now.
(I forgot that boolean options were not booleans…)

@jpansarasa

Does the duration still work?

I updated the code and the next cycle I did not get the duration.

I just went in, turned the toggle off and saved, then toggled on and saved and then rebooted the hub to see if this might fix it.

Next time we do laundry I will see.

Thank again for adding this enhancement.

Okay, seems like duration is now back after toggling the value.

Thanks again!

Okay, we got 2 laundry notifications for one event from this app. They were a second apart. The stock app only sent one notification.

The notification from the stock app is between the 2 notifications from this app as shown in the image.

I do not think that I ever saw this in the past. BUT, since I did not have duration before, I am not sure that this did not happen and I just did not notice it.

Is this a bug in the smart app, or a bug in the smartthings hub?

Bug is low priority, we can live with it.

Yup. This happens. It is a confluence of problems.

The powerHandler(...) method in the app is called for every power event. The device handler sends events when the power changes by a minimum wattage (50 watts is the default) and also when the wattage changes by some percentage (10% is the default). Sometimes these two events are triggered close enough together that the state is not persisted between the calls. (For the curious, SmartThings Documentation - Using State ) I have erred on the side of getting two notifications is better than not getting notifications.

I have modified the code to use atomicState, hopefully this will solve the problem. I remember trying this early on and it did not work but let’s try it again!

James

@jpansarasa

Thanks! I updated the app this morning. I will be checking to see if this is fixed.

Thanks for the quick turn around!

Hey James, great app man. The wife loves it, and gives me one more reason to justify the SmartThings addiction. One request/question though, have you considered adding switch or bulb control based on laundry status? Maybe turning on a bulb (like the osram rgbw) at a certain color? Or simply turning on a bulb/switch?

Check out the BetterLaundryMonitor from @sudarkoff in the Laundry Monitor thread. He has a lot more bells and whistles in his app and he is doing exactly what you want to do.

The Better Laundry Monitor kept telling me “Oops! Looks like you need to double-check some inputs” when I tried to configure it.

That is not a message from my code, that is from SmartThings.
Make sure you enter values into all of the settings and try again.

I filled in all the fields except the Hue related ones… I do not have Hue lights in ST so it doesn’t allow me to enter in those fields

Um… there is nothing about hue in in my application.

Here is what the top part of my application looks like in the latest SmartThings Android app

Is this what you are seeing?

No, I was seeing something else. I deleted it because I found Brandon Miller’s updated Laundry Monitor and it works as I desire. Perhaps there was yet another “better Laundry Monitor” out there, not yours, and that’s what I had loaded? There do seem to be lots of attempts to do laundry monitors.

So I now have the Miller monitor on my washer (using the power reading from the Iris smart plug) and it works well, and I have the official ST laundry monitor (using the multi vibration sensor) reporting on the dryer. And that works well too. And I have my android tablets intercepting the notifications and saying them out loud, and the Notifications for Android TV popping them on my Bravia. I do look forward to the day Echo can receive push notifications… thanks James for trying to help on this. I do appreciate that you stepped up, even though it turned out to not be your app.