Categorygithub.com/nathan-osman/sensorpi
modulepackage
0.0.0-20240919055052-f3daec472ede
Repository: https://github.com/nathan-osman/sensorpi.git
Documentation: pkg.go.dev

# README

sensorpi logo

GoDoc MIT License

This handy little program is designed to monitor sensors connected to a Raspberry Pi and react to the data based on a configuration file.

Overview

There are several different types of plugins available:

  • trigger plugins wait for something to happen (motion detected, etc.)
  • input plugins read a value at a regular interval (such as temperature, etc.)
  • output plugins do something with a value (write to database, etc.)

In order to do something useful, input and trigger plugins need to be connected to output plugins. For example, you might connect an input plugin for reading temperature values to an output plugin that sends the values to a database.

Plugin List

This is an exhaustive list of plugins available and a brief description of how they can be used.

NameTypeDescription
commandoutputrun a command
consoleoutputoutput to the console
daylightinput, triggersunrise / sunset times
grove-moistureinputread moisture values
influxdboutputwrite to InfluxDB
nutinputread values from NUT server
onewireinputread from 1-Wire sensor
timertriggertrigger at regular intervals

Example

A simple configuration file for reading temperature data from a 1-Wire sensor connected to GPIO 4 and sending the data to InfluxDB every five minutes would look like this:

plugins:
  influxdb:
    url: "http://127.0.0.1:8086"
    username: username
    password: password
    database: example
inputs:
  - plugin: onewire
    parameters:
      device: 28-0516a43c9fff
    outputs:
      - plugin: influxdb
        parameters:
          name: temperature
          tags:
            location: garage
    interval: 5m

# Packages

No description provided by the author
No description provided by the author
No description provided by the author