Search code examples
iotpredix

How to stream data that is generated by an IoT gateway application to predix cloud?


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


Solution

  • 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