Giter VIP home page Giter VIP logo

Comments (5)

travchen avatar travchen commented on June 11, 2024

Goal: door/motion sensor-->server-->alertLevel-->send email/text. Any guidance on how to get started or make that happen? Aside from RPI (requisite sensors/wires) and monitor/mouse/keyboard, is there a purchase list of some sort?

from alertr.

sqall01 avatar sqall01 commented on June 11, 2024

Perhaps I should add some small examples how you can detect when a door was opened to the documentation. I have no purchase list for this, so I will just explain what you need with a small example.

Example 'detect opened/closed door':

What you need:

-reed switch (like this http://www.amazon.com/gp/aw/d/B001DEUUZC/ref=mp_s_a_1_11?qid=1451638924&sr=8-11&pi=AC_SX236_SY340_FMwebp_QL65&keywords=reed+switch )

-wires to connect it to the raspberry pi

-resistors to build a pull-up ( https://github.com/sqall01/alertR/blob/master/docs/raspberry_pi_pull_up_for_switch.jpg )

-raspberry pi and components like power supply

This is everything you need. You can install all alertR instances (like server, sensor client and alert client) on the raspberry pi. But you are also free to install the instances on different hosts, since they communicate via ethernet.

The goal in this example is to trigger an alarm if the door was opened. The alarm should just send you an email. Therefore, you only need one AlertLevel at this moment. We use this as a group for all alerts raised by the opened door (in this case trivial since we only got one sensor, but imagine you also want an alarm if any window is opened in your house/appartment, then multiple sensors are grouped in one AlertLevel). You have to install the server and set it up with one AlertLevel. This AlertLevel has no rule, it should trigger an alarm if the sensor is in the state 'triggered' and it should NOT trigger an alarm if it is in the state 'normal'. You can now decide if it should always trigger an alarm despite if alertR is activated or not or just when it is acticates. Configure everything for this AlertLevel so it sends an email to you when an alarm is triggered (NOTE: the next version of alertR has a specific alert client that sends emails and removes the functionality of sending emails when an alarm is raised from the server). For this to work, you need a local smtpd installed like postfix that delivers the emails send by alertR. This was the server configuration.

When you have wired everything up like in this picture ( https://github.com/sqall01/alertR/blob/master/docs/raspberry_pi_pull_up_for_switch.jpg ), you can use this little helper script to check if everything is connected correctly and if you are using the correct gpio pin ( https://github.com/sqall01/alertR/blob/master/helperScripts/raspberryPiGpioInputTest.py ). It will display you the state of the gpio pin on the console.

If everything works, you can configure the sensor client raspberry pi. Just use the same gpio pin number you used in the helper script. Configure the sensor to raise an alarm in your configured AlertLevel. The sensor should trigger an alarm, but NOT if it is in the 'normal' state. You need no alertDelay, so set it to 0. set the trigger state accordingly to your results with the helper script (the state it printed out when the door was opened). Set the sensor type to polling.

This should be it. A simple set up to detect if a door was opened. Let me know if it works out or you encounter any problems. (I wrote this with my mobile phone so please excuse typos)

from alertr.

travchen avatar travchen commented on June 11, 2024

The above will be studied for sure. Two questions:

  1. For server: What would my host/port be? In your code you have
    host = "alertR.h4.des.org", port = "6666".I assume mine would not be same?
  2. Is it possible to incorporate wireless sensors?
    Thanks for the awesome and in-depth answers!

from alertr.

sqall01 avatar sqall01 commented on June 11, 2024

Hi,

to 1)
No it would not. This is the hostname/ip of your alertR server instance. If you install everything on the same host, this is 'localhost' or '127.0.0.1'. The port is the one you chose in your alertR server configuration.

To 2)
There is no limitatidon in using wireless sensors with alertR. The only important part is that the states 'triggered' and 'normal' reach the sensor client. But I did not build any yet. So I can not give you any hints what to do or where to look for it. If you had build it, I can help you incorporate it. Should not be a problem.

from alertr.

sqall01 avatar sqall01 commented on June 11, 2024

Hi,

since there was no answer in the last month, I consider this issue as being solved and close it. Feel free to open it again if something comes up.

from alertr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.