Decided on Virtual switches, OH & ST for notifications until HE notifications are available. Itās easy to setup, is fast and ready to go on my wifeās phone. If I miss a notification because ST was offline at the time, itās more acceptable than a light not turning on.
Have the dryer working, but canāt figure out how to make RM do what I need. The washer will push button 1 several times during the cycle, so I want to make sure that truth isnāt evaluated for at least a minute, but that 1 minute timer needs to cancel if it becomes false before the minute is up.
I just recently started having the Washer report as finished multiple times (usually 3) as well. I have looked through the code and cannot figure out how it is able to send multiple 'washer is finished' button pushed events. Perhaps @mike.maxwell could look at his old code and figure out why it would possibly detect 3 'washer has finished' events in a row? It is almost like the state.washerIsRunning variable isn't updated immediately, allowing subsequent updates from the Aeon HEM to enter the same code path multiple times. The state.washerIsRunning variable should prevent this from happening. Did a recent firmware update change the behavior of 'state'?
if (source == 1){
name = "washerWatts"
if (value.toInteger() >= settings.washerRW.toInteger()){
//washer is on
sendEvent(name: "washerState", value: "on", displayed: true)
state.washerIsRunning = true
} else {
//washer is off
if (state.washerIsRunning == true){
//button event
sendEvent(name: "pushed", value: "1", descriptionText: "Washer has finished.", isStateChange: true)
}
sendEvent(name: "washerState", value: "off", displayed: true)
state.washerIsRunning = false
}
} else {
I have two rules that do the job. Probably a better way to accomplish this (would be glad to learn), but this is what I could wrap my head around.
I finally realized I was focusing on when the washer itself indicated it had turned off, but really it was better to have a second rule that is triggered when a virtual switch is no longer kept alive by the pauses in the machine. When the pauses cease for a period of time, the notification is sent (for me at the moment, notifications are done by triggering a second virtual switch, which then triggers ST to alert me).
I went with a five minute pause. My washer will often spend a long time starting and stopping to try and redistribute an unbalanced load before it will go into a high speed spin. I may need to increase it, but if it's long enough and the wash sits for a few minutes before I'm notified, that is quite alright by me.
I have updated the driver code to try to use the custom attributes instead of the state variables to try and avoid the duplicate button pushed events. So far, so good in my limited testing this evening.
Would it be possible to add a third button push to allow cancellation? Basically Iāve been turning on a virtual switch with a button push, and that then turns on a second virtual switch to send notifications, but delaying the second switch still sends the notification after delay, even if the current load rises above the threshold, because the button has already been pushed.
So if there were a button 3 push when the washer current rises above the threshold, that would turn the first virtual switch off again before a timeout has occurred, thus cancelling the action that turns on my second switch to send notification.
First - Sorry for the slow response. I was traveling for work all last week, and I am still trying to catch back up on everything.
Second, you've completely lost me... Ever since I made my most recent changes, I do not believe we've had any more double/triple notifications. I did just upgrade my hub from 707 to 710 this evening, so only time will tell for sure.
You should be able to keep all of the logic within the custom Driver code, and hopefully not need to add extra virtual devices and logic elsewhere. What problem are you trying to resolve?
No problem at all on the response time of course. Iāve been on a project the last week myself too. The issue Iām still having is my washer never drops below 7 watts, even when itās āoffā and the run wattage is sometimes as low as 10 watts toward the end of the cycle where itās going into a rinse.
Iāve played with the threshold and canāt seem to find a happy medium. So Iāll get several notifications toward the end of the cycle. However, based on what youāve said, I should strip out that added logic and try again.
Unfortunately, the operating wattage range of my washer is so low, it results in frequent fluctuations between ON and OFF during a cycle and the changes you made could not compensate for this. I was able to finally resolve the issue by modifying the code to add a button 3 push when the washer is ON. I'm using this to cancel a rule actions if the washer has not stopped for 2 minutes, thus preventing false notifications.
I had to create two virtual switches, two RM triggers and one RM rule to accomplish what I needed. Maybe there's an easier way, but I couldn't figure it out.
How it works:
When the washer starts, the Aeon HEM pushes button 3. This turns on the virtual switches "Washer is running" and "Washer is done". When the washer pauses during the cycle and creates an OFF status, the rule "Send Washer Notification" becomes [TRUE] and begins a two minute countdown before it turns OFF the "Washer is done" virtual switch. If, before the two minute countdown has completed, the washer cycles ON, and therefore pushes button 3 again, then the rule becomes [FALSE] and the "Washer is done" virtual switch is turned ON, thus cancelling the countdown to OFF.
When the washer finally no longer cycles ON in a two minute period, then the virtual switch "Washer is done" turns OFF. This triggers an IFTTT notification that "The Washer has Finished".
Here's the modified code, and my RM triggers/rule if anyone finds it helpful.
[Edit] I've done a second adaptation to @ogiewon 's original port of @mike.maxwell 's Aeon HEM V1 Laundry DTH, this time adding a button 4 push to indicate the dryer is running. This can now be used in conjunction with RM and Google Assistant Relay to check the status (running or finished) of a washer and dryer.
Using IFTTT integration, you can ask Google Assistant or a Google Home for the status of your laundry and get a spoken response based on what is currently running or if nothing is running.
Please note: I have modified the original port of the code, because Dan's second revision to the code did not work for my washer and actually caused a greater number of false alarms. Your experience may be completely different. I have a very difficult washer to determine the running, versus off amperage.
Glad you found a workaround. I guess I am lucky that my washer and dryer are 'well behaved' when it comes to power usage.
One thought... I wonder if you could have implemented all of the logic within the Driver code itself? Instead of immediately sending the button pushed event for washer is done, you could schedule an function to run in two minutes. If another off to on transition occurs, you could unschedule the timer. Essentially, implement the delay with cancel inside the driver. It would definitely be cleaner. A user preference could be added for 'How long OFF before sending event'. Thoughts?
Thatās a great idea, but not one I have the skill to accomplish. I was happy just to have figured out how to modify the existing code enough to accomplish a third button that does what I expected!
I'll take a look at adding some more intelligence to the driver to help reduce false/duplicate notifications. Hopefully I'll find some time this weekend.
Could be. Mine is v1 and I donāt find the Z-Wave Plus logo on it or anywhere, in the box or instructions. If youāre concerned about compatibility, I only bought mine a few months ago on eBay. Probably still available.