Git Product home page Git Product logo

agile-watson's Introduction

Agile to Watson interworking

Requirements

  • To run Agile IoT Platform you need
    • docker version 1.10.0 at least
    • docker-compose version 1.10.0 at least
  • To run Watson interworking you need
    • Node.JS 6.4.1 at least
  • To run Watson Analytics you need
    • JAVA 1.7 at least
    • Apache Maven 3 at least

Project structure

Clone the project from Github.

  • The project is tructured as follow:
    • Agile: updated version of Agile IoT platform including a dummy device measuing pollution and temperature.
    • Watson-interworking: interworking proxy component that discover devices from Agile platform and pushing data to Watson IoT Platform
    • Watson-analytics: analytics module subscribing to data from Watson IoT platform and puishing it to Watson Machine Learning service to measure trends and calculate deviation. Deviation are stored back into Watson IoT Platform for triggering alerts when needed.

Run Agile IoT platform

  1. Open the Agile platform project available on folder watson-interworking
  2. Move to folder agile-cli
  3. Run the agile platform
./agile start
  1. Check Agile web interface: http://127.0.0.1:3000/login

Run Watson interworking

  1. Open the Watson interworking project available on folder watson-interworking
  2. Move to folder src
  3. Install the Node required libraries
npm install request
npm install ws
npm install ibmiotf

4 Configure the interworking using the file config.js

const config = {
    agile: {
        host: '127.0.0.1',
        port: 8080,
        pollingPeriod: 15000,
        log: "[AGILE]:"
    },
    watson: {
        orga: 'XXXXXXXXX',
        domain : 'internetofthings.ibmcloud.com',
        application: {
            key: 'XXXXXXXXX',
            token: 'XXXXXXXXXX',
            id: 'agile-watson-ipe'
        },
        log: "[WATSON]:"
    }
};

5 Run the project

node app.js

Run Watson Analytics

  1. Open the Watson interworking project available on folder watson-interworking
  2. Go to folder src
  3. Install the Node required libraries
npm install request
npm install ws
npm install ibmiotf

4 Run the project

node app.js

Run Watson Analytics

  1. Open the Watson Analytics project available on folder watson-analytics
  2. Build the project using the following command. The binary and config files are generated under the folder "target"
$ mvn clean install
  1. Configure the project using the file config.ini
# MQTT parameters
MQTT_TOPICS = iot-2/type/+/id/+/evt/event/fmt/+
MQTT_SERVER_URI = ssl://XXXXXXXX.messaging.internetofthings.ibmcloud.com:8883

#Watson IoT Platform parameters
APP_ID = XXXXXXXXXXXXXX
API_KEY = XXXXXXXXXXXXXX
AUTH_TOKEN =  XXXXXXXXXXXXXX

#Prediction parameters
PREDICTION_CYCLE = 10
ZSCORE_WINDOW = 10
PREDICTIVE_SERVICE_URL = https://ibm-watson-ml.eu-gb.bluemix.net/pm/v1/score/nocycle20rebuid50?accesskey=XXXXXXXXXXXXXX
  1. Run the project using the following command
$ mvn exec:java 

Third party libraries used

This project uses open source components. You can find the source code of their open source projects below. We acknowledge and we are grateful to these developers for their contributions to open source.

  • org.apache.spark
  • com.google.guava
  • Github ibm-watson-iot/predictive-analytics-samples
  • org.eclipse.paho
  • org.apache.commons
  • log4j
  • org.apache.httpcomponents
  • args4j
  • org.apache.wink
  • org.scala-lang

agile-watson's People

Contributors

mbenalaya avatar

Watchers

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