Results 1 to 3 of 3

Thread: Need help on a Non-Christmas project

  1. #1
    Join Date
    Nov 2007
    Location
    Houston, TX (near Katy)
    Posts
    963
    Post Thanks / Like

    Default Need help on a Non-Christmas project

    Hi..I am trying to use a raspberry Pi to catch a triggered event (a closed switch such as a pressure switch) and email me if the switch is triggered. I currently have an outside pressure tank and would like to be emailed is the pressure drops below a certain point. I think I have the necessary hardware, but know nothing about python, or any other scripts for that matter and am looking for a nudge to get this project started. I look to this community because of the help you have given so many others in the past. I will pick it up quickly, but need some help getting started. I appreciate any input.
    I do see scripts for a triggered event, and an sSMPT script. I can get the Gmail account, but again, I don't know what programs to start with on the Pi.
    thanks again.
    That's a feature not a bug.
    There's no charge for that.

  2. #2
    Join Date
    Dec 2012
    Location
    Hudson MA
    Posts
    3,786
    Post Thanks / Like

    Default Re: Need help on a Non-Christmas project

    you need to collect a few bits of software together. Python has a facility for sending emails. Find an example for it. The look into how the timers work in Linux. There is a mechanism for running a program every N seconds (can be days work weeks or every day at 1:03 AM etc). It is called a cron job. You create your cron job to fire however often you want to check the input. You did not mention how the sensor is attached to the PI. If it is via a digital input (on / off) then you would use python to call wiringPi to get the current state of the input. Then your program decides whether it should send an email or not.

    So cron calls your python utility, python calls WiringPi and Email.

    The above is called "Polling". It reads every N period of time. Writing code that is event triggered is a bit more difficult. Polling should meet your needs.


    2019 - Just moved into a new home (yet another change of plans). Will be dim but not dark. Too much to do at the new place to leave time for a show.
    https://www.youtube.com/channel/UCyX...ttrsZNARkUce0Q

  3. #3
    Join Date
    Dec 2016
    Posts
    3
    Post Thanks / Like

    Default Re: Need help on a Non-Christmas project

    I think that you would be better served with an arduino than the raspberry. You can probably find the sketches you need already created on the arduino projects pages or instructables.com.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •