GithubHelp home page GithubHelp logo

wheels00 / dog-phone Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 38 KB

A 1-button alarm system for Raspberry Pi and cell phone hat. Dog presses button -> SMSes sent to emergency contacts

License: The Unlicense

Python 61.32% Shell 6.99% HTML 31.70%

dog-phone's Introduction

A 1-button alarm system for Raspberry Pi and cell phone hat. Dog presses button -> SMSes sent to emergency contacts

Purpose

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.

Contribute

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:

  1. Read this README then add suggestions under Issues for how to achieve the aims
  2. Clone this repo, make code contributions, and then send us a pull-request

Hardware

Here's the hardware we already have:

Feature Specification

Minimum Requirements

On button press:

  • 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

Connection monitoring

  • Every 5 minutes:
    • check for cell network connection, and if not connected after 10 minutes:
      • play no_signal.wav on speaker

Config Web App

  • 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

Boot

  • Automatically run all scripts on boot

Installation

  • Install all components and dependencies by running setup.sh

Eventual features

  • 'just a drill' mode
  • speaker phone phone call

Approach thus far

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

Footnotes

  1. Extra Waveshare info

dog-phone's People

Contributors

wheels00 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.