Project Atlan: P2000 Notifier

Project Atlan is a grid of seperate projects. This grid of projects has as main goal: collecting data & providing information. All these projects together create my personal workspace, daily information sources and notification board. This part of the grid is about the Emergency Services Notifier.

This part of the network is made up of 3 parts:

The Server

The server is the beating heart of this project. By continuously updating our database with data from the P2000 network, several Twitter bots & other sources, we build up a grid of very accurate and up-to-date alerts. All parts of the project are able to establish contact to the server, and request / update information about the latest known changes. The server has one main API entrypoint, which allows for authentication & parameters so any endpoint can be completely customed to it's own needs. By returning the resulted data in JSON format, almost any platform can understand and interpret the data.

The Notifier

The notifier part of this project is located at my desk, and alerts me whenever an emergency call is sent regarding my hometown. Without having to rely on a local clock, the device pings the server about every minute, requesting any new information since the last time it was checked. The need of very specific time keeping is obsolete because we request "All messages since X" anyway. The device has my API key for the endpoint hardcoded in, but all other settings and preferences are stored on my account on the server, so the device does not require any reprogramming for simple preference changes.

The workflow of the notifier can be described as this:
  • @ Boot:
    1. Setup debugging channels
    2. Initialize the hardware
    3. Attempt to connect to WiFi.... (Stall untill success)
    4. Set to watchdog mode (LCD off & WiFi Caller on)
  • Main Loop:
    • On first run:
      1. Request current UNIX time from server
      2. Store to memory
    • On next runs:
      1. Build up command to request alerts & current server time
      2. Send command
      3. Store result & Plan accordingly
      4. If we received an alert, run the alerter:
        1. Determine type of alert
        2. Set variables accordingly
        3. Give audio alert
        4. Start LCD sequence
      5. Sleep for +- a minute

Components used:
  • 1x NodeMCU V3
  • 1x 12v Power Jack
  • 1x Buck-Boost converter (12V -> 5V)
  • 2x Single Pole Switch (For Power & Audio)
  • 1x RGB LED (Common Cathode) + Resistors
  • 1x 220Ω Resistor
  • 1x Optocoupler
  • 1x 12V Buzzer
  • 1x 20x4 LCD + I2C Backpack Addon

Download - AtlaNet_DEMO.ino


Example alert (With audio)

The Dashboard