Coder Social home page Coder Social logo

pitelemetry's Introduction

pitelemetry

Collect data from 1-wire sensors connected to a Raspberry Pi and send via mqtt

It takes two (optional) ArgumentParser

  • -c, --configfile the yaml file that contains the configuration. The default configuration file is /etc/pitelemetry.yaml
  • -l --loglevel the logging level (INFO, WARNING, ERROR, DEBUG). The default is INFO

An example configuration is:

broker:
   mqtt_client: mynode
   mqtt_broker: mqtt.foo.bar
   mqtt_port: 1833
   update_interval: 60 # seconds

 discovery_prefix: "home-assistant"

 sensors:
   - sensor:
     name: baz_temp
     type: temperature
     device: 28-0417c15da2ae
     state_topic: tel/foo/baz/temp
   - sensor:
     name: external_temp
     type: temperature
     device: 28-0417c15cf333
     state_topic: tel/foo/ext/temp

RESTRICTIONS

Currently only supports DS18B120 temperature sensors, but is easily extended to support other types.

INSTALLATION

Execute the following from a terminal:

sudo pip3 install pitelemetry
 sudo systemctl enable /etc/systemd/system/pitelemetry
 sudo systemctl start pitelemetry.service

pitelemetry currently supports the following sensors:

  • DS18B120 temperature sensor

ADDING NEW SENSOR TYPES

To add a new sensor type:

  • Clone the PiTemperature class
  • Modify the _read_sensor() function as needed
  • Add the new sensor to the sensorTypes list in bin/pitelemetry

TODO

Add other 1-wire sensors

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.