Coming in v2: More sensor data!
##Overview The ecg-iot-simulator replaces the need for a physical sensor when prototyping applications that use heart rate or voltage/temperature data. The application does not replace authentic data, but instead simulates the type of data expected from these sensors.
##Run the app on Bluemix
-
If you do not already have a Bluemix account, sign up here
-
Download and install the Cloud Foundry CLI tool
-
Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/slkaczma/ecg-iot-simulator.git
-
cd
into this newly created directory -
Open the
manifest.yml
file and change thehost
value fromecgsimulator
to something unique.
The host you choose will determinate the subdomain of your application's URL: <host>.mybluemix.net
- Connect to Bluemix in the command line tool and follow the prompts to log in.
$ cf api https://api.ng.bluemix.net
$ cf login
- OPTIONAL: Create the Watson IoT Foundation service in Bluemix. The service does not need to be bound to the application. Otherwise, use any IoT Foundation you already have.
$ cf create-service iotf-service iotf-service-free simulator-iot
- Push the app to Bluemix.
$ cf push
-
Follow the instructions for adding a device to the Watson IoT foundation: https://developer.ibm.com/recipes/tutorials/how-to-register-devices-in-ibm-iot-foundation/
##Run the app locally
-
If you do not already have a Bluemix account, sign up here
-
Download and install the Cloud Foundry CLI tool
-
Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/slkaczma/ecg-iot-simulator.git
-
cd
into this newly created directory -
Log into your Bluemix account and navigate to the Catalog.
-
OPTIONAL: Create the Watson IoT Foundation service in Bluemix. The service does not need to be bound to the application. Otherwise, use any IoT Foundation you already have.
$ cf create-service iotf-service iotf-service-free simulator-iot
- Start your app locally with the following commands
npm install
node app
-
Follow the instructions for adding a device to the Watson IoT foundation: https://developer.ibm.com/recipes/tutorials/how-to-register-devices-in-ibm-iot-foundation/
The primary source of debugging information for your Bluemix app is the logs. To see them, run the following command using the Cloud Foundry CLI:
$ cf logs ecgsimulator --recent
For more detailed information on troubleshooting your application, see the Troubleshooting section in the Bluemix documentation.
We are more than happy to accept external contributions to this project, be it in the form of issues and pull requests. If you find a bug, please report it via the Issues section.
Version 2 of this code is a collaboration between David Carew, Stefania Kaczmarczyk.
##Privacy Notice The watsonmoodring sample web application includes code to track deployments to Bluemix and other Cloud Foundry platforms.
The following information is sent to a Deployment Tracker service on each deployment: * Application Name (application_name) * Space ID (space_id) * Application Version (application_version) * Application URIs (application_uris)
This data is collected from the VCAP_APPLICATION environment variable in IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Bluemix. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.
Deployment tracking can be disabled by removing require("cf-deployment-tracker-client").track();
from the beginning of the app.js
file.