I plan on implementing a mailbox sensor to let us know when the mail has been delivered.
I have a z-wave door/window sensor which I plan on placing in the mailbox so that once opened - I’ll receive an event which I can act upon.
I’d like for the sensor status to remain OPEN for 8 hours so if we are not home, the mail delivered status will appear on our HabPanel status board - herein lies my question.
Can I use the expire binding to keep the status as OPEN, even though the mailbox has presumably been opened and then closed?
Should I create a proxy switch with a rule?
What’s the best method to keep the status OPEN, even thought it may be truly CLOSED?
I’m also planning on creating a reset button (maybe an Amazon Dash Button) to reset the state if we don’t want to wait the 8 hours or if we have collected the mail.
I’m just switching a proxy switch item to ON when the flap has been opened and a time cron at midnight to set it back to OFF.
In addition to that I get a notification on my phone (and an image from my front door cam ) for multiple flap open events.
I’m hopeful I can get about 10’ of range…I have a mains powered Z-Wave relay on my gate which about 8’ feet away. I’m in Texas so the coldest we typically get is about 20 F.
Yeah, it’s WAY outside their operating parameters. LOL
The device in my mailbox is showing just one neighbor, which is a wall switch about 2 meters from the mailbox. I really need to put the device inside the house, and just run a cable from the mailbox into the house. Not high on my priority list at the moment…
Contact Mailbox "The Mailbox Is: [%s]" { channel="zwave:devicexxxxxxxc:node30:sensor_door" }
Switch MailboxProxy "Mailbox is" <mailbox>
Rule:
rule "Mail Delivery"
when
Item Mailbox changed from CLOSED to OPEN
then
say("The Mail Has Been Delivered")
MailboxProxy.postUpdate(ON)
end
The items are working as they should according to the log files…
2018-10-27 16:18:08.961 [vent.ItemStateChangedEvent] - Mailbox changed from CLOSED to OPEN
2018-10-27 16:18:08.962 [vent.ItemStateChangedEvent] - MailboxProxy changed from OFF to ON
Yet on the sitemap, I get no data,something is missing???
Or will the proxy item not display a switch/toggle and I just need to read the stTe?
[That doesn’t seem to be exactly the same label text as the Item.] Edit
yes it is, glasses needed.
Sitemap entry looks like?
I’d pop a [%s] into the Item temporarily, to help see what’s what.
It’s ok to leave it as Text. You just need a [%s] in the item definition or in the sitemap widget.
Mine looks like this (with my own custom mail icon, and it only shows when there’s mail (or more specifically, when the mailbox has been opened)). There’s a rule to set YouHaveMail ON when the sensor triggers, and a rule to turn it off at midnight.
Item
Switch YouHaveMail "You Have Mail [%s]"
Sitemap
Text item=YouHaveMail label="Mail [MAP(mail.map):%s]" icon="c_mail" visibility=[YouHaveMail==ON]
Switch item=YouHaveMail label="Clear Mail []" icon="c_mail" visibility=[YouHaveMail==ON] mappings=[OFF="Clear"]
My mail.map contains this.
ON=CHECK MAIL
OFF=NO MAIL
NULL=NO MAIL
-=NO MAIL
And here are the icons. The mail-off icon isn’t used here; it’s used in a HABpanel widget.
mail-off
mail-on
mail
Edit: I take that back. mail-off isn’t used in HABpanel anymore.
jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
15
Got my first email from OH on mail delivery. I was so excited, like I won something
OpenHAB – The Mail Has Been Delivered.
I ended up putting 2 holes in the back of the mailbox (2 weeks ago) hoping the freq would send out those holes; been a month and all of sudden it worked.
Not sure why all of sudden but lets see if it continues. It’s actually cold here around 25 degrees also.
Thanks again!
Best, Jay
3 Likes
jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
16
Here’s the final solution using Squid’s recommended mailbox sensor above.
Mailbox is about 50’ away from my house; the 2 closest zWave devices are Aeotec Repeater in the garage (door is closed 99% of the time) and an Aeotec Multisensor 6 on main via a upstairs window pointed out.
Drilled 4 holes in the back of the mailbox for zWave to communicate from. Tried 2 top holes first but had NO luck with them. Hopefully the wife doesn’t notice the holes anytime soon ;-(
Chicago is so far away and yet we have the same Issues. When it comes to smartHome and openhab it all comes down to the wife not hitting us when things don’t work. I get that. Everything is working fine for 360 days a year, but hell breaks lose, when the system has some minor glitch and a light is not going on immidiately…