Skip to content

Elixir backend to monitor temperature readings of my basement chest freezer

Notifications You must be signed in to change notification settings

davidcroda/temp_monitor

Repository files navigation

TempMonitor

Screenshot 2023-03-02 at 2 35 51 PM

Simple phoenix backend to accept incoming temperature readings from an ESP8266 with a DHT22 temperature sensor in my basement chest freezer. Sends SMS notifications if no readings within a 5 minute span or if the average temperature over 10 minutes rises above 10 degrees fahrenheit.

Uses Context Charts to generate graphs server side and displays in a Phoenix LiveView.

Setup

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Docker

  • mix docker.build
  • mix docker.push

K8S

  • Kubernetes deployment available in priv/k8s/service.yaml
  • kubectl create secret generic temp-monitor-secrets --from-literal="secret-key-base=SECRET_KEY_BASE"
  • kubectl create secret generic twilio --from-literal="account-sid=YOUR_ACCOUNT_SID" --from-literal="auth-token=YOUR_ACCOUNT_TOKEN"

Now you can visit localhost:4000 from your browser.

About

Elixir backend to monitor temperature readings of my basement chest freezer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published