Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pwntus/mic-demo
https://github.com/pwntus/mic-demo
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pwntus/mic-demo
- Owner: Pwntus
- Created: 2017-11-20T16:20:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T12:05:32.000Z (almost 7 years ago)
- Last Synced: 2024-12-15T19:05:37.066Z (7 days ago)
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MIC Example Code in Node.js
This repository contains some examples written in Node.js. An external [mic-sdk-js](https://www.npmjs.com/package/mic-sdk-js) module is used to simplify the invocation of API functions.You can find the MIC Cloud API documentation here:
**How to run (requires Node.js and NPM installed)**
```
$ npm install
$ node examples/elasticsearch.js
```## Example: Elasticsearch
**File:** [examples/elasticsearch.js](examples/elasticsearch.js)Authenticates with Cognito and invokes the [Observation API FIND](https://docs.telenorconnexion.com/mic/cloud-api/observation/#find) action with an Elasticsearch query to extract historical data of resources.
## Example: MQTT Client using Certificate Files
**File:** [examples/mqtt_certificates.js](examples/mqtt_certificates.js)Creates a MQTT client that is authenticated using certificate files. May only be used for listening to the Thing owning the certificates.
## Example: MQTT Client using Cognito tokens
**File:** [examples/mqtt_cognito.js](examples/mqtt_cognito.js)Creates a MQTT client that is authenticated with Cognito. May listen for all Things that the authenticated Cognito user has access to.