OK, so I have a tough 1 here, well for me at least!
I want to create a flow that works just like normal mailbox flag, but it’s automatic.
So this is how I’d like it to work.
When the mailbox is opened by mailman, “You’ve got mail” switches to TRUE
When someone in family opens it, “You’ve got mail” switches to FALSE
The issue I’m having is deciphering who is opening the mailbox, IF it was just me, I’d probably just have a button to press to “put the mailbox flag down” but I know my wife and daughter will NEVER do that. I’m trying to figure something out like:
WHEN mailbox is opened and front door does not open within 1 minute then switch “You’ve got mail” to TRUE, if it does open within 1 minute, switch “You’ve got mail” to FALSE
WHEN mailbox is opened AND front door opens within 1 minute Switch “You’ve got mail” to FALSE. Or,
WHEN front door is opened AND mailbox is opened within 1 minute, switch “You’ve got mail” to FALSE
Also,
When Someone comes Home and “You’ve got mail” is TRUE, notify them, then switch “You’ve got mail” to FALSE but only if they opened the mailbox, if they didn’t open the mailbox, THEN remain TRUE until someone leaves or arrives at home, THEN if the mailbox and door open within 1 minute if each other, switch “You’ve got mail” to FALSE.
Kinda confusing I guess, but that’s why I’m having trouble!
Actually… do You really need the automatic notification, when mail is collected?
I personally use the following system:
Mailbox’s “mailmans door” is monitored by Fibaro window sensor ( indoor one, but for now ~3 year working totally outside - only cover is the mailbox upper ( mailman ) door
IF sensor hits, then message inside of house (Google Cromecast) and yellow light on home-made “switch panel”.
IF someone collects mail - then just pushes switch with yellow light and light ( some analogy of US style mail flag) switches off. Just for fun also the “Mail collected” message
PS. In principles i can use another sensor to automate ( have “get the mail” door also on my mailbox) - but the current system serves me well and do not had a idea to implement second sensor instead my switch.
May be simpler is better and start with it - allwaysis possibility to improve after.
Flow 1 and 5 will stay disable until flow 4 and 2 enable its.
Flow 4 and 2 will enable flow 1 and 5 and disable its after x min ( adjust based on the time you going to take the mail before/after you open the front door )
Flow 1- when you exit your house from front door and take the mail. ( switch you’re got mail to false )
Flow 3- When the mailman opened the mailbox ( switch you’re got mail to true )
Flow 5- when you arrived and take the mail then enter the house. ( switch you’re got mail to false )
I’m trying to avoid using 5 different flows, I feel like you should be able to use variables. I’ve been trying, but I’m having trouble translating the 5 flows into variables.
First look - it may work. But there are some uncovered scenarious…
What happens, if mailman comes in Your footsteps? You come home and ~30sec after comes mailman
What happens, if You small-talk with neigbhour? Out for mail, but then 5 minutes talky-talky and then takes mail.
What happens, if You come home and take mail before opening door
Hmm, and i’m not talking ‘bout real life, where the signals may delay or totally miss…
PS. One more recommendation - do not use delay in logic to manage mailboxAccessWindow. Better use some of count down timers (there are hmm, at least 3..4 apps with such feature). Just when door opens, start count-down, and if mailbox opened, check, if timer is running. Additional feature - countdown zerro can triger message: You forgot to take mail Ok, spam, if You really goin’ out when something in mailbox.