A 1-button alarm system for Raspberry Pi and cell phone hat. Dog presses button -> SMSes sent to emergency contacts
A service dog can be trained to press a button to call for help when a person with a disability needs help but can’t get to the phone. If you know your service dog can call for help, you feel more confident and secure, especially if you can customise who gets contacted, when, in what order, and what information they receive.
The purpose of this software is to reliably, transparently and configurably do this.
The idea for this project came from Claire S and her service dog, Ned.
I Wheels00 am making only very slow progress due to lack of knowledge of Linux, Python, and Flask. Assistance needed!
Two ways you can help:
- Read this README then add suggestions under Issues for how to achieve the aims
- Clone this repo, make code contributions, and then send us a pull-request
Here's the hardware we already have:
- Raspberry Pi 4 Model B 4GB
- Waveshare 4G HAT for Raspberry Pi (LTE Cat-4/4G/3G/2G/GNSS)1 with Aldi Mobile Sim
- Big normally-open momentary switch that can be wired to a GPIO pin of the RPi
- Speaker with line in
- play countdown.wav on speaker (opportunity for user to cancel)
- Check for cell network connection
- send alert_message by SMSes to contact_list in specified order after specified delays (announce each action on speaker); and
- loop waiting.wav on speaker; while
- listen for reply SMS from contacts, and on receiving message containing acknowledge_keyword:
- announce receipt of acknowledge_keyword
- loop help_on_way.wav on speaker
- listen for SMS from user, and on receiving cancel_keyword:
- reset
- Every 5 minutes:
- check for cell network connection, and if not connected after 10 minutes:
- play no_signal.wav on speaker
- check for cell network connection, and if not connected after 10 minutes:
- Connect to LAN via WiFi
- Serve web app on port 80
- Allow user to set:
- alert_message
- contact_list:
- name
- phone_number
- delay
- acknowledge_keyword
- cancel_keyword
- Wifi SSID
- Wifi password
- Automatically run all scripts on boot
- Install all components and dependencies by running setup.sh
- 'just a drill' mode
- speaker phone phone call
This may not be the best approach, but it's what I have thus far.
- Web app via Flask and Flask-WTF
- Web app saves user config to json files in the storage folder
- 'main' program
- reads user preferences from json files in the storage folder
- Monitors GPIO pin for button press
- Interacts with Waveshare Phone HAT by AT commands, with helper functions defined in phonelib.py (based on the Waveshare demo code)
- plays audio on speaker