JIM HASELMAIER
  • Home
  • Train Alert
    • NoCo Train Alert (Twitter)
    • NoCo Train Alert (Web)
    • Train Alert Dev Team
  • Lift Bridge Alert
    • Lift Bridge Alert (Twitter)
    • Lift Bridge Alert (Web)
    • Mackinac Bridge Cams
  • Suncatcher
  • Blog
  • Contact
Picture

Implement Train Alert in Your Commnity


​Train Alert is a hardware/software/communication solution that provides advanced warning to your community when a train is approaching town. The alerts can be used by cities and residents to reduce commuter and pedestrian disruptions caused by trains.  Users can modifiy routes and/or notifiy others if delays are expected as a result of getting this information.  

Train Alert is operational in Northern Colorado. Learn more about this implementation.
A Train Alert solution is comprised of the following components:
  • Train Detection Systems 
    One "system" required for each location where a track enters your community
    --  Camera
    --  PC running Train Alert software 
  • Train Alert web site
    Needed to provide info to the community including:
    --  Web-based alerts
    --  Subscription management for Twitter and email alerts
    --  Instructions for users who want to receive alerts
    --  Feedback opportunities
    --  General info about the solution (including future plans)
  • Network of users
    Community members and/or municipalities. The more people and organizations who receive the alerts, the greater positive impact.
    Alerts must be received to provide value. Members of your community will need to know how to access alerts and/or you need your local traffic department to use them to modify traffic patterns.

    Establishing a network of users requires the following:
    --  Generating awareness within the community
        (via social media, local press, etc.)
Picture
How It Works
  • Inexpensive cameras focused on railroad tracks provide data which is analyzed to detect trains.
  • ​Alerts are distributed to users via a single-page web app, Twitter and email (based on their preferences).
  • Viewers access the alerts (via smart phone, tablet or PC) when they care about train traffic and ignore them the rest of the time.

Implementation Instructions

All components required to install, integrate, test, announce and maintain a Train Alert solution can be aquired for free or at very low costs.  Instructions for creating a solution are provided below.


​STEP 1:  ACQUIRE Components
The following hardware, software, and communication infrastructure components are required:

     HARDWARE
  • PCs
    1 for each location where a track enters your community
  • Cameras
    1 for each location where a track enters your community) - cost: ~$100 each

      SOFTWARE
  • Train Alert software
    This Open Source software will be available soon on GitHub (Project Name: "Train Alert") - cost: free
  • Open CV, Anaconda, and Phython 3 (Installation Guide)
  • smtplib
  • tweepy
  • Python IDE of your choice (e.g. PyCharm)
  • Wi-Fi Network

      COMMUNICATION INFRASTRUCTURE
  • Web site infrastructure - cost: ~$120/year
  • Twitter Acounts (2) - cost: free
  • Email Accounts (2) - cost: free
Picture
​Consulting and implementation services are available for communities who want to outsource all or part of the effort required to establish the solution and/or network of users.

STEP 2:  SET-UP Compontents
  • Mount cameras
  • Configure PCs
  • Load Train Alert video analysis software (and it's components) on PCs
  • Create Web Site 
    Copy the main Train Alert web site or design your own if you have better ideas
  • Establish Twitter Acounts 
    1.  Establish a primary Twitter account which will be used to update the web alerts (example)

    2.  Establish a second Twitter account which will be used to send Twitter alerts (example)
    3.  For each Twitter account
    obtain consumer keys and access tokens
  • Establsh Email Accounts
    Establish a dedicated email account for each Twitter account​​

STEP 3: INTEGRATE and CONFIGURE Components
​

     PC
  • Install Windows or Ubuntu
  • Ensure PC is connected to the Wi-Fi network
​
    
 CAMERA
  • Connect Camera to Wi-Fi network
  • Log into camera via web browser and ensure clear view of tracks
  • Establish a secure camera log-in and password (do not use default settings)

     TRAIN ALERT SOFTWARE
     Modify the following info within the Train Alert software as follows:
  • Change camera login settings to match your camera settings (IP address, login, password)
  • Set crop settings to provide tight view of railroad tracks + ~20' above tracks
  • Adjust settings as needed for: sunrise hour, sunset hour, seconds required to check for long trains, # of frames required to ID train, etc.
  • Adjust directional labels as needed
  • Copy & paste appropriate Twitter consumer keys and access tokens into functions:
    send_twitter_update and send_web_page_update
  • Configure "sendemail" function with appropriate email and password info
  • Add email subscribers' email addresses in "bccdist" blocks within "sendemail" function
  • Modify appropriate cross streets and arrival estimates 
  • Modify Twitter and email message body contents as appropriate 

STEP 4:  TEST & CALIBRATE Solution
​
  • Observe passing trains and adjust settings as needed.
  • Conduct end-to-end tests to be sure passing trains generate timely alerts via the web and Twitter.

STEP 5:  ANNOUNCE Train Alert
Execute an outreach campaign to build a user community. Suggestions:     
  • Twitter
    --  Announce the availability of Train Alert in your area.
        Tag media outlets, personalities and city officials who may be willing to help you spread the word (example results)

    --  Use your main Train Alert Twitter account (which will be followed by users) to start following people you expect might be interested in Train Alert
    --  Search Twitter for expressions of frustration related to train delays in your area.
         Respond to these comments with the news that Train Alert is now available.
  • Facebook
    Announce the availability of Train Alert
  • Reddit
    Announce the availability of Train Alert via appropriate community sub-Reddits
  • Email
    Announce Train Alert to local media contacts

STEP 6:  ​MAINTAIN Solution
  • Process subscription requests
  • Respond to inquiries
  • Monitor reliability, detection accuracy, and alert delivery performance
  • ​Update system as needed     ​
DISCLAIMER:  Train Alert is provided for informational purposes only and may not be 100% reliable. Train Alerts should not be used as the basis for critical decisions. People and organizations involved in providing Train Alert data are not responsible for actions taken as a result of the information provided.

Jim Haselmaier

Copyright © 2021
Proudly powered by Weebly
  • Home
  • Train Alert
    • NoCo Train Alert (Twitter)
    • NoCo Train Alert (Web)
    • Train Alert Dev Team
  • Lift Bridge Alert
    • Lift Bridge Alert (Twitter)
    • Lift Bridge Alert (Web)
    • Mackinac Bridge Cams
  • Suncatcher
  • Blog
  • Contact