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.

Create a list of door sensors with contact alarm on

I am currently drafting a flow where I want to do a security check before I leave home. In this case, if one or more windows is still open (contact alarm of the NEO sensor is ON) a list is send to the device.  E.g. 'door sensor A, B and D are still open". Preferably I would like to use the tag mechanism of Homey. Otherwise I would need to use the Better logic boolean values and/or string variables. 

Does anybody have experience with this?

Setup: 5 NEO coolcam door sensors installed (includes a tag: contact alarm Yes/No)

Preferred flow(s):
  1. IF: HOMEY receives request to run security check
  2. Then: for every door sensor with Contact Alarm: YES, add to list. At End of list, send Push message to device or emai
Initial thinking
1. Build a stringvariable for every door sensor with the status. Develop a flow for every device that adds the status to the string variable. In a last flow, combine the string variables to one string and send this string to email or push notification.
2. Build one stringvariable. Develop a flow that once triggered compiles one large string with the tags Yes?No per door sensor. Given the current field length and the way you drag tags into the field, this is a challenging task. 

Any ideas/experience? Thanks!

Comments

  • lubbertkramerlubbertkramer Member
    edited July 2017
    In 1.5 you will have multiple triggers wich you can use for example for your doorsensor. So with one flow you can trigger on all your doorsensors and set a variable to true that device x is opened and when leaving you can check if anyone is on yes. (The trigger card has a tag with the device name that triggers the multiple trigger)

    So your second flow can just check if any value is on true (var) if that's right then send message to device with x information else do nothing/send everything is closed

    Will test it later with a testflow for you if this should work but in theory it should :)

    Edit:

    I tested it but making a list of all the devices is gonna be the hardest part. You can trigger a flow with the multiple trigger that if one doorsensor goes off/alarm on then the flow triggers, in the AND you can use in 1.5 up to three OR so you could select with the tag from the multiple trigger up to 3 devices in one flow (logic card where device name = device name from tag) if one of the OR's is True THEN do your thing ELSE do other thing. 
  • fspaanfspaan Member
    edited August 2017
    Thanks Lubbert! I will wait for version 1.5.  Sounds like I can remove quite a number of flows with the new version. 
  • Good news, @Emile did just posted on Slack that in the new update for Developer Preview will be a condition card to show a alarm is still on :) Also will zone be added to the cards next to the device name
  • As a workaround you could use a number variable, set it to 0 
    If a door/window is open add 1 to the  num_var, if closed deduct one
    so when you leave have a flow check the num_var to see if it is 0.. it's not nice but should work   
  • @lubbertkramer, @Emile Thanks! Glad to see I was not the only one :)

    @techniman I considered this one as well, but I wanted to provide info which device. Otherwise you would have to walk around and find the one you need to pay attention to.

  • In 1.5 you will have multiple triggers wich you can use for example for your doorsensor. So with one flow you can trigger on all your doorsensors and set a variable to true that device x is opened and when leaving you can check if anyone is on yes. (The trigger card has a tag with the device name that triggers the multiple trigger)

    So your second flow can just check if any value is on true (var) if that's right then send message to device with x information else do nothing/send everything is closed

    Will test it later with a testflow for you if this should work but in theory it should :)

    Edit:

    I tested it but making a list of all the devices is gonna be the hardest part. You can trigger a flow with the multiple trigger that if one doorsensor goes off/alarm on then the flow triggers, in the AND you can use in 1.5 up to three OR so you could select with the tag from the multiple trigger up to 3 devices in one flow (logic card where device name = device name from tag) if one of the OR's is True THEN do your thing ELSE do other thing. 
    Nailed it! Just received 1.5.1 and tried it... Working perfectly. Created 3 flows with notifications sent to my device with the status. I did not use the logic card, but the device contact alarm card instead.

    Next thing would be which exact door is still open using the tag. 
Sign In or Register to comment.