Code Monkey home page Code Monkey logo

mqtt-sender's Introduction

mqtt-sender

small lua daemon that can send system statistics

Uses the lua mqtt library from: http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.lua.git

I added the ability to publish retained topics, the changes are in the file "retained_topic.patch".

It only needs lua-5.1, lua-socket and lua-posix.

Usage

Type make after checkout and it will produce a debian and openwrt package. The daemon is installed in /usr/sbin and configuration is done in /etc/mqtt-sender/config.lua.

An init-script is also provided. The daemon publishes a retained topic of client/ which is removed when the connection to the mqtt-server is lost.

In addition it publishes the configured topics in intervals under system//module as json strings.

Extending

To add new information, just create a new module which gathers the wanted information, add it to the Makefile and create a new package.

To ease development, use the small test.lua which read the config file test-config.lua and calls the configured modules every second. If the configured interval is expired, it prints the modulename and the output of the module or else ist prints "modulename nil" every second for every tested module.

mqtt-sender's People

Contributors

c-mm avatar

Stargazers

AperGra avatar Jayden Kim avatar  avatar Camilo Rodegheri avatar David.Gao avatar  avatar Alexey Tsverov avatar

Watchers

Garret Alfert avatar Sven G. Brönstrup avatar Gerrit Riessen avatar Martin Holzhauer avatar Yan Minagawa avatar ligi avatar Jens Rapp avatar jaseg avatar Mister Scthief avatar Brian Wiborg avatar cketti avatar Matthias avatar Dirk Jäckel avatar Alexander Couzens avatar MetaVoluti0N avatar cmile avatar Willi Döring avatar Uwe Kamper avatar James Cloos avatar Ricardo Band avatar Lukas Kohler avatar Sven Michael Klose avatar Joe Landers avatar Ansgar Schmidt avatar riot avatar  avatar Patrick C. F. Ernzer avatar RubbelDeCatc avatar masahiro kahata avatar  avatar Katharina Fey avatar  avatar  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.