# node-red-contrib-wolkconnect

> WolkConnect package for connecting to WolkAbout IoT tool through Node-RED

Latest version **0.1.0** (published 2019-03-21) · UNLICENSED license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install node-red-contrib-wolkconnect
pnpm add node-red-contrib-wolkconnect
yarn add node-red-contrib-wolkconnect
bun add node-red-contrib-wolkconnect
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-03-21 |
| First published | 2019-03-11 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 54.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Milan Jankov |
| Maintainers | varangian41 |

## Links

- npm: https://www.npmjs.com/package/node-red-contrib-wolkconnect
- Repository: https://github.com/Wolkabout/node-red-contrib-wolkconnect
- Homepage: https://github.com/Wolkabout/node-red-contrib-wolkconnect#readme
- Issues: https://github.com/Wolkabout/node-red-contrib-wolkconnect/issues
- npm.io page: https://npm.io/package/node-red-contrib-wolkconnect

## Recent versions

- 0.1.0 (latest) — 2019-03-21
- 0.0.2 — 2019-03-15
- 0.0.1 — 2019-03-11

## README

WolkAbout Node-RED nodes module for connecting devices to [WolkAbout IoT Platform](https://demo.wolkabout.com/).

Supported device communication protocol(s):
* JsonSingleReferenceProtocol

## Prerequisite

* NodeJS ^10.15.13
* npm ^6.4.1
* Node-RED ^0.19.5

## Installation

Navigate to your Node-RED directory: ```~/.node-red```.

Install using:

```sh
npm install node-red-contrib-wolkconnect
```

## Example Usage

### Establishing connection with WolkAbout IoT platform

Create a device on WolkAbout IoT platform by importing ```simple-example-template.json``` located in ```/examples/simple``` .<br>
This template fits ```/examples/simple/wolkExample.js``` and demonstrates the sending of a temperature sensor reading.

Run Node-RED:

```sh
node-red
```

In browser, navigate to ```http://localhost:1880``` .

Import ```simple-example-flow.json``` from ```/examples/simple/``` into Node-RED by copying its contents and using Node-RED's import from clipboard functionality. 

Provide your device key and password to ```MQTT out``` and ```wolkconnect connect``` nodes.<br>
Use your device key for client ID, username.<br>
Use device password for password on ```MQTT out```.<br>
Lastwill messages topic uses the following pattern ```lastwill/{device_key}```.<br>

Deploy the flow.

Connect to the platform by running the inject (timestamp) node connected to ```connect``` node.

### Adding sensor readings

Add sensor reading by using ```addSensorReading``` node and passing it value and reference.<br>
```getRandomNumber``` node can be used to pass random values to ```addSensorReading```. It has to be provided with minimum and maximum reading values.

### Data publish strategy

Stored sensor readings are pushed to WolkAbout IoT platform on demand by using the ```publish``` node.

### Disconnecting from the platform

Use the ```disconnect``` node to stop the device's connection to the platform.

---
_Source: https://npm.io/package/node-red-contrib-wolkconnect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
