Coder Social home page Coder Social logo

bbq_sensor's Introduction

Clever BBQ

Arduino and AWS integration to monitor temperature in a barbeque.

High Level Diagram

High Level Diagram

S3 structure:

  • cleverbbq
    • static-website
    • temperature_data
      • 20180409
        • log_[TIMESTAMP].json

JSON config

The S3 bucket stores a json file that contains the configuration needed to log and alert.

{
  "lower-threshold": 40,
  "upper-threshold": 45,
  "records-to-consider": 5,
  "alert-interval": 1000,
  "slope-coeff": -0.3,
  "sns-topic": "",
  "alert-table": "alert_history",
  "temperature-data": "temperature_data"
}

The first 5 entries are used to establish when to send an alert:

- lower-threshold and upper-threshold: range of Celsius degrees that should trigger an alert
- records-to-consider: how many event the script considers to calculate the slope coefficient of the temperature trend
- alert-interval: represents the minimum time interval between 2 alerts (we don't want to send an alert if one has just been sent)
- slope-coeff: if the temperature trend coeff is smaller than this value we want to trigger an alert

The last 3 entries are application specific configurations.

Alerting logic

The below is the pseudo code that controls the logic of the alerts

if temperature between lower-threshold and upper-threshold:
    if enough time from last alert:
        is slope < slope-coeff:
            send_alert

Logic explained:

1. The first if statement checks if the temperature is in the range of what we define as low temperature through the configuration parameters lower-threshold, upper-threshold
2. The second if checks that enough time has elapsed from the last alert
3. The last if statement instead checks the temperature trend: a negative slope means that the temperature is decreasing. 

bbq_sensor's People

Contributors

darthale avatar

Stargazers

Eric Nichols 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.