Code Monkey home page Code Monkey logo

check-dht's Introduction

check-dht

PyPI PyPI - Downloads PyPI - Python Version

Nagios plugin to monitor humidity and temperature data from a Raspberry Pi Pico

$ check_dht
DHT OK - temperature is 23°C | humidity=48%;60;65;0;100 onboard=23°C;30;40 temperature=23°C;30;40

Format

Notice: This plugin works in conjuction with the pico-dht project! It expects a device to be available which periodically prints JSON data to a serial port:

{
   "humidity":48,
   "temperature":23,
   "onboard":23,
   "error":0
}
  • humidity and temperature are measurements taken directly from a DHT22/DHT11 sensor
  • The RP2040s built-in temperature sensor is reported in the onboard field.
  • In case of an Issue (e.g. I/O), a POSIX errno is set in the error field.

Install

The recommended installation is via pip install check-dht.

Manually

Alternatively, the source module can be executed after installing needed dependencies:

  1. pySerial
  2. nagiosplugin

Usage

$ poetry run check_dht --help
usage: check_dht [-h] [-p PORT] [-b BAUD] [-w TEMP] [-c TEMP]
                 [--humidity-warning PERCENT] [--humidity-critical PERCENT]

Nagios plugin to monitor humidity and temperature data

options:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  the serial file to read from
  -b BAUD, --baud BAUD  baudrate of the serial port
  -w TEMP, --warning TEMP
                        return warning if air temperature is beyond TEMP
  -c TEMP, --critical TEMP
                        return critical if air temperature is beyond TEMP
  --humidity-warning PERCENT
                        return warning if humidity is beyond PERCENT
  --humidity-critical PERCENT
                        return critical if humidity is beyond PERCENT

(c) Johannes Arnold 2023. This software is published under the terms of the
GNU GPLv3. For the companion project to this plugin, see
https://github.com/j0hax/pico-dht

check-dht's People

Contributors

dependabot[bot] avatar j0hax avatar

Watchers

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