Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

[Code] Simulate Sensor data flow into application #9

Closed
LinJu opened this issue Jan 27, 2019 · 2 comments
Closed

[Code] Simulate Sensor data flow into application #9

LinJu opened this issue Jan 27, 2019 · 2 comments
Assignees
Milestone

Comments

@LinJu
Copy link
Collaborator

LinJu commented Jan 27, 2019

Requirement:
In order to simulate sensor data streaming into Frida Application, we can develop Node.RED application to Watson IoT platform to show the workflow.
Implementation:
We are using Node.RED in IBM Cloud.

  1. Log in or sign-up for an account at bluemix.net

  2. Navigate to the catalog and search for ‘Node-RED’

  3. This will present you with two options:

  4. Node-RED Starter - a vanilla Node-RED instance

  5. Internet of Things Platform Starter - this gives you everything you need to start quickly using Node-RED with the Watson IoT Platform, including some default flows to show how things work

  6. a Cloudant database instance to store your flow configuration
    a collection of nodes that make it easy to access various Bluemix services, including both the Watson IoT platform and the Watson Cognitive services

  7. Click the starter application you want to use, give it a name and click create.

  8. A couple of minutes later, you’ll be able to access your instance of Node-RED at https://.mybluemix.net

@LinJu
Copy link
Collaborator Author

LinJu commented Feb 6, 2019

Detail implementation:

Purpose

Simulate Frida IOT server to serve the escape routes on a map functionality in Frida-app (#5)

Description (Use Case)

We are trying to serve the same use case mentioned in (#5 and Call-for-Code/Frida-app#1) where there are 4 rooms in a school connected to the Frida IOT simulator. The Simulator has been built using IBM Node-RED. Components of Node-RED flow includes a web socket server, Watson Assistant Service, Watson Studio & user defined functions which tie them together to enable exchange of information.

To simulate the feeds from the rooms we have used the node to inject the file locally in Node-RED as well from your Webcam. The images captured from these nodes are sent to the trained VR model (using Watson Studio) along with the device info. VR model helps us to identify the damaged rooms in the school. The alerts are generated based on the VR model result and sent to Frida app using sockets.

Steps to runs the simulator

  1. Follow the implementation steps mentioned in [Code] Simulate Sensor data flow into application #9
  2. Open the Node-RED instance on the browser
  3. Click the hamburger icon on the home page and select Clipboard option under Import
  4. Insert the contents of the Frida-IOT-simulator.json file from this repo and select the Import to option as new flow
  5. Add the API Key from your watson-vision-combined service provisioned under you IBM Cloud account to the VR model node in Node-RED.
  6. Update the hostname of your socket client in Frida-app (in school.js) with the hostname of your Node-RED instance to receive socket events.

Screenshot

screen shot 2019-02-05 at 12 48 50 pm

@LinJu
Copy link
Collaborator Author

LinJu commented Feb 7, 2019

Done by @yasinghcse! Thank you!

@LinJu LinJu closed this as completed Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants