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.

Flow library : your input for advanced flows

AnnemarieAnnemarie Member
edited September 2016 in Ideas & Suggestions
Hi!

I'm working on a flow library at the moment. We have some awesome ideas about this for the future, but we thought it would be good to start small and within our reach for this moment.  I had a great talk with some of you about what this should look like so now it is a good moment to involve you all. 

In the flow Library #1  we will have some really basic flows, but of course it would also be great to have some advanced flows. Flows where we can really see the full potential of the flow editor at this point in time. 

For these advanced flows I need your help.  I want to ask you to send some best in class flows that you are currently using. For now I do not really have guidelines or expectations, so I'm just really curious about what you are building and are willing to share with me. You can send a screenshot in this thread or in a DM/PM. 

If you have any other suggestions about the flow library #1 (don't forget we do this step by step), please let me know!

Thank you!

Annemarie
Happiness Engineer @ Athom

Comments

  • The most important for new users : parrot flow....
    https://forum.athom.com/discussion/comment/18339/#Comment_18339

  • JerryvdvJerryvdv Member
    edited September 2016
    One of my favourites, mainly because some of the family members are otherwise unable to interact with Homey :wink:, is for providing spoken feedback after talking to Homey. What the following flow does is say either say a standard prase (in my case "Sorry, ik begrijp je niet") when the text does not trigger a flow (2nd flow below) or say nothing (or that what is in the triggered flow offcourse) when it does trigger a flow (3rd and 4th flow below).

    It goes as follows (mind you it is not lean):
    • create a timer
    •  2nd, 3rd and 4th, create the following flows:
    The first flow fires up a 1 second timer to allow the false/true check of the 2nd and 3rd flow to check the boolean condition (otherwise it is always it's standard condition - false). 

    * For the true flow (3rd) you can also add a confirmation by homey if you like. Personally I let homey repeat the confirmation in the individual flows.
    • Finally: for each (voice triggered) flow set the boolean condition to true.


    One caveat is that the flow does not natively work with built-in commands (I suppose you could implement a workaround for these if you would really want to).

    If someone has a better way to implement it, let me know! :smiley: 
  • Priknr1Priknr1 Member
    edited September 2016
    Some features I would love to see:

    - With sunset or sunrise, make a "before" option:  So for example: 10 mins before sunset
    - A checkbox at speech. If checked, homey will ask confirmation before starting a flow that is initiated by your speech.
    - An "or" option  (or is this already the case if you put 2 boxes in the first column??
    - Insight as input. To automate garden irrigation for example.  I make an insight for "rainfall". Than at flow state: if      Rainfall in last X days is lesser than XX mm than

    Cant wait till things are really starting to work fully, so I can throw out Homeseer HSPRO2 smiley 

  • Actions before a sun event are discussed in January already with Athom.
    For conveniences matters by programming, I give the tip to do in in minutes instead of HH:MM.
    In lot of versions it was solved but after testing again it was not.
  • I wasnt on here in January yet. Sorry I missed it :yum: 
  • Back to the toppic, Flow library : your input for advanced flows
    @Annemarie ;
    What will de Library #1 be like?
    - an Forum / wiki / support page with examples? (Like our postings here on the forum)
    - an online repository with examples we can clone/copy to Homey? 
    - or .....

    And wil lit be possible to ask questions / discuss the entry's in the library. (or do we have to discuss on the forum about something in the library?) 

    Will the library be filled by Athom (with verified examples) or can we all create new examples in the library?

    I thought there would be an option to share flows, or is that FlowLibrary #2 or #3 or #n ...? 
    Curious what kind of Library is coming....
  • AnnemarieAnnemarie Member
    edited September 2016
    @GeurtDijker Good question. Here  a little more info on our plans:

    - it will be a page on the website based on situations and devices (so you can search for light and for evening)
    - As I would love that for now that stays on the forum
    - in #2 you will be able to add examples yourself
    - Also sharing will be in the next version


  • Ok so you (Athom) will create a couple of pages with example flows.

    You probably saw quite a lot on the forum,
    Question is if the Library-flows are created using a dummy homey online (fe a web interface with same options as Homey but read-only and "non functional" )
     or are pages with screenshots (hiding all inputs in to small fields.... )
    or flows described in text with an consistent syntax (fe where to put the Little black <labels]  ;-) )

    Of course you can look at what I already created and borrow the best from it...
    These are my examples on the forum:
    and the
    • - 1st:  setting the LED Idle mode
    • - 2nd: Restarting Homey from a Flow
    • - 3rd: Sending Logs to Athom ;-)
    and look at what description works best for documentation. Try to make such a flow using the description, and than ask "your mother" or "sister" if she could do it with that  description ;-)
    It should be a Flow for Dummie's ;-)
  • Hi Annemarie, 
    As basic flow, I can recommend:
    - The Parrot flow (repeat voice commands to test the accuracy)
    - The clock flow (tell the time with the sound of the Big Ben or cuckoo clock in the background)

    I'm currently playing with a flow which changes the colors of my hue lamps every few minutes. Changing the color gives a bit of a wow-factor every time I enter the room. The goal is not to notice the color changes while you are in the room. 

    I started by selecting a relatively neutral picture in the Philips hue mobile app. The color pallet must be suitable for daily, so no bright colors, but more pastel like in the yellow-red range. I used the randomize function to create 4 scenes. These scenes all look very much alike with only minor differences. 
    Next step is to create a few flows in Homey. 
    1. Scene flow 1..4
    2. Stop flow
    Scene 1..4 are triggered when the "scene" variable change AND when the scene variable equals the scene number. It sets Philips hue scene and after 10 minutes, it changes the scene variable to another number (1>2>3>4>1). This way, the colors will change over time. 
    The Stop flow will be triggered when the "scene" variable is set to 0. It will turned off the lights.

    It is easy to add switches and events to this flow. 
    For example:
    • At sunset, set the "scene" variable to 1. This will turn on the lights and start the color rotation.
    • At 11, Homey will say "The lights will turn off shortly" and 5 minutes later set the "scene" variable to 0.
    • A wall switch or remove could be configured to set "scene" to 1 if "scene" = 0 or set "scene" to 0 if "scene" > 0


    The next step would be to slowly dim the lights when they are turned off automatically. While allowing the wall switch to instantly turn them off.
  • @Annemarie: I think it's an awesom idea to create a Flow Library! Below a couple of thoughts that came to mind:

    1. All the flows from the Library should be customizable by the user. In other words the flows from the Library should be there to help the user on his/her way to creating their own flows.
    2. Also make the 'built in voice commands' available as (customizable) flows.
    3. Make the Library available on the Athom website, not in the Homey software itself. This should make it easy for users to copy flows from the library without having to update their software (if they don't want to/dare to/etc.) Also this way every user has access to all latest additions to the Flow Library. I guess that not all flows will work on all versions of the Homey software or apps, so to tackle this some ´working-with-software-version' fields should be incorporated in the Flows Library for the Homey software version and the apps versions.
    4. Make a flow import and export/back-up function so that downloading/sharing/backing up of flows will become very easy for the users.
    5. Give users access to upload there own flows to the Flows Library. Maybe these flows should first be scrutinised carefully by the Athom team, appointed expert users or moderators before making the flows available for download by other users. This will garanty that all flows in the Flow Library are working given certain conditions (app versions, Homey software version, etc).


  • Tim_BrassTim_Brass Member
    edited September 2016
    I'd like to use some variables i take from tado to use a elro socket as a automatic pump switch.

    Here's what I'd like to get:

    When set-temp is higher then inside-temp then variable heating is true

    when (var.) heating is true switch on floorheating pump (elro switch)
    when (var.) heating is false switch off floorheating pump (elro switch)

    when the pump is off for 24 hrs switch it on for 2 min. (so it won't get stuck)

  • For me is a flow with a Motion Sensor the most nessesary thing what have to build in a flow, what i mean a flow *as long as motion * we seat in our couch in the living room and the lights are still on how long you are in the Room. So usefull. Thanks
  • brot84 said:
    For me is a flow with a Motion Sensor the most nessesary thing what have to build in a flow, what i mean a flow *as long as motion * we seat in our couch in the living room and the lights are still on how long you are in the Room. So usefull. Thanks
    I have been experimenting with this for a while and it is not very easy. The type of motion sensor really makes a big difference. I have read about three types of motion sensors:
    - Sensors which will stay "on" for as long as someone is in the room. These sensors often use infrared, so they also work well when you're sitting still.
    - Sensors which have an internal timer which is reset when motion is detected again. These are quite common.
    - Sensors which give a signal when motion is detected. These are a bit harder to use as they can give a lot of signals.

    The first thing I do when I buy a sensors (motion or otherwise) is to install it somewhere and let it gather data for a few days to see the behavior. Based on that, I determine the "states" which are needed and I create a flow to test the states. 

    For example: 
    A motion sensor gives a on signal when motion is detected. This signal is given once in a while, but it is sometimes irregular (that's what happens with cheap sensors). A typical pattern would look like this:
    ________-_-_-_---_-__________-_-_----_-_-___---_-______
     Since the signal is not registered more then once every few minutes. I was in the room for 3 times. The 2nd and 3rd time is a bit hard to distinguish, but since they are somewhat close together, that doesn't really matter. What we need to do is to ensure the off times are bridged for a short while before actually switching off the lights. 
    As a bonus feature, I want to first dim the lights to warn any undetected occupants that the lights will switch off shortly. 

    The challenge is to keep the lights on even sometimes no motion is detected. To achieve this, I introduce a variable "livingroom-presence" with 3 possible values (states) "Empty", "Occupied", "Leaving".
    The lights will behave based on changes to the livingroom-presence variable.
    Light will be 100% if Occupied, 0% if Empty, 75% if Leaving.

    When motion is detected, the state is changed to Occupied. I record time time in a variable called "livingroom-presence-time".
    5 minutes after motion is detected another flow is triggered. I check if the livingroom-presence-time is atleast 5 minutes ago (to ensure it has not been overridden with a more recent time) AND the livingroom-presence is still Occupied. If so, I set livingroom-presence to Leaving.
    1 minute after the livingroom-presence is set to Leaving another flow is triggered. If the livingroom-presenceis still leaving, livingroom-presence is set to Empty.

    Tweaking the time from 5 to 7 or 10 minutes might improve the accuracy at the cost of a few more watts. You want it as short as possible without having it switch to the Leaving state while you are in the room. You will notice the lights dim when you're cutting it too close. 

    If you want to add a switch or remote, you might want to add an additional state "Manual-off" for example to ensure the motion is ignored for the next 30 seconds, or "Manual-on" to ensure the lights are on for at least the next half hour. You can also add multiple (motion) sensors to work together. The use of states allows you to expend the behavior independently of the results (which will make managing multiple lights a lot easier) and slowly make it more intelligent. 
  • Isn't that a little complicated?  :o
    I use a motion sensor in our toilet because the kids always forgot to turn off the light.

    Flow1:
    When variable motion_toilet changes to True (this is done in another flow when motion is detected):
    - Turn on Hue
    - stop timer_toilet

    Flow2:
    When variable motion_toilet changes to False (this is done in another flow when no more motion is detected):
    - start timer_toilet (60 seconds in my case)

    Flow 3:
    When timer_toilet reaches 0:
    - Turn off Hue

    I only use the timer because my wife complained that sometimes the light when out (I guess she falls asleep on the toilet  :p
    Depends a little on where you put your sensor and how sensitive it is, maybe you won't even need a timer.
  • Wouldn't it be fun to add a Microbot Push to your toilet buttons so you can flush with Homey as well....
  • RocodamelsheRocodamelshe Member
    edited October 2016

    - start timer_toilet (60 seconds in my case)


    So after 60 sec no motion the light goes off?
    I had that before in my toilet and when some one takes a long shit the light will go off.
    I solved it with a infrared sensor. Measure the temp of the sensor itself and surrounding temp. That way u can sit still for as long as u like and the light will stay on.

    For the livingroom it's another challenge. U need to move every now and then to keep the lights on.
    IR sensors could work but u need a lot of those. For the toilet it's a great presence detection, for a living room we need something different.

    BTW, ur flow looks a lot like this flow . I don't mean anything with that, just noticed.
  • Fire69 said:
    Isn't that a little complicated?  :o
    I use a motion sensor in our toilet because the kids always forgot to turn off the light.

    The whole purpose of this topic was to make advanced flows right? Not simple ones. Why take the easy way when you can do it the hard way  ;)

    I must admit that I haven't used the start and stop timer functionality yet. That would make it all a bit easier.

    The use of states still has some advantages:
    - It allows you to configure and modify complex scenes independently of behavior. 
    - It makes it easier to fine-tune and add more behavior to it later. 
    - It allows for easier interaction between various areas (one state interacting with another state) and thus allow you to build layer upon layer of abstraction.

    For a toilet light, using states is overkill, but I noticed that the number of states for my living room is expending rapidly as I add more behavior to it. I need to get better at using the Homey logic, but the use of states has made it easy to add some pretty nifty and natural behavior without breaking a sweat. 

  • - start timer_toilet (60 seconds in my case)


    So after 60 sec no motion the light goes off?
    I had that before in my toilet and when some one takes a long shit the light will go off.
    I solved it with a infrared sensor. Measure the temp of the sensor itself and surrounding temp. That way u can sit still for as long as u like and the light will stay on.

    For the livingroom it's another challenge. U need to move every now and then to keep the lights on.
    IR sensors could work but u need a lot of those. For the toilet it's a great presence detection, for a living room we need something different.

    BTW, ur flow looks a lot like this flow . I don't mean anything with that, just noticed.
    Never had a problem with the light going out.  You have 90sec (30sec sensor timeout + 60sec countdown timer) to move.  If you don't move AT ALL during 1.5min, you might be dead!  :p
    (Depends on the placement of the sensor also of course)
    In bigger rooms, you'll need another solution (longer timeout, more sensors, ... )

    Flows do indeed look alike :)

    JaapPelt said:
    Fire69 said:
    Isn't that a little complicated?  :o
    I use a motion sensor in our toilet because the kids always forgot to turn off the light.

    The whole purpose of this topic was to make advanced flows right? Not simple ones. Why take the easy way when you can do it the hard way  ;)

    I must admit that I haven't used the start and stop timer functionality yet. That would make it all a bit easier.

    The use of states still has some advantages:
    - It allows you to configure and modify complex scenes independently of behavior. 
    - It makes it easier to fine-tune and add more behavior to it later. 
    - It allows for easier interaction between various areas (one state interacting with another state) and thus allow you to build layer upon layer of abstraction.

    For a toilet light, using states is overkill, but I noticed that the number of states for my living room is expending rapidly as I add more behavior to it. I need to get better at using the Homey logic, but the use of states has made it easy to add some pretty nifty and natural behavior without breaking a sweat. 
    I think it will get complicated enough over time with more and more flows, so I try to keep it as simple as possible :smile: 

    It's because of some of your posts explaining how you made your flows that I started using variables and such, so you're my biggest inspiration (Homey-wise :wink: )
    I'm still trying to simplify the flows I have now by converting them to use variables, but I find it difficult sometimes to cleanly split actions and triggers :)
  • Temperature measuring using multiple sensors in the same room: 
    https://forum.athom.com/discussion/comment/33664/#Comment_33664
  • Question: on a fibaro dimmer 2 - on a flow i want to set a brightness to higher. BUT it will do that but immediately go to the old brightness setting (like within 1 sec)... dimming to lower setting actually works... any idea?
  • RJSRJS Member
    Jerryvdv said:
    One of my favourites, mainly because some of the family members are otherwise unable to interact with Homey :wink:, is for providing spoken feedback after talking to Homey. What the following flow does is say either say a standard prase (in my case "Sorry, ik begrijp je niet") when the text does not trigger a flow (2nd flow below) or say nothing (or that what is in the triggered flow offcourse) when it does trigger a flow (3rd and 4th flow below).

    It goes as follows (mind you it is not lean):
    • create a timer
    •  2nd, 3rd and 4th, create the following flows:
    The first flow fires up a 1 second timer to allow the false/true check of the 2nd and 3rd flow to check the boolean condition (otherwise it is always it's standard condition - false). 

    * For the true flow (3rd) you can also add a confirmation by homey if you like. Personally I let homey repeat the confirmation in the individual flows.
    • Finally: for each (voice triggered) flow set the boolean condition to true.


    One caveat is that the flow does not natively work with built-in commands (I suppose you could implement a workaround for these if you would really want to).

    If someone has a better way to implement it, let me know! :smiley: 



    Hi Jerryvdv . Goede flow. Dat kan mijn familie ook wel gebruiken. Ik kan de zandloper al niet vinden? Waar kan ik die toevoegen? Dank.


  • RJSRJS Member
    Bedankt!
Sign In or Register to comment.