Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

hughrawlinson/tracker-machine-battery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reportr used to be a thing. It has ceased to be. Don't use this code. This repo is archived.

Battery Reportr

A module to report your Mac's battery data to your instance of Reportr. It may work with Linux, frankly, I have no idea. It will not work with Windows.

Usage

Assuming you've got a running instance of Reportr,

  1. Clone this repo
  2. mv config.example.json config.json
  3. Fill in config.json, it's pretty self-explanatory. Don't put a trailing / character on the host!
  4. crontab -e
  • I find this doesn't work when your editor is not VIM, emacs, or nano. Not sure why, but it doesn't have anything to do with this project. Edit your crontab however you like, I'm not your boss.
  1. Enter * * * * * node /Path/To/Your/Cloned/Directory/tracker.js

This will report your battery data once every minute, on the minute. You can run the command manually too if you like, but irregular data isn't fun.

Todo

  1. It may be nice to make this a global node executable, but I'm not sure how those work yet. The install script (if there's such a way to hook into that) could put your config file in ~/.config which seems like as good a place as any.
  2. As soon as there's a way to share report configurations for reportr, I will release my report configuration. For now, here's a picture:

Report View

Thanks

  • James Davenport, for this blog post, this script (which I used in this project, although extremely modified, i.e. cut down to two lines of code. Nevertheless, I retain his copyright notice which you will find in the license file), and the concept.
  • Samy Pessé, for Reportr and the Reportr-SDK for NodeJS.

About

A script to post battery data to an instance of Reportr

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published