Mailbox Sensor


  • Contest Winner

    I mentioned this on the Vera site, thought I'd post some Photos.

    I get a pouch notification when the mailman makes his delivery.

    I finally have it working with the off the shelf Digital light sensor sketch and PLEG to notice the light change.

    photo 1-1.JPG photo 2-1.JPG photo 3-1.JPG photo 4-1.JPG photo 5.PNG


  • Hero Member

    Nice project. I was going to post a new topic until I found yours. I currently have a 433MHz doorbell -> Arduino w. ethernet shield set up as a mailbox notifier / alarm but I'm looking to replace that with a MySensors version as soon as things are up and running here.

    I currently use a ball tilt switch to trigger the sender and it has been working pretty flawlessly so far, all things considered. Also thought about using a light sensor, a simpler photoresistor, an actual button trigger, some sort IR beam break detection or a reed switch but eventually settled for one of the simpler designs. The tilt switch worked like charm for the doorbell since it only needs to simulate a button press and is of very simple design. I wonder if a tilt sensor / switch would work as well with an Arduino with regard to interrupts and battery savings.

    Which light sensor did you use exactly? How has it worked out with the batteries so far? Any other considerations when moving the mailbox sensor project to MySensors that you can think of?


  • Hero Member

    I wanted a mailbox sensor so I used a Schlage ZWave door sensor with a separate magnetic contact attached to the mailbox door. When opened Vera alerts using several different messages depending on the target devices. It does a voice announce using TTS on the primary control tablet running ImperiHome and sends text alerts to two phones using PushOver.


  • Contest Winner

    @clippermiami

    Nice

    i could not get zwave to TX that range though the woods plus getting the signal out of the metal box...


  • Contest Winner

    @bjornhallberg

    I used a digital light sensor, so far the batteries are the same as when I posted.

    If I did it again, I would use a contact switch, any motion or tilt should do well.

    The light sensor doesn't always report if the weather is very dull. I haven't really focused on fixing it, of course...


  • Admin

    I still have an good old fibaro z-wave universal sensor with magnetic switch on my mailbox+pleg+sonos tts.

    I should probably replace it with a MySensors wireless sensor. Just for the sake of using MySenosrs 😉 Eat your own shit. Right?


  • Hero Member

    @BulldogLowell Yeah that is what I suspected. It would have to be a trigger that could work in low light conditions. Plus the design of your mailbox and placement of the sensor doesn't seem to work in your favor. Still, it's easier to tuck away electronics in there than in the bucket-like mailboxes we all have over here.

    @hek I was wondering about the BinarySwitchSensor sketch? It does seem like the obvious choice for this application and overall it's a very versatile sketch, but it doesn't sleep or react to interrupts from button presses? Or am I misunderstanding the Arduino's capabilities here? Sorry for the noobish question.


  • Admin

    @bjornhallberg said:

    I was wondering about the BinarySwitchSensor sketch? It does seem like the obvious choice for this application and overall it's a very versatile sketch, but it doesn't sleep or react to interrupts from button presses? Or am I misunderstanding the Arduino's capabilities here? Sorry for the noobish question.

    No it does not sleep in it's current form. It was actually more an example of using the debounce library. You probably could live without this and just go for the 1.4 build in:

     gw.sleep(INTERRUPT, CHANGE);

  • Hero Member

    @hek said:

    @bjornhallberg said:

    I was wondering about the BinarySwitchSensor sketch? It does seem like the obvious choice for this application and overall it's a very versatile sketch, but it doesn't sleep or react to interrupts from button presses? Or am I misunderstanding the Arduino's capabilities here? Sorry for the noobish question.

    No it does not sleep in it's current form. It was actually more an example of using the debounce library. You probably could live without this and just go for the 1.4 build in:

     gw.sleep(INTERRUPT, CHANGE);
    

    Thanks I'll look into it. I expect I'll get a lot of use out of that sketch. After the obvious things like door / window sensors and the upgraded mailbox alert sensor I'm thinking of adding a mouse trap sensor to my humane "tincat" trap. It would be fantastic for everyone involved to know when the trap doors have been opened. No accounting for gnawed off wires of course.

    2skxctli.jpg


  • Hero Member

    @hek there is no interrupt related debouncing as far as I know, this is why I used the time debounce for my reed switch sketch of the water meter


  • Contest Winner

    @epierre

    you can debounce an interrupt:

    void PushButton() //interrupt.
    { 
      static unsigned long last_interrupt_time = 0;
      unsigned long interrupt_time = millis();
      if (interrupt_time - last_interrupt_time > 200) // If interrupts come faster than 200ms, assume it's a bounce and ignore
      {
        counter++;// your interrupt flag here
      }
      last_interrupt_time = interrupt_time;
    }

  • Hero Member

    @BulldogLowell yes tjis is time debouncing as opposed to the debouncing library from tje switch sketch


  • Contest Winner

    @epierre

    right, yes.


  • Hero Member

    A silly question - wouldn't PIR be the best option here? very responsive and interrupt driven so low power consumption? or am I missing something?


  • Contest Winner

    @Moshe-Livne

    The PIR is a light sensor, so they are quite similar. The light sensor works for me, and I did try it with a motion sensor too. I'm not hung up on either but I can't say what is best.

    Try it with the motion and let us know how it goes for you!


  • Hero Member

    @BulldogLowell will do! that is one of my next projects. wouldn't PIR be easier to mount, as you can mount it at the back or at the top of the compartment? not trying to criticize, I am pretty much a newbie and trying to see if I miss anything.


  • Contest Winner

    @Moshe-Livne

    I'm sure you PIR will work well... if you look at the box I built, I didn't have a mounting problem.

    Likewise I tried a mechanical switch, but didn't like what happened if the door wasn't closed all the way and I wanted to be able to get the 'module' in and out as I tested it.

    The PIR was similarly an issue for me, if the box wasn't closed it would constantly send messages (changes in light from sun's position, car/person walking by, etc) during the day. so if you trust your letter carrier... 😉

    it is easy to try your idea; for me that is part of the fun of the world of electronics. And open-source is what makes reasonably well-crafted ideas into even better ideas!


  • Hero Member

    @BulldogLowell our mailboxes have slots, not door so there is no problem or door being left open. will try it the minute i'll get my hands on some more dupont cables!!!!


  • Contest Winner

    @Moshe-Livne said:

    will try it the minute i'll get my hands on some more dupont cables!!!!

    👍



  • Hi,I think you have done a good job.I am very interested in your IOS app, it's written by yourself or other open-source project? Thanks.


  • Contest Winner

    @Cai_Niao

    I am using HomeWave, an iOS app developed for Vera which is my controller.


Log in to reply
 

Suggested Topics

  • 8
  • 3
  • 1
  • 2
  • 29
  • 44

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts