I've devices configured with IoT gateway application(built with MEAN.JS), these devices send data to IoT gateway where i can access data now i wish to do some analytics on same data how can i send this data to predix cloud so that i can use predix services for analytics
How to stream data that is generated by an IoT gateway application to predix cloud?
200 Views Asked by Srinivas At
2
There are 2 best solutions below
2

First you need to sign up for a free Predix account on predix.io. Subscribe to the (free version) of the UAA service, and Time Series database service. Create a UAA Client with permissions to access your Time Series instance. Then you can use a websocket to securely push data into the cloud. You can learn more by using the Predix Toolkit: https://predix-toolkit.run.aws-usw02-pr.ice.predix.io/ (Source code for the toolkit is here: https://github.com/predixdev/security-starter)
Lots of helpful tutorials are here: https://www.predix.io/resources/tutorials
We can achieve this requirement using predix-uaa-client NPM package all you've to do is-
1.create a predix account, predix-uaa service, predix-time-series service and attach uaa-service & time-series service
2.Make note of Uaa Url, client_id, client_secret and predix time-series ingest zone id
pass Uaa Url, client_id, client_secret and predix time-series ingest zone id to predix-uaa-client package it responses with token.access_token. Use token.access_token as a Bearer token Authroization header in calls to secured services. once it securely calls service create websocket connection and start sending data to predix-time-series service
here sample code to achieve it