GithubHelp home page GithubHelp logo

esp32-system-monitoring's Introduction

ESP32-System-Monitoring

Description

This project should achieve the following things:

  • Monitor a Linux client if it is reachable and or didn't freeze.
  • If the client froze it should send an email notification.
  • If the client froze it should cut its power supply shortly to force a reboot.

Things needed

  • ESP32
  • Linux client e.g. Raspberry Pi 5
  • TP-Link Tapo P110 (optional but required for full functionality)
  • Docker installed on the client
  • Working WLAN infrastructure
  • Platformio

Roadmap

  • Make a git repository.

  • Connect to the ESP32 and check if it works.

  • Connect the ESP to the Wi-Fi.

  • IP address is reachable form another device

  • Make a heartbeat from the client to the ESP

    • Mosquitto docker for the client
    • Heartbeat script for the client
      • Filesystem
      • Internet
      • DNS
      • MQTT
      • Dockerize
    • Heartbeat script for the ESP
  • Make the ESP send an email when the client goes down.

    • Make an ISR that checks the time between the heartbeats
    • Make it recognize when the system is down
    • Send email when the system is down/up/initialized
  • Secure the application with a .env file

  • Reverse-engineer the Tapo P110 API that controls the power state

  • When several heartbeats are missed the ESP should switch the power state off and back on again to force a reboot of the client.

  • Make the MQTT connection secure.

  • Make a heartbeat from the ESP to the client

  • Let the client send and email if there is no longer a heartbeat

Client

Installation

Copy the Heartbeat folder to the desired destination on the client. Execute the following command in the folder:

docker compose up -d

This command starts the docker containers that include the MQTT server and the heartbeat script.

Logs

To view logs from the heartbeat script have a look at /Heartbeat/data/log.txt. For logs of the MQTT server look into /Heartbeat/mosquitto/log/mosquitto.log

esp32-system-monitoring's People

Contributors

obernhumermichael 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.