This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Solved

Measure used power of the washing machine

edited September 2017 in Questions & Help
Hi all,

My wife want to know which washing program uses the least amount of power. Now the washing machine is connected through a Fibaro wall plug. Now I just use it to push a notification to my wife's phone when the washing machine is done. I think it would also be possible to push the amount of power used during 1 service.

I was thinking of the following but I got a bit stuck.
1. When the power is > 500 W, the machine is started. Enable second and third flow, disable first flow.
2. When the powermeter is changed - save in variable. Disable flow.
3. When the power is < 2,5 W, the machine is stopped. Enable first and fourth flow, disable third flow.
4. Get current powermeter value, subtract saved value and push it to my phone. Disable flow.

The fourth flow is where I got stuck... I can't think of a way to subtract the saved value from the current one...

I also can imagine that someone thinks of a better more sophisticated way to do what I want.

Thank in advance for helping me!

Diver
Tagged:

Comments

  • https://www.athom.com/nl/ondersteuning/KB000007/
    https://www.athom.com/en/support/KB000007/

    It is even possible to use math in your Flows! Enclose an equation by {{ ... }}. For example, {{ 2 * 3 }} will result in 6. Of course, you can drag any tag in this equation. For example to calculate the total energy costs, multiply your energy meter's value by 0.22, or whichever your energy price is.

  • The above method is meant for regular variables btw, not BL variables. With BL you can use math.js:
    http://mathjs.org/index.html
  • mruitermruiter Member
    edited September 2017
    There are also a few examples in the forum. Just use search it gives a lot of answers to most questions.

    https://forum.athom.com/discussion/comment/36884/#Comment_36884

  • Hi all,

    I solved my problems using just the normal Logic App.

    I'm using four flows to get precisely what I want.

    Flow 1 (Wasmachine 1): 
    - Execute this flow just once. 
    - Send message for debugging.


    Flow 2 (WasmachinePwrMtr1): 
    Saving the current Power Meter value.


    Flow 3 (Wasmachine 2):
    - Execute this flow just once.
    - Send message to wife that machine is ready.


    Flow 4 (WasmachinePwrMtr2):
    - Get current power meter value.
    - Subtract saved value from current value.
    - Send value in massage to both phones.

    I hope this will be helpful for someone else also.

    Diver
  • Great flow!
    Could you share the actual calculation, you make here:


    Thanks!
  • WRosWRos Member
    edited September 2017
    I've built the same in 2 flows. For inspiration:

    Wasmachine start:

    Explanation:
    Trigger starts when power is higher than 100 Watt
    • Send message, so I could complement my wife.
    • Set a boolean true, I don't know why anymore. :smile: 
    • Switch the stop flow on and switch the start flow off.

    Wasmachine stopt:

    Explanation:
    Trigger starts when power is lower than 2 Watt.
    I have created 2 Better Logic number variable: "Power Usage washing session/Verbruik per sessie" and "Total power usage/Verbruik Totaal"
    • Write the power usage of the powerplug to "Power Usage washing session"
    • Match the "Total Power Usage" = "Total Power Usage" + "Power Usage washing session"
    • Send message to user: "Power Usage washing session" Wasmachine session ends
    • Switch the stop flow off and switch the start flow on.
    • Reset Power usage variable of the powerplug

    I'm using the same flows for the dryer, but with another trigger setting for the flows.

    In insight you get interesting drawings:

    Purple is the "Total Power Usage"
    Green is the "Power Usage washing session"

    So last 5 days there were 8 wash sessions. :neutral:
  • Thanks for sharing these flows, @WRos

  • edited September 2017
    @Eternity, The text in the card is: {{( Power Meter - PwrWM ) * 1000 }}
    Powermeter is the tag with current value of the Fibaro wallplug. PwrWM is the value of the wallplug I saved when the flow detects a start of the washing machine. O, I almost forgot. I multiply it with 1000 to make the difference between kWh and Wh. Now I got al value of 620 in stead of 0,62. This speaks more to the imagination of my wife.

    I did almost the same as @WRos did. Only I made is more independent for each washing cycle. I don't use values I saved some days earlier. Just a matter of thoughts. @WRos idea is pretty cleaver to put everything in two flows while I'm using four.
  • WRos said:
    I've built the same in 2 flows. For inspiration:

    Wasmachine start:

    Explanation:
    Trigger starts when power is higher than 100 Watt
    • Send message, so I could complement my wife.
    • Set a boolean true, I don't know why anymore. :smile: 
    • Switch the stop flow on and switch the start flow off.

    Wasmachine stopt:

    Explanation:
    Trigger starts when power is lower than 2 Watt.
    I have created 2 Better Logic number variable: "Power Usage washing session/Verbruik per sessie" and "Total power usage/Verbruik Totaal"
    • Write the power usage of the powerplug to "Power Usage washing session"
    • Match the "Total Power Usage" = "Total Power Usage" + "Power Usage washing session"
    • Send message to user: "Power Usage washing session" Wasmachine session ends
    • Switch the stop flow off and switch the start flow on.
    • Reset Power usage variable of the powerplug

    I'm using the same flows for the dryer, but with another trigger setting for the flows.

    In insight you get interesting drawings:

    Purple is the "Total Power Usage"
    Green is the "Power Usage washing session"

    So last 5 days there were 8 wash sessions. :neutral:


    Can you help me with these two tags?

    How did you create this tag (#Stroo..)?

    And witch variable dose the tag (#Verb...) belong to, is it Verbruik Totaal?


Sign In or Register to comment.