Skip to content

lekv/digitemp-metricfire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Python DigiTemp Metricfire connector

This program queries temperature sensors and upload the data to metricfire via its python API. It will run until terminated by ctrl-c. Alternatively have a look at the --once and --quiet command line switches to run under cron.

Requirements

  • You need to have [Digitemp] installed and working.
  • To run the included unit tests, you need [Fabric] installed.

Building the sensors

I've written a blog post tutorial on how to solder suitable DS18S20 sensors to the serial port of a computer. Also there is this tutorial which I found most useful.

Configuration

The various runtime parameters are set in config.py. The api-key can also be specified in an own file. The various configuration parameters are documented in config.py itself.

Supported command line switches:

  • --once : Run only once and exit after uploading the data.
  • --quiet : Don't output anything below ERROR level.

Running with cron

The following line can be entered into your crontab (hint: run crontab -e) and will have cron call the script once per minute. Errors during execution will show up in your syslog and will usually be sent to you via email.

* * * * * cd PATH_WHERE_YOU_CHECKED_OUT; ./main.py --quiet --once;

Unittests

You can run the included unit tests, by calling fab test in the top level directory. However you need mock version >= 0.8 for the tests to run.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages