Results 1 to 3 of 3

Thread: Need help on a Non-Christmas project

  1. #1
    Join Date
    Nov 2007
    Houston, TX (near Katy)
    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
    Newtown CT
    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.

    2020 Full sized show reworked for the new location. Only adding (famous last words) 13 RBLs that I finally got converted to using pixels
    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. Dim show (3000 pixels) had regular visits most nights.

  3. #3
    Join Date
    Dec 2016
    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


Posting Permissions

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