Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Snail mail detection via LoRaWAN

    Scheduled Pinned Locked Moved LoPy
    lopy lora
    5 Posts 3 Posters 1.2k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z Offline
      zappfinger
      last edited by

      I finally got this going: snail mail (letters, ect) detection via LoRaWAN. We live in an apartment where our mailbox is downstairs. Thanks to 2 LoPy's and a light sensor I can now see that mail has been dropped in our box..
      One LoPy is in the cigar box (with the light sensor on top), the other in my home...

      1_1530980306227_mail2.jpg 0_1530980306227_antenna.jpg

      1 Reply Last reply Reply Quote 3
      • S Offline
        Sympatron
        last edited by

        Interesting project.
        What is the cable you taped to the front of your mailbox for?

        Z 1 Reply Last reply Reply Quote 1
        • Z Offline
          zappfinger @Sympatron
          last edited by

          @sympatron That used to be the antenna, because the mailbox is a Faraday cage, so radio waves do not pass through. Now I have the cable in the side of the door, seems to work also. BTW, I have written about the project here: https://medium.com/@zappfinger/snail-mail-detection-with-lopy-and-lora-iot-protocol-249c8fa4bac5

          1 Reply Last reply Reply Quote 0
          • philwilkinsonP Offline
            philwilkinson
            last edited by

            Great project Richard.
            Did you publish via Lora/LoRaWAN? If so, how far away was your gateway as I assume just extending the wire as an antenna would not be suitable for a long range antenna.
            Also, did you just use a plain interrupt on a Pin that was pulled-up? What sensor did you use?
            It would be great if you could publish your code too!

            thanks for sharing this project,
            Phil

            Z 1 Reply Last reply Reply Quote 0
            • Z Offline
              zappfinger @philwilkinson
              last edited by zappfinger

              @philwilkinson Thanks Phil, it was a fun project and something I wanted to try for a long time. I will share the code in a moment. The communication between the 2 LoPy's is based on the 'ping-pong' example, although some messages were added. The 'mailServer.py' is the code running in the mailbox. The 'mailClient.py' is the client running in my home. When the client starts it does a getStatus() to get the status from the server ('mail'/'no mail': it could be that mail came in when the client was not running).
              Then it sends a reset command so the mailServer resets ( so I do not have to power down the server each time mail was detected)
              Every minute the getStatus() is also executed. In fact getStatus() tries 3 times to get the status. If that does not succeed, I assume the battery is dead and the clients LED turns red.
              It turns green when getStatus() succeeds, but there is no mail, blue when mail was detected. My next step is to connect the client to my Wifi network also (via a socket or so), allowing me to send an email when snail mail came in or the battery is dead...
              To answer your questions, it uses the LoRa protocol. I estimate the distance to be 50 to 70 meters, but with a lot of concrete and a steel elevator in between. The antenna wire is now in a sleeve in the mail box door, because vandals stripped the antenna twice.
              1_1531328973387_mailClient.py 0_1531328973387_mailServer.py
              It seems to work well, especially with these settings for tx_power and sf:

              lora = LoRa(mode=LoRa.LORA, frequency=863000000, tx_power=14, sf=7)
              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom