Git Product home page Git Product logo

pachube's Introduction

RaumZeitLabor Pachube Update Scripts

These scripts used to collect data from sensors all over german Hackerspace RaumZeitLabor and send it to the online service Pachube.

The git repository consists of two files:

script/electricity-pachube
A simple script to run the electricity data pusher, providing --version.
lib/RaumZeitLabor/ElectricityPachube.pm
The electricity data pusher source code.

Development

To run the bot on your local machine, use ./script/electricity-pachube.

Building a Debian package

The preferred way to deploy code on the Blackbox (where this bot traditionally runs on) is by installing a Debian package. This has many advantages:

  1. When we need to re-install for some reason, the package has the correct dependencies, so installation is easy.

  2. If Debian ships a new version of perl, the script will survive that easily.

  3. A simple dpkg -l | grep -i raumzeit is enough to find all RaumZeitLabor-related packages and their version. The precise location of initscripts, configuration and source code can be displayed by dpkg -L electricity-pachube.

To create a Debian package, ensure you have dpkg-dev installed, then run:

dpkg-buildpackage

Now you have a package called electricity-pachube_1.0-1_all.deb which you can deploy on the Blackbox.

Updating the Debian packaging

If you introduce new dependencies, bump the version or change the description, you have to update the Debian packaging. First, install the packaging tools we are going to use:

apt-get install dh-make-perl

Then, run the following commands:

perl Makefile.PL
mv debian/electricity-pachube.{init,postinst} .
rm -rf debian
dh-make-perl -p electricity-pachube --source-format 1
mv electricity-pachube.{init,postinst} debian/

By the way, the originals for electricity-pachube.{init,postinst} are /usr/share/debhelper/dh_make/debian/init.d.ex and /usr/share/debhelper/dh_make/debian/postinst.ex.

See also

For more information about Debian packaging, see:

pachube's People

Contributors

tiefpunkt avatar stapelberg avatar

Watchers

 avatar silsha fux avatar Simon Elsbrock avatar Simon avatar Lukas Martini avatar Ranlvor avatar  avatar Jan Georgens avatar  avatar [obsolete] avatar Akisa avatar Bfritz0815 avatar Danny Edel avatar James Cloos avatar  avatar Leah Oswald avatar  avatar René van der Winkel avatar uwap avatar Christian Weilbach avatar  avatar Markus Bockhacker avatar M@rl!n avatar sʟowᴘoĸe 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.