GithubHelp home page GithubHelp logo

manuelgavidia / iotagent-json Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dojot/iotagent-json

0.0 1.0 0.0 541 KB

IoT Agent for a JSON based protocol (with MQTT transport)

Home Page: http://www.dojot.com.br

License: GNU General Public License v3.0

Python 13.25% Shell 0.82% TypeScript 58.55% JavaScript 27.39%

iotagent-json's Introduction

iotagent-json

License badge Docker badge Travis badge

IoT agents are responsible for receiving messages from physical devices (directly or through a gateway) and sending them commands in order to configure them. This iotagent-json, in particular, receives messages via MQTT with JSON payloads.

How does it work

iotagent-json depends on two things: a Kafka broker, so that it can receive messages informing it about new devices (and, in extension, about their updates and removals), and a MQTT broker, so that it can receive messages from the devices. It waits for messages sent through these two elements: from the device manager with a management operation on a device and from the MQTT broker with a message sent by a device.

How to build

As this is a npm-based project, building it is as simple as

npm install
npm run-script build

If everything runs fine, the generated code should be in ./build folder.

How to run

As simple as:

npm run-script start ./config.json

Remember that you should already have a Kafka node (with a zookeeper instance) and a MQTT broker (such as Eclipse Mosquitto)

How do I know if it is working properly?

Simply put: you won't. In fact you can implement a simple Kafka publisher to emulate the behaviour of a device manager instance and a listener to check what messages it is generating. But it seems easier to get the real components - they are not that hard to start and to use (given that you use dojot's docker-compose). Check also DeviceManager documentation for further information about how to create a new device.

iotagent-json's People

Contributors

dmoranj avatar xavierval avatar giovannicuriel avatar gtorodelvalle avatar rfgtid avatar mmagr avatar anabelengp avatar alvarovega avatar fgalan avatar manuelgavidia avatar alexandre-vasc avatar cesarjorgemartinez avatar drasko avatar jmcanterafonseca avatar pawcik avatar

Watchers

James Cloos 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.