Name: streamsx.iot.starterkit
Owner: IBM Streams
Description: Starter kit to help connect Apache Edgent devices with IBM Streams
Created: 2017-10-20 13:29:05.0
Updated: 2017-10-30 16:03:34.0
Pushed: 2018-01-09 21:34:17.0
Homepage: null
Size: 7218
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This starter kit simplifies the setup for using the streamsx.iot toolkit to connect Apache Edgent applications with Streams applications.
The recommended way to analyze data from IoT devices running Apache Edgent is to send the data to the Watson IoT Platform. Then, you can retrieve that data from a Streams application running locally or in the Streaming Analytics service in the IBM Cloud, as illustrated below.
Deploying this starter kit to the IBM Cloud will set up the Watson IoT Platform and Streaming Analytics services for you. It will also create the credentials you need to connect your Streams and Edgent applications.
If you choose not to deploy the services automatically, or if you are using an on-prem Streams installation, you can follow these instructions to setup Streams and the Watson IoT Platform manually.
Click the the Deploy to IBM Cloud button below to start deployment. This will take about 10-15 minutes.
Note: If you have both services created and would like to use automatic configuration, you need to rename the services to match the names expected by the configuration script before starting the process:
Streaming-Analytics
Internet-of-Things-Platform
. These names must match exactly as indicated here.
Then click the Deploy to IBM Cloud button above.After deployment is complete, the best place to get started is the starter kit home page.
To access the home page, you must first create a username and password.
KIT_OWNER
(username) and KIT_PASSWORD
(password). Names must be exactly as shown here. Click Save.These steps are illustrated below.
Clicking Visit App URL will take you to the home page of your starter kit where you can log in using the KIT_OWNER
and KIT_PASSWORD
as username and password. After a successful log in, the page appears as follows:
From the starter kit home page, you can try out the sample application and get your credentials.
Run the IoT sensors sample from Edgent:
Download your device.cfg
file from the “View all Credentials” page of the starter kit.
Download and unpack Edgent, choose a binary release
Edgent 1.1.0+: Edit runiotpsensors.sh
to uncomment out the line starting with USE_OLD_EVENT_FORMAT
,
Run the IoT sensors application:
edgent>/java8/scripts/connectors/iotp
uniotpsensors.sh device.cfg
Submit the IotPlatform
application to your Streams instance. Click “Tools” on the starter kit home page and click Submit IoTPlatform Job if it is not running.
For Python and Java, download credentials for your Streaming analtyics service by clicking “Streams Credentials” > “Download credentials as JSON”.
You need the following requirements to create your own application:
Topology
. Download the device credentials from the starter kit home page:IoTPlatform
application running in your Streams instance.This application connects to the Watson IoT Platform to retrieve events from your Edgent application. Then, it publishes the device events as Streams tuples for consumption by other Streams applications. The following diagram illustrates:
If your Streams application wishes to send a command to the Edgent application, the commands are also sent through the IoTPlatform
application. Thus, this application must be running on your instance alongside your Streams application(s).
Click Tools on the starter kit home page and if the application is not running, click Submit IoTPlatform Job.
Note: When submitted from the starter kit home page, the application only runs for 1 hour in order not to incur charges on your IBM Cloud account. To run it indefinitely you must submit it directly to the Streaming analytics service. You will need API keys for the Watson IoT Platform. Download the API keys from the starter kit home page: View All Credentials > Streams Credentials > Download API keys as properties file. This page has manual submission instructions.
Create an Edgent application. Follow this recipe to create an Edgent application that sends data to the Watson IoT platform.
Create a Streams application. Complete the follow up to the Edgent recipe to create a Streams application that processes the data from Edgent.
If you would like to modify the node js app locally, you need to have the services created on the IBM Cloud. Then, after cloning the repository: