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.
Closed

Aeotec Multisensor 6: how to use 'motion' detected in a flow...

When I want to switch on the lights if luminance < certain lux AND someone is in the room, I need to be able to use 'motion' as a (co)trigger in my flow. But how?
For luminance, I use the following extra flow:

But for motion this seems not to be done similarly, because I can't fill 'name' with e.g. "motion" or "presence" etc. So the flow can't be created. Anyone else has a solution?
If so, would you care to show us the flow that you're using?


Comments

  • In the ...and... column: Better Logic Card 'less then' with variable 'luminantie' and your desired value 
    In the then... column the card to switch the light on.
  • JonJon Member
    In the ...and... column: Better Logic Card 'less then' with variable 'luminantie' and your desired value 
    In the then... column the card to switch the light on.

    Not sure if you read my question well. Because I know how to use luminance in order to switch the lights on. But I'd like to also use motion 'Yes/No' als a (co)trigger together with luminance.
  • Well, the result is the same, I think your making it to difficult for yourself with your aproach.
  • JonJon Member
    the result is not exactly the same, because I only want to switch on the light if both of the following conditions are met:
    - the luminance is under my desired treshold.
    - there's motion detected in the room.

    So that's why I want to use both.
  • You can't have two triggers at exactly the same moment (trigger column one). The condition is when "luminance is lower then 50", not the exact moment luminance changes from 50 to 49.

    So in the period luminance is lower then 50 (condition): When motion is detected (trigger) put light on.

    Just as @Jon states...
  • JonJon Member
    Yeah @BasVanDenBosch but how do I use the 'motion detected' in a flow? Sure I can use 'if motion alarm turned on' as a trigger in 'when column' but I'd like it the other way around:
    First check the luminance level, then 'if motion was detected', switch on the lights.

    (If I use motion detection as a trigger, I can't have 'a variable (luminance) changed...' as a trigger in the same flow).

    Why oh why (@Annemarie) is this so f*cking difficult in a flow editor that's said to be (I quote) 'childlike simplicity'
    (https://www.athom.com/nl/homey/flow/ >> "Homey's echte kracht komt naar boven in de Flow Editor. Je huis zich laten gedragen naar jouw wensen is opeens kinderlijk eenvoudig.")

  • JonJon Member
    edited October 2016
    Okay, now I resort to plan B. I want to use the 'presence' card in my flow, instead of the multisensor's motion detection. Fair enough.
    But this stupidly doesn't work either. What does the red exclamation mark mean, anyone knows?
    (clicking it does not work)


  • U don't wanna click it, just hover with ur mouse
  • JonJon Member
    U don't wanna click it, just hover with ur mouse

    Okay, thanks ;)
    It says 'missing_listener'. Now what ... :#
  • JonJon Member
    By the way, this 'someone is home' function is not a great deal anyway. If I use the card 'a specific user is home' and I use myself as the user, it does not recognize that I'm at home.
    But I've been home all morning and funnily enough the 'insights' agrees with me on that point...





  • bvdbosbvdbos Member
    edited October 2016
    @Jon : sorry to say this but you see the original question the wrong way. The concept is different...

    At the moment motion is detected you want homey to check whether luminance is below a certain level. If this is also true then you want a lamp to turn on... 

    As for the second flow: I think you can't test it with the test-button. You want your lights off when no-one is home and luminance > 50 ?  But what if luminance > 50 and someone is home, should the lamps stay on ? Or if no-one is home and luminance <50 the lights are left on? Should they stay on?

    In the second column you might delete the "is turned on", is doesn't matter. The only thing you do is avoid sending multiple off-commands to your lights... This will work for Hue (afaik) but i.e. for KaKu there's no reporting back to Homey. So if lights were turned on manually, Homey doesn't know the lights are on and won't turn them off with this flow.
  • Me thinks u don't gonna get what u want.
    "Someone in the room" is the hardest part.
    With motion detection and lux putting the lights on is the easy part. U just need to make some extra flows.

  • Maybe you need a separate flow for recording the luminantie every n seconds in a variable (or only when it changes). The second flow detects motion and checks whether the luminantie is under a certain level. If both are true you let the flow switch on the light.
This discussion has been closed.