Mailbox Flag

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.

  1. When the mailbox is opened by mailman, “You’ve got mail” switches to TRUE
  2. 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!

Flow 1- When mailbox is opened > switch to false (disable after created)

Flow 2- When front door is opened> and You’ve got mail is TRUE > enable flow 1 > wait 1 min> disable flow 1

Flow 3- When mailbox is opened > and flow 1 is disable > switch to true

Flow 4- When the someone came home > and You’ve got mail is TRUE> send notification> enable flow 5 > wait x min> disable flow 5

Flow 5- When mailbox is opened > wait 1 min> and flow 1 is enable> switch to false (disable after created)

Actually… do You really need the automatic notification, when mail is collected? :wink:

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 :wink: and start with it - allwaysis possibility to improve after.

Is it important to know who fetched the mail?
That might be tricky to implement.

Your mailbox only have one lid to put and fetch mail?

Flow 1- When mailbox is opened > switch to false (disable after created)

* > switch You’ve got mail to FALSE, then disable Flow 1?

Flow 2- When front door is opened> and You’ve got mail is TRUE > enable flow 1 > wait 1 min> disable flow 1

Flow 3- When mailbox is opened > and flow 1 is disable > switch to true

* > Switch You've got mail to TRUE?

Flow 4- When the someone came home > and You’ve got mail is TRUE> send notification> enable flow 5 > wait x min> disable flow 5

Flow 5- When mailbox is opened > wait 1 min> and flow 1 is enable> switch to false (disable after created)

* > Switch You've got mail to FALSE, then disable Flow 5?

Yeah my wife and daughter will not press anything to disable the “mailbox flag”

And even if they are willing to, they will never remember

I had a simple setup like this, but like I said, they never used it lol

Not important to know who got the mail, just that it has been fetched.

Yes my mailbox only has 1 lid

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.

Advanced Flow

1.Variable- hasMail (Yes/No)

2.Variable- mailboxAccessWindow(Yes/No)

Trigger 1: When Mailbox is opened

→ IF Local Variable mailboxAccessWindow = Yes

→ THEN

Set Logic Variable hasMail = No

→ ELSE

Set Logic Variable hasMail = Yes

Trigger 2: When Front Door is opened

→ AND Logic Variable hasMail = Yes

→ THEN

Set Local Variable mailboxAccessWindow = Yes

Wait 1 minute

Set Local Variable mailboxAccessWindow = No

Trigger 3: When Someone came home

→ AND Logic Variable hasMail = Yes

→ THEN

Send push notification:

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 :wink:
  • 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 :wink: Ok, spam, if You really goin’ out when something in mailbox.

I’ll this when I get a chance, my life has been WAY TOO BUSY lately! lol