šŸ”Œ Detect and monitor the state of an appliance based on its power consumption - V2.1.1 - Updated!

Hey @leofabri. Great work with the blueprint, it works perfectly with my washer and my dryer! For my dishwasher, there is a long period of time where there is almost no activity, causing a premature ā€˜job completeā€™ state unless I add a really long delay (30+ mins) to capture the last ā€˜blipā€™ā€¦ This of course will cause the state change to occur much later than desired. Iā€™ve attached what the cycle looks like. Wondering if you have any ideas, or perhaps something that could be done in v3.0 to address this ā€˜cycleā€™. One idea is a setting for ā€˜minimum cycle timeā€™, but ideally there is a less hacky solution.

2 Likes

This blueprint seems nice, though maybe a bit overkill for my situation. I do like the state-machine setup, but I donā€™t really need the overload or unplugged stuff. Could you maybe make something like a ā€˜liteā€™ version with basically just idle, job_ongoing, job_finished or something along those lines?

2 Likes

Hi @Merlijn thank you. Well, in V3.0 Iā€™m planning to add some checkboxes to enable/disable some of the features (Iā€™m testing one for the overload state).
If you donā€™t want these states though, I could think about a ā€œliteā€ version that does remove the unused logic. Bear in mind that having the full version or the stripped one likely wonā€™t affect the overall speed of the automation.

The biggest issue on my side is that Iā€™d have to maintain two versions, and unfortunately, I plan to have a difficult time with that, because this is the one used at home.

Hmm, I see. I never thought that an appliance could spend that long doing nothing!

I donā€™t know if I understand the ā€˜minimum cycle timeā€™ idea. It would filter out the cycles that take less than a minimum time, wouldnā€™t it?
Based on your chart, the cycle would end at about 8:35 PM, thus ignoring the spike completely, but this would also cause the start to be shifted forward in the future.

Iā€™ve been testing the first unpublished release of V3 that comes with a very similar idea (PM me if you want to be a tester :grinning_face_with_smiling_eyes:). V3 includes an optional ā€œDelayed Job Ongoing timerā€ that does what I described above.
I know that the most accurate and ideal thing to do is to be able to capture the entire cycle without delays, but I guess that we donā€™t have enough information to do that.

Updates about V3

Iā€™ve been developing the new version over the past few weeks and have done most of the work. This month, however, Iā€™m very busy with my exams and that means that I postponed the release a bit. However, I still have time to test the changes, and that is positive.

Home Assistant doesnā€™t seem to have a proper way to notify the users about blueprintsā€™ updates. I donā€™t want to push too many updates for this blueprint because I know many people wouldnā€™t update it.
What I prefer to do instead is to release something that I tested, hopefully, bug-free and complete feature-wise.

Feature requests

Please feel free to ask if thereā€™s anything that youā€™d like to see in the next version of the blueprint. I wonā€™t be implementing everything, but It would give me a better idea of your needs.

1 Like

Thanks for your thoughts!

To elaborate on the ā€˜min cycle time ideaā€™ā€¦ The thinking was that a job would go from ā€˜ongoingā€™ to ā€˜completeā€™ IF and ONLY IF a ā€˜minimum cycle durationā€™ has passed since the start.

For example, my dishwasher ā€˜estimated run timeā€™ at the start of cycle is 156 minutes. It may finished a bit sooner/later (maybe +/- 15 minutes), but it would never finish in, for example, 110 minutes. Thus, I would prefer that job_completed only trigger after a min amount of time has passed. For example, I would want the blueprint to assume the job is ongoing while that min time has not been met (and of course while there is power utilization above the finishing threshold).

Not sure this would be useful to others, but that was at least the idea that I had to make this blueprint work for my dishwasher! :slight_smile:

1 Like

This looks really interesting to me.

I see from the requirements the devices need to be plugged into smart sockets that HA can control but also monitor energy usage.

Can anyone recommend decent smart plugs for the uk market that satisfy these requirements?

Thanks

These are what Iā€™m using:

1 Like

I have been trying a number of smart plugs from different vendors, some of which are very complex to setup and maintain in HA.

These ESPHome plugs have opensource firmware and designed to be interfered and maintained though HA so are now my go-to plugs. The setup is the simplest I have seen.

1 Like

The automation keeps firing every 10 seconds for me. It obviously fails on some conditions and nothing happens but surely itā€™s not meant to be triggering ever to seconds?

I think it may be due to very slight power fluctuations in the power monitoring sensor that is changing its state and this firing?

Anything I can do to stop this behaviour?

EDIT: I now see that this is by design - will exclude from recorder/logbook as solution

Hi! Yes, thatā€™s expected. The automation triggers every single time a new power read comes in. Donā€™t worry about that.
Yes, excluding that from the recorder is a good idea. I will add that to the documentation for the next release!

Hi !

I have the same problemā€¦

1 Like

@Sygnus83 I see. This strange behavior complicates things :slightly_frowning_face:
By the way, this doesnā€™t make any sense! What is the appliance doing from 10:40 to 12:00? It looks like not much is happening. I wonder why the manufacturer wouldnā€™t just consider the job done much sooner!

The problem is that if the appliance utilizes such a low amount of power, itā€™s difficult to tell if itā€™s still on or not with just the information we have.

Here are a few desperate ideas:

  • I could count the number of spikes, and then ā€˜teachā€™ the automation to wait and recognize them. You would need to tell it how many of those you have.
    CONS: it wouldnā€™t be too reliable, and the automation would turn substantially more complex.

  • We could implement an external sensor that inhibits the finished state when, for example, an LED or an indicator on the appliance is detected as on. That would be ideal!
    CONS: itā€™d require additional hardwareā€¦

  • As @dimatx suggested, we could use something like a minimum job_ongoing timer. Then youā€™d set it from the timespan leveraging from circa 11:55 to 8:55, so thatā€™s approximately 3 hours. Immediately after that, the automation would behave like normal and use the Delayed Job Completion timer for the last part, as it usually would.
    CONS: what if your appliance supports more than one program with different durations? This method wouldnā€™t account for that.
    :1st_place_medal: This is probably the best idea, so far.

  • Anything better?

I wish I could make something that works for everybody, but you have to consider that we have some constraints. And conceptually, automations are something that is usually very repetitive and stateless; so you can forget any advanced power analysis.

Hi !
Thanks for the answer, unfortunately I donā€™t know what the best solution would be either.

I think this time is ā€œdryingā€. The pump switches on twice and lets in water after the first one. In this case, the water from the hot plates splashes onto the cold inner wall.

Development Updates

Hey folks, Iā€™m back on the project!
Today, V3.0.0-dev branch came to GitHub. Even if itā€™s not ready for a release, you can already see what changed. I know itā€™s taking some time, but Iā€™m trying to make this repo as streamlined as possible.

The automation itself seems very stable so far (Iā€™ve been testing it for over a month now), but there is a lot of documentation to review/write as there are important changes.

Speaking about these ideas: Iā€™m still evaluating if these are going to get implemented, or if Iā€™m just going to release what I did so far.

2 Likes

I think @Sygnus83 is right. For efficiency reasons, some dishwashers use residual heat to dry the dishes, rather than turning on heaters. I think that time is used to dry the dishes, so itā€™s doing stuff, just using electricity infrequently and in a limited capacity. Sygnus - Is yours also a Bosch?

Hi @dimatx, my dishwasher does that as well. However, I can tell itā€™s doing something because the power consumption is still higher compared to the idle state (~ 0.6 Watts).

Take a look at my dishwasher (Miele):


This was done with grafana, just to highlight the min power usage while in operation.

At this point, I have two suspects:

  1. Your dishwasher is unbelievably efficient, and during the drying process, it doesnā€™t consume more power than when itā€™s offā€¦ itā€™s hard to believe :sweat_smile:
  2. Your socket is not sensitive/precise enough. This is the most plausible explanation. If this is proven to be the case, the only solution I can think of is to try a different smart plug.

Thatā€™s fair, @leofabri :slight_smile: Itā€™s a Tasmota-flashed plug, so I perhaps I can up the sensitivity of said power monitoring. Perhaps it could be re-configured.

PS. Just curious, do you pull directly into Grafana from the HA db, or do you feed it into InfluxDB and then have grafana pull from there?

Well, maybe! I think I canā€™t help with that though. Iā€™m using a different smart socket (I was just mentioning it here in V3.0.0-Dev).

Well, Iā€™m using Grafana with InfluxDB. You know, Iā€™m a data person and the sole idea of losing it scares me :sweat_smile:

1 Like

OK, since you like data :slight_smile: ā€¦ Hereā€™s some data on the end of the last cycle. I increased the power monitoring precision to include a decimal point, so it no longer rounds to the nearest Watt.

(1) End of the cycle, per dishwasher
(2) 0.9W as measured by power monitoring
(3) 0.8W as measured by power monitoring
(4) 0.7W as measured by power monitoring

I will have to try to replicate this across multiple runs, but seems like I may be able to use ā€œbelow 0.8Wā€ as my completion condition. I will test it and report back.