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

Thank you mate! Itā€™s always great to experience peopleā€™s appreciation. Iā€™m happy that this solution works for you :wink:

Regarding the tumble dryer, I donā€™t have anything like that at home, so mimicking that behavior isnā€™t really that easy for me.
As long as you have start & finishing power thresholds set correctly, it should work. You might have to use the Delayed Job Completion duration variable to solve problems with variable power consumption, something that might trigger the job_completed state, even if the appliance is not really done.

Cheers!

1 Like

1, I have this in my configuration.yaml
image
2, I have keymaster folder under packages, and the keymaster works fine.

In the washing_machine.yaml file, what is written on line 28?

My file, and the one on github only has 27 lines, so check and see if you managed to change it more than you should have :slight_smile: that is sooooo easy to do, trust me.

1 Like

just coming across this blueprint. and now after seeing your use case it intrigues me to give it a shot. while im not in your current situation with archaic hardware, i do have a similar situation. my kitchen appliances are all on one circuit. so when the dishwasher or microwave is on, its not a good idea to start up the air 1850watt air fryer. Even though my dishwasher has digital controls, i have found that it does remember its current cycle state and will start right back up if the power is cycled. Since it takes so long to complete a load you may need to use the kitchen and forget that it could trip the breaker. I see in this blueprint the possibility to be able to toggle the dishwasher when other devices are started.

1 Like

thanks for the hint, I double checked the file, it was the wrong file that I use wget to download it to the package folder. for some reason it changed the inside content after the Wget.
I use Vscode manually copy and paste then everything works

2 Likes

Hi @wbarber69! Yes, you can build something that interlocks other appliances so that they donā€™t work concurrently. Please remember that if you want to detect an overload, youā€™ll need to add HA_PowerControl to the equation. However, if you are looking for the first thing, this blueprint is a standalone solution.

My dishwasher is smart enough to remember where it was when it turned off. That is a nice feature for sure. At least I donā€™t have to worry about that.


There are a lot of possible use cases for this automation.

For example, I noticed that when my TV & Nvidia Shield are off but powered, they somehow waste about 20Watts of energy. When the TV is on, itā€™s about 40/50 Watts.
With this solution, I can detach them completely and save some energy

1 Like

im already doing that with a lot of my parasitic appliances. I dont need overload as it wouldnt even matter because the circuit would trip before id get an overload warning.

thx for this awesome Blueprint!!
this one is one of my wishes

@leofabri Thank you for this blueprint, I really like it!
Can you however explain why the in/out values are maxed so low? Had to change them for me too low maximum settings for in/out. Is there a reason why youā€™ve set it so low?

Iā€™m using it to send a message whenever the washing machine and dryer are ready. The dryer has a cycle for ā€œturn the drum sometimes to keep the clothes movingā€ whenever it is finished but the door has not been opened yet. During this time the power used is about 90-100W for a very short time, so my turn on value has to be much higher to prevent false starts.

A possibility for accurate detection could of course also be a period of time higher than starting value, same as you have now with the stop.

Then for something completely different, is it possible to also calculate the power used by the appliance during a full cycle? So count kWh during the active period, have that value multiplied by the actual rate/kWh and have this value logged. Even better yet, have itā€™s value sent together with the notification:
"Dear wife, the dryer is now ready. This cycle costs us ā‚¬ 1,93.

Iā€™d love to give my wife some insight in the costs of esp. the dryer, she sometimes lets it run with only two or three pieces in it or during a heatwave like now, never realizing the costs involved. Ok, the drying cycle is shorter then, but still I find it rather obliviousā€¦

And something else, Iā€™d love to sent the notification only to whoever is at home, but I have no clue how to create an on-the-fly group of devices of the people at home. Does anyone have a solution/add-on for that?

3 Likes

Hi! Thank you for your appreciation!
No, there isnā€™t any specific reason why the start/finish power thresholds are so low. Those variables initially worked for my use case, so I kept them. In the next version, they will be limited higher than now (maybe between 0.1 - 1000 W).

Concerning the start sequence, I am working on that right now. The next version of the blueprint will offer the possibility of setting a delay on the job_ongoing state. I need to ensure that it doesnā€™t break other things, and debugging this is proving to be a mess.


Then for something completely different, is it possible to also calculate the power used by the appliance during a full cycle?

It should be possible, but itā€™s not easy.

I donā€™t know about you, but I have an energy sensor for each one of my appliances.
Maybe, we could store the time the appliance started, as well as the time it finished. Get the energy at the end and before it started. Then if we consider the amount of time elapsed, we could estimate the power consumption per cycle. Itā€™s quite a lot of work for such a simple estimate.

I will add this to my to-do list. However, I have a limited amount of time these days, so keep in mind that it might take a while. This feature will definitely come in the form of a separate blueprint.


Iā€™d love to give my wife some insight in the costs of esp. the dryer, she sometimes lets it run with only two or three pieces in it or during a heatwave like now, never realizing the costs involved.

Hahaha, I understand. I have the same problem in my family! My goal is to save as much energy as possible and raise awareness. I am sure there is a lot that we can do.


And something else, Iā€™d love to sent the notification only to whoever is at home, but I have no clue how to create an on-the-fly group of devices of the people at home. Does anyone have a solution/add-on for that?

Iā€™m sorry. I canā€™t help with that right now because of time.
What Iā€™d suggest you to do is to check whoā€™s at home. Thereā€™s an entity for that, the zone.home which also tells with an attribute who is inside.
Iā€™d probably come up with a blueprint for this too in the future, but thereā€™s already a lot of work to do and this is outside the scope of this topic.

Take care, and stay tuned for V3.0.0!

3 Likes

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