Mailbox Sensor

zwave
Tags: #<Tag:0x00007f0142db0a48>

(The Squid) #1

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.

Any suggestions greatly appreciated.

Squid


(SiHui) #2

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 :sunglasses: ) for multiple flap open events.


(Mr. Wiseman) #3

Can you recommend a zWave device for this? I live in the midwest US which the temps can drop to -20 F during the winter.

I asked this question to Aerotek engineers and they said not to put their stuff in a metal box or in that temp.

Best, Jay


(Mark) #4

This is exactly what I do. :+1:

I use an Aeon ZW097 dry contact sensor, but I think these are NLA.


(The Squid) #5

This is the one I purchased from Amzaon - fairly inexpensive.


(Rossko57) #6

Metal box is self-explanatory for a radio device.

For low temperature, while the maker’s won’t guarantee correct operation - “you’ll probably get away with it”.

Likely of more concern is cold battery performance


(The Squid) #7

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.

Squid


(Mark) #8

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…


(The Squid) #9

I’m missing something easy here…

Sensor is installed in the mailbox and working.

Items:

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???

image

Or will the proxy item not display a switch/toggle and I just need to read the stTe?


(Rossko57) #10

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


(The Squid) #11

Adding the [%s] returns nothing…

Sitemap Entry…

		Text item=MailboxProxy

(Scott Rushworth) #12

I think you are going to want to use…

Switch item=MailboxProxy

(The Squid) #13

Dooh! Geez I really had been staring at that too long.

Thank you!


(Mark) #14

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
c_mail-off
mail-on
c_mail-on
mail
c_mail-on

Edit: I take that back. mail-off isn’t used in HABpanel anymore.

<div ng-if="itemValue('YouHaveMail')=='ON'" ng-style="{opacity: 1.0}">
  <button class="btn btn-md" style="background: white; color: black" 
          ng-click="sendCmd('YouHaveMail', 'OFF')">
    <span>
      <img id="mail-icon" src="/static/images/mail.png" width="48px" height="48px"/>
    </span>
  </button>
</div>

<div ng-if="itemValue('YouHaveMail')=='OFF' || itemValue('YouHaveMail')=='NULL'" ng-style="{opacity: 0.2}">
	<span>
		<img id="mail-icon" src="/static/images/mail.png" width="48px" height="48px"/>
	</span>
</div>

(Mr. Wiseman) #15

Got my first email from OH on mail delivery. I was so excited, like I won something :wink:

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


(Mr. Wiseman) #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 ;-(

It’s 22 degrees in Chicago today and it works perfectly. The sensor has been in the mailbox for over a month now.

Best, Jay


(Sascha_S) #17

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…