Choose Catalog and search for Node-RED.
To see your API keys, log in /and select Apps from the left menu.
You must belogged into post a comment.
Make a note of these IDs and token as you will need them to access your device and will not be shown the token again. (For example, the .js program which grabs data from the VT Logger and sends it to the cloud uses this Authentication Token.)
Click Next you can ignore the optional Metadata in JSON format. Click Create.
Enter a Device ID This is the only information that is required. Make a note of the Device ID. (The Device ID is used in the .js program sending data from the VT Loggers to the cloud.)
Click Go to your Node-RED flow editor. Youll be asked for your username and password. Make a note of the URL so you can quickly return to the flow editor in future.
An organisation account with IBM Watson on Bluemix
Video Turnstile counts pedestrians, passengers, bicycles and vehicles logging the time, GPS location, direction and counts. This recipe explains how to collect data from the VT via the IBM cloud using IBM Watson and NodeRED.
Tagsbig data analytics,bluemix,data acquisition,ibm watson iot platform,IoT,MQTT,passenger counting
The msg.payload property contains the body of the message from the VT logger. 2756 is the VTs Device ID.
To show your counts on your user interface, go to the dashboard section of the filter nodes in the left sidebar. Choose a display type (weve used gauge in our example) and connect it to the output of your function. Edit the settings then in the Dashboard tab click
Here is an example of a simple Node Red Flow which extracts counts from the VT unit.
Connect Video Turnstile People, Vehicle and Passenger Counters to IBM Watson IoT Platform
Click Next and fill in the details.
More information about Node Red is /.
Click Next and you are taken to the Add Device page. This gives a summary of the information you have added. If you are happy with it click Add. This registers your device to the organization.
Drag the function node to the workspace and connect it to the output of the ibmiot (drag the mouse between the two to connect). Use this to write the code to extract counts and other data from the VT, as shown below. Double-click the node to bring up the Edit function node box.
The Device id is that that you entered when creating a device in IBM Watson shown in the Devices screen above.
In future,to connect another VT unit
Drag ibmiot input to the Flow area. This node is used with IBM Watson to receive data from the VT units. Double-click to edit its settings to connect with the data.
Click Visit App URL which is next to the Routes button. (If you get a Not Found error, wait a little longer and then try again.)
To connect a Video Turnstile counter to the IBM Watson platform, you need to associate it with a device type. (A device type is a group of devices sharing common characteristics.)
This function returns the up counts (people getting on the bus) from a VT Passenger Counter
Provide your own authentication token for this device. The token must be between 8 and 36 characters long, and should contain a mix of lower and upper case letters, numbers, and symbols (hyphen, underscore, exclamation-point, ampersand, @ sign, question mark, period, right and left parentheses are permitted). The token should be free of repetition, dictionary words, user names, and other predefined sequences. Make a note of the token.
IBM Watson runs on the Bluemix cloud platform and lets you communicate with connected devices on the Internet-of-Things, including our Video Turnstile counters.
Before you can begin receiving data from the VT counters, you need to create an account with IBM Watson.
Log in at the Bluemix platform at /
How to collect live count data over the IBM Watson internet of things
Here the time, counts of passengers getting onto and off a bus and gps location are shown.
Allow the service to generate an authentication token for you. The token will be 18 characters long and will contain a mix of alphanumeric characters and symbols. The token will be shown to you at the end of the registration process make a note of it.
You can generate a new API key and token from here to use if you wish. Make a note of them, especially the token as this will not be shown again.
To check your function is working properly, connect its output to a debug node. Drag debug from output nodes in the left sidebar. It defaults to msg.payload which is what we want. The debug information will be shown in the tab to the right of the screen.
A Video Turnstile (VT) unit counting people, bicycles or vehicles (contactUrban Sensingfor more details)
A Node-Red flow to collect the VT data from IBM Watson
Click close to go back to the main dashboard.
Click Create. Youre taken to a Cloud Foundry Apps page.
Choose the Device type which you previously created and click Next.
Choose your newly made Device and click Next.
Create a NodeRED flow to collect data from the VT Counting Units
Node-RED is a programming tool which, amongst other things, lets you create applications to acquire data from hardware devices over the Internet-of-Things. You can run it as an IBM Bluemix application to collect VT count data from the IBM cloud.