Yes! I was thinking about this the other day. The automaton still works if you fake the switch by replacing it with a helper, but Iād like to have the option to disable that requirement.
Itāll ship in the next version, but these days have been crazy and development is taking longer than I expected
š Detect and monitor the state of an appliance based on its power consumption - V2.1.1 - Updated!
Iāve put it in place. My next wash day is Saturday, so Iāll circle back with you at that point to let you know how it went!
Thank you for your help!
thanks for the awesome blueprint!
If I could have one wish, is that this blueprint will include also āDelayed Job Started durationā so that a job would be counted as started if the power consumption is over over a threshold for a set period of time, that would allow me to prevent false positive in my washing machine cycle, see my power consumption:
As you can see, it can get high for a very short period of time.
Thanks again
@nitaybz This is already in V3 (here) and itās working. However, V3 is still under development because thereās more that needs to be added.
If you really want to try V3 before itās released, you can:
-
Copy the content of hassio_appliance-status-monitor/appliance-status-monitor.yaml at release/v3.0.0-dev Ā· leofabri/hassio_appliance-status-monitor Ā· GitHub, and paste/replace the original appliance-status-monitor.yaml on your Home Assistant.
-
Follow the new documentation here
Notes:
- You should reboot your Home Assistant after updating the blueprint and after the new helpers have been added.
- Please note that you canāt simply import V3 of the blueprint because itās not been released yet.
- Some documentation may still be missing.
Good news and bad news, @leofabri.
The good news is that itās triggering the script to alert my phone and announce over the speakers when the wash is finished.
The bad news is, itās prematurely assuming the wash is done (sometimes several times a minute) and thus spamming me with those messages.
Thatās from last weeks laundry (though Iām not sure why itās not showing longer, I think my laundry goes longer than that).
Hereās todayās (edited to update it with completion):
The announcements are less frequent now (thankfully) but in the firstā¦10 minutes or so? ā¦ of the wash, they were like a steady stream of them.
Any ideas? Should I be adjusting the numbers?
@chicknlil25 Nice to hear that your initial problem was solved.
It looks like you need to fine-tune your automation. The procedure can differ a lot from appliance to appliance, and most of the time this step is not even necessary (this is why Iām still trying to document this process and make it easier).
It looks like your appliance intermittently uses less power than the finishing power threshold causing the behavior you described.
You should use the āDelayed Job Completion durationā (delayed_job_completion_duration
) option. I would set it to 10 seconds and see if the problem is solved.
Iām suggesting 10 seconds because it looks like that, on average, your ājob_completedā periods (the ones in light blue) last for approximately 6 seconds. Please be mindful that mine itās just an estimate! I had to count the pixels of your graphs for that
Feel free to change this value to something different if you want to, but read the warning, and consider that a smaller value is better.
Gotcha! Iāve made the adjustment, but itāll be another week before I can provide feedback.
Thanks for your time and patience!
Haha, no worries. Can I incorporate those graphs into the documentation?
Absolutely!
Hello,
i have started using this Blueprint shortly and its been working great for a washing machine. However for dyer its misfires.
As you see from the image. Dryer at some point stops heating the drum and just spins it from time to time for an hour. During this period status periodically changes from ongoing to complete to idle to ongoingā¦ and so on.
Is there a cure for this? Which parameter should I adjust to make job complete recognition more reliable?
more detailed image
Yes, there is a fix! The problem seems to be the same as @chicknlil25 (here), and the solution proposed (here) should work for you as well. However, youāll likely have to set āDelayed Job Completion durationā (delayed_job_completion_duration
) option to about 140 seconds.
Feel free to ask for help if this doesnāt solve your problem.
appreciate your quick response.
I will report after testing.
You are welcome! Iād like to use your graphs to document the problem. Do I have your permission?
I have no objections
@leofabri I have just done one more washing cycle and noticed that there was not transition job_ongoing ā job_complete it just went str8 to idle. Which didnāt trigger notification automation.
It looks like that part of the problem is now gone!
I believe the automation is skipping the job_completed state because your power sensor is issuing power readings quite frequently, and the automation gets triggered immediately after the finishing power threshold is reached and the job is done. If my theory is correct, thereās a chance that the transition job_ongoing ā job_completed will happen sometimes, but itās completely unpredictable and it breaks the execution of the custom action you are trying to use.
Iāve addressed this issue in V3, but sadly, it has not been released yet. The next version will include some more timers, one of which will allow you to say for how long you want the job_completed state to persist before allowing the state machine to enter idle.
Here are your options:
- A little hack: Slow down the polling rate of your smart socket. Look for an option that allows you to receive new power reads slower, and if you find one, set it to 60 seconds. Note that not all sockets allow you to set the polling interval.
-
Easier, temporary, but less elegant fix: Create an additional automation that detects when thereās a transition from job_completed ā idle.
Make a new automation. Copy and paste the following while in Edit YAML mode:
alias: "Washing Machine - Job Completed detection - Temporary Fix" description: "This is a temporary fix. V3.0.0 will solve the issue." mode: single trigger: - platform: state entity_id: - input_select.washing_machine_state_machine from: job_ongoing to: idle id: job_done_trigger condition: - condition: trigger id: job_done_trigger action: # Put your custom actions here
Add your actions, as you would in your custom action section in the main automation.
-
If you feel adventurous and you think you can make it, you could update straight to V3.0.0-dev.
a. Replace the existing blueprint with V3-dev by issuing this command in your VSCode terminal:
cd /config/blueprints/automation/leofabri && curl -sSL https://raw.githubusercontent.com/leofabri/hassio_appliance-status-monitor/release/v3.0.0-dev/appliance-status-monitor.yaml -O
b. Now we need to create the helpers (yes, there are a few more compared to V2.1.1).
First, find your washing machine package (should be inside of /config/packages) and delete it.
Now, open the terminal in your VSCode and execute the following commandmkdir -p /config/packages/appliances/washing_machine && cd /config/packages/appliances/washing_machine && curl -sSL https://raw.githubusercontent.com/leofabri/hassio_appliance-status-monitor/release/v3.0.0-dev/home%20assistant/packages/washing_machine/asm_washing_machine.yaml -O
You should see that a new package is created inside the washing_machine folder.
c. Verify/Reboot Home Assistant
d. Open your existing Washing Machine Automation ā Edit in YAML ā Copy and save the content you see on your PC because we are going to replace it entirely.
e. Replace its content with https://raw.githubusercontent.com/leofabri/hassio_appliance-status-monitor/release/v3.0.0-dev/home%20assistant/pre_configurations/ui/asm_washing_machine_ui_starter.yaml
f. Remember to set the following values
appliance_socket
,appliance_power_sensor
,appliance_starting_power_threshold
,appliance_finishing_power_threshold
. You can also use the visual mode to do this. The values of these variables should match the ones of the old yaml you saved in step d.g. Save and perform step c. once more.
h. From now on, if you need to configure more appliances, please refer to the new V3 guide here.
Iāll do my best to release V3 as soon as possible.
hello, friend! I have my laundry running right now as I type this. Mostly succes thus far. It did alert once, relatively early in the process (and oops, just for a second time as Iām typing this!) but that had been it so far. Should I stretch out the 10 seconds to longer for next week? 12 or 15 seconds?
I think weāre muuuuuch closer to complete success though, which Iām extremely grateful for!
Any chance we can change the power consumption input to accept both watts and amps? the reason i ask is because the amp readings, at least on my setup seem to be significantly more steady than the watt readings:
Hey @leofabri - it went off 9 times in total. Iāve yet to be able to figure out a good way to get a solid, zoomed in view of a āshortā history (a la a washing machineās run time), so Iām not sure about how long that delay should be. This was definitely much better than previous runs though!
Hi @chicknlil25, you can definitely try with bigger values! The only thing to keep an eye on is that, if you set a considerable amount of time, the side-effect is that the automation becomes slower to detect when the appliance has finished its job. You ideally want the automation to be as accurate as possible.
If itās not solved yet, but it at least improved a bit, then you definitely have to make it bigger. You can also experiment with 20 seconds, which seems to be a very acceptable amount of time still.