open-index/open-npm huggingface dataset:
npm package: @rakuten-rex/create-component
Description: CLI tool to create a ReX UI Component by using react-component-starter-kit
Author: ReX React UI Components Library Authors
Latest version: 0.1.3

# ReX React UI Component: create-component

This project is part of ReX Design System and it can be used to create a UI Component project from scratch based on https://github.com/rakuten-rex/react-component-starter-kit

The CLI tool will clone `react-component-starter-kit` project and execute the binary file (`cli.js`) to clean the git history, get a clean copy of the source code and then run `npm run setup` command automatically by using `npx`.

# How to run initialize a new repository

Run this command on a brand new git repository.   

```
npx @rakuten-rex/create-component
```
npm package: @rakuten-rex/eslint-config-rex-react-component
Description: Common eslint config for ReX React Component
Author: ReX React UI Components Library Authors
Latest version: 1.5.1

# @rakuten-rex/eslint-config-rex-react-component
Common eslint settings for ReX React Component

## How to use
### Install
`npm i @rakuten-rex/eslint-config-rex-react-component --save-dev`

### Update eslint configuration
`.eslintrc.js`
```
{
  "extends": "rex-react-component"
}
```
npm package: @rakuten-rex/storybook-inspecthtml
Description: Inspect a React component HTML output
Author: ReX React UI Components Library Authors
Latest version: 1.1.1

# ReX React UI Components Library
## Storybook Addon InspectHTML: storybook-inspecthtml

The addon use the original story to get the HTML output from the React component by using ReactDOM server and show it into the panels tab, after that it returns the original story without any changes.

For more information visit:   

Github  
https://github.com/rakuten-rex

NPM  
https://www.npmjs.com/org/rakuten-rex

## How it was built 

1. webpack 4 (static module bundler)
1. HTML5
1. CSS3 & Sass (Normalize.css + Fork of Bootstrap project + ReX custom styles)
1. JavaScript ES6 Modules & Components based on React

# How to install

```
npm install @rakuten-rex/storybook-inspecthtml@1.1.1 --save-dev
```

### Live examples

For a complete guide of properties for React and HTML classes please visit the Storybook site:  

https://rakuten-rex.github.io/storybook-inspecthtml/

### Storybook integration

#### Register

Add this line at the end of the content of `.storybook/addons.js`.   

```js
import '@rakuten-rex/storybook-inspecthtml/register';
```

#### Story

Import the addon in the story file you want to use.   
Add it as the first decorator due to the addon requires a clean input to render the HTML, the output is clean as well.

Example: 

Using `stories/index.jsx`:

```js
import { withInspectHtml } from '@rakuten-rex/storybook-inspecthtml';

const stories = storiesOf('MyComponent', module);
stories.addDecorator(withInspectHtml); // <-- First decorator
stories.addDecorator(withKnobs);
stories.addDecorator(withA11y);
...
```
npm package: @rakuten-rex/storybook-inspectjsx
Description: Inspect a React component JSX output
Author: ReX React UI Components Library Authors
Latest version: 1.2.1

# ReX React UI Components Library
## Storybook Addon InspectJSX: storybook-inspectjsx

The addon use the original story to get the original JSX of a React component by using `jsx-to-string` and show it into the panels tab, after that it returns the original story without any changes.

For more information visit:   

Github  
https://github.com/rakuten-rex

NPM  
https://www.npmjs.com/org/rakuten-rex

## How it was built 

1. webpack 4 (static module bundler)
1. HTML5
1. CSS3
1. JavaScript ES6 Modules & Components based on React

# How to install

```
npm install @rakuten-rex/storybook-inspectjsx@1.2.1 --save-dev
```

### Live examples

For a complete guide of properties for React and HTML classes please visit the Storybook site:  

https://rakuten-rex.github.io/storybook-inspectjsx/

### Storybook integration

#### Register

Add this line at the end of the content of `.storybook/addons.js`.   

```js
import '@rakuten-rex/storybook-inspectjsx/register';
```

#### Story

Import the addon in the story file you want to use.   
Add it before other decorators, due to the addon requires a clean input to render the JSX component, the output is clean as well.

Example: 

Using `stories/index.jsx`:

```js
import { withInspectJsx } from '@rakuten-rex/storybook-inspectjsx';

const stories = storiesOf('MyComponent', module);
stories.addDecorator(withInspectJsx);
stories.addDecorator(withKnobs);
stories.addDecorator(withA11y);
...
```
npm package: @rakutentech/plantuml-worker
Description: Quickly generate diagrams with shared PlantUML instances
Author: Julien Cayzac
Latest version: 1.1.3

[npm]: https://img.shields.io/npm/v/@rakutentech/plantuml-worker
[npm-url]: https://www.npmjs.com/package/@rakutentech/plantuml-worker
[size]: https://packagephobia.now.sh/badge?p=@rakutentech/plantuml-worker
[size-url]: https://packagephobia.now.sh/result?p=@rakutentech/plantuml-worker

[![npm][npm]][npm-url]
[![size][size]][size-url]

# @rakutentech/plantuml-worker

A Node library managing PlantUML instances to quickly generate diagrams.

## Install

Using npm:

```console
npm install @rakutentech/plantuml-worker --save-dev
```

## License

[MIT](LICENSE)
npm package: @rakwireless/adc121c021
Description: A Node-RED node providing access to the ADC121C021 I2C analog to digital converter
Author: rakwireless.com
Latest version: 1.0.0

# @rakwireless/adc121c021

The node-red-contrib-adc121c021 node allows users to read analog inputs from adc121c021 and then convert them to digital readings. 

[![version](https://img.shields.io/npm/v/@rakwireless/adc121c021.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/adc121c021)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/adc121c021.svg)](https://www.npmjs.com/package/@rakwireless/adc121c021)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/adc121c021` and install it.


## Manual installation (development)

Please install `@rakwireless/adc121c021` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`,

```
git clone https://git.rak-internal.net/product-rd/gateway/wis-developer/rak7391/node-red-nodes.git
```

then copy `node-red-contrib-adc121c021` directory  to  the `node_modules` directory,

```
cp -rf node-red-nodes/node-red-contrib-adc121c021 ~/.node-red/node_modules
```

lastly, change to the `node-red-contrib-adc121c021` directory and install the node, 

```
cd ~/.node-red/node_modules/node-red-contrib-adc121c021 && npm install
```

**Tips:**  After the installation of `@rakwireless/adc121c021` is finished, please restart your node-red service.  Otherwise, the node cannot be found/added to the new flow.

## Usage

**Tips**: Please make sure that user has the permissions to access GPIO and i2c devices. 

- adc121c021_i2c

​		To get the voltage reading from the adc121c021, user only need to define the i2c bus of the chip. 

<img src="assets/adc121c021_i2c node.png" alt="adc121c021_i2c node configuration"/>

​		**Name**		

​			Define the message name if you wish to change the name displayed on the node.

​		**/dev/i2c-?**

​			Default I2C Bus is `1`.  `1` is for `'/dev/i2c-1'`.

​		**i2c_Address**

​			The Address by default is set to `0x51`, this is the I2C address of RAK12004. Please check [adc121c021's datasheet](https://www.ti.com/lit/ds/symlink/adc121c021.pdf?ts=1649592829477&ref_url=https%253A%252F%252Fwww.google.com%252F) for more 		information. 

​		The output of the node is showed as follows.

```
{
	i2c_address: 81

	i2c_device_number: 1

	Raw_value: 2350

	Volts:  "2.869"
}
```



## Example

- [rak12004-reading](./node-red-contrib-adc121c021/examples/rak12004-reading) - Read smoke PPM using WisBlock sensor [RAK12004](https://store.rakwireless.com/products/mq2-gas-sensor-module-rak12004).
- [rak12009-reading](./node-red-contrib-adc121c021/examples/rak12009-reading) - Read Alcohol Gas  PPM Using WisBlock Sensor [RAK12009](https://store.rakwireless.com/products/wisblock-mq3-gas-sensor-rak12009).



## License

This project is licensed under MIT license.
npm package: @rakwireless/ads7830
Description: A Node-RED node providing access to an ADS7830 I2C analog to digital converter
Author: rakwireless.com
Latest version: 1.0.0

# @rakwireless/ads7830

A Node-RED node providing access to a ADS7830 I2C analog to digital converter.

[![version](https://img.shields.io/npm/v/@rakwireless/ads7830.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/ads7830)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/ads7830.svg)](https://www.npmjs.com/package/@rakwireless/ads7830)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/ads7830` and install it.


## Manual installation (development)

Please install `@rakwireless/ads7830` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`.

```
git clone https://github.com/RAKWireless/node-red-nodes.git
```

```
cp -rf node-red-nodes/node-red-contrib-ads7830 ~/.node-red/node_modules
```

```
cd ~/.node-red/node_modules/node-red-contrib-ads7830 && npm install
```

**Tips:**  After `@rakwireless/ads7830` being installed,  **Node-RED should be restarted**, otherwise, the node cannot be found on the page.

## Usage

**NOTE**: Please make sure that user of system has the permissions to access i2c device, or  you cannot get  the result you want when use ads7830 node,  the result  will be `empty`.

To get a voltage or difference of voltage from a ADS7830  analog to digital converter just select the correct setting for your device and trigger the node.

<img src="assets/image-20220309092410807.png" alt="image-20220309092410807" style="zoom:80%;" />

- **Name**

  Define the msg name if you wish to change the name displayed on the node.

- **/dev/i2c-?**

  Default I2C Bus is 1.  `1` is for `'/dev/i2c-1'`.

- **i2c_Address**

  The Address by default is set to `0x4A`. You can setup the ADS7830 with one of four addresses, 0x48, 0x49, 0x4a, 0x4b. Please see ads7830 documentation for more information.

- **Inputs**

  Inputs may be used for Single-ended measurements (like A0-GND) or Differential measurements (like A0-A1). Single-ended measurements measure voltages relative to a shared reference point which is almost always the main units ground. Differential measurements are “floating”, meaning that it has no reference to ground. The measurement is taken as the voltage difference between the two wires. Example: The voltage of a battery can be taken by connecting A0 to one terminal and A1 to the othe with Common-ground.

- **Internal Reference**

  Open or close internal Reference in chip.

- **A/D Converter**

  Open or close A/D Converter in chip.



## Example

[rak16001-read](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-ads7830/examples/rak16001-read) - Extend RAK16001 in RAK7391 board and test it with NodeRed. 



## License

This project is licensed under MIT license.
npm package: @rakwireless/lps2x
Description: A Node-RED node providing access to lps22hb or lps25 I2C barometer sensor
Author: rakwireless.com
Latest version: 1.0.0

# @rakwireless/lps2x

Node-RED node providing access to lps22hb and lps25hb I2C barometer sensors.

[![version](https://img.shields.io/npm/v/@rakwireless/lps2x.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/lps2x)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/lps2x.svg)](https://www.npmjs.com/package/@rakwireless/lps2x)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/lps2x` and install it.


## Manual installation (development)

Please install `@rakwireless/lps2x` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`.

```
git clone https://github.com/RAKWireless/node-red-nodes.git
```

```
cp -rf node-red-nodes/node-red-contrib-lps2x ~/.node-red/node_modules
```

```
cd ~/.node-red/node_modules/node-red-contrib-lps2x && npm install
```

**Tips:**  After `@rakwireless/lps2x`  installed,  **Node-RED should be restarted**, otherwise, the node cannot be found on the page.

## Usage

To get barometer  you just need to select the correct settings for your device and trigger the node.

<img src="assets/image-20220427101909481.png" alt="image-20220427101909481" style="zoom:50%;" />	

- **Name**

  Define the node name if you wish to change the name displayed on the node.

- **/dev/i2c-?**

  Default I2C Bus is 1.  `1` is for `/dev/i2c-1`.

- **Chip**

  You can select `LPS22HB` or `LPS25HB`.

- **i2c_Address**

  The Address for LPS2x is 0x5C or 0x5D. 



## Examples

[rak1902-read](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-lps2x/examples/rak1902-read) - Read sensor data from RAK1902 every 5 seconds.

## License

This project is licensed under MIT license.
npm package: @rakwireless/ltr-390uv
Description: A Node-RED node providing access to the LTR-390UV I2C digital UV sensor
Author: rakwireless.com
Latest version: 1.0.0

# @rakwireless/ltr-390uv

A node providing access to ltr-390uv, measuring and calculating lux and uvi(ultraviolet index).  

[![version](https://img.shields.io/npm/v/@rakwireless/ltr-390uv.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/ltr-390uv)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/ltr-390uv.svg)](https://www.npmjs.com/package/@rakwireless/ltr-390uv)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/ltr-390uv` and install it.


## Manual installation (development)

Please install `@rakwireless/ltr-390uv` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`,

```
git clone https://github.com/RAKWireless/node-red-nodes.git
```

then copy `node-red-contrib-ltr-390uv` directory  to  the `node_modules` directory,

```
cp -rf node-red-nodes/node-red-contrib-ltr-390uv ~/.node-red/node_modules
```

lastly, change to the `node-red-contrib-ltr-390uv` directory and install the node, 

```
cd ~/.node-red/node_modules/node-red-contrib-ltr-390uv && npm install
```

**Tips:**  After the installation of `@rakwireless/ltr-390uv` is finished, please restart your Node-RED service.  Otherwise, the node cannot be found/added to the new flow.

## Usage

**NOTE**: Please make sure that user has the permissions to access i2c devices, otherwise user can not read from the ltr-390uv chip. 

To get the lux and uvi reading from the ltr-390uv,  you need to select the correct setting for `@rakwireless/ltr-390uv` node.

<img src="assets/ltr-390uv-setting.png" alt="ltr-390uv-setting" style="zoom:67%;" />

**Name**

Define the msg name if you wish to change the name displayed on the node.

**/dev/i2c-?**

The i2c bus number, the default value is `1` , it means `'/dev/i2c-1'`.

**i2c_Address**

The i2c slave address for the ltr-390uv, by default is set to `0x53`.

**gain**

Define the als/uvs measuring gain range. the default value is `1x`

**resolution**

Define the als/uvs measuring resolution, the default value is `16 Bit`



The output of the node is a payload contains the raw als data, raw uvs data,  the calculated lux and the calculated uvi.

![image-20220512120228997](assets/image-debug-node.png)


## Examples

- [rak12019-reading](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-ltr-390uv/examples/rak12019-reading) - Measure lux and uvi using WisBlock UV sensor RAK12019 from Node-RED.



## License

This project is licensed under MIT license.
npm package: @rakwireless/mcp-pcf-aio
Description: Node-RED node for MCP23017 GPIO expander chips
Author: rakwireless.com
Latest version: 1.0.0

# @rakwireless/mcp-pcf-aio

A Node-Red node for 16-Bit I/O Expander MCP23017 chip and 8-Bit I/O Expander PCF8574 chip.

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/mcp-pcf-aio` and install it.

<img src="assets/install.png" alt="install" style="zoom: 50%;" />


## Manual installation (development)

@rakwireless/mcp-pcf-aio will be published to the Node-RED Library by [RAKwireless](https://www.rakwireless.com/en-us), then you can run the following command in the root directory of your node-red install:

```
npm install @rakwireless/mcp-pcf-aio
```



## Usage

**NOTE**: Please make sure that Node-RED user has the permissions to access I2C devices if you deploy Node-red with docker.

There is a global (hidden) `MCP-PCF-chip` node you can set, with following options:

**I2C bus Number:** the I2C bus number for the IO expander chip

**Address A2-A1-A0:**  the IO expander chip and the i2c bus address

**Interval:** is used to determine how frequently all inputs are polled

**Reset Pin:** GPIO number of reset pin, only used for reset MCP23017 chip  

**Start All Outputs High:** Some relay boards turn OFF if sending HIGH signal from the chip. To prevent accidentally turn ON all the realays on startup, use this checkbox.

<img src="assets/config.png" alt="config" style="zoom: 67%;" />



**NOTE:**  The original version of [mcp-pcf-aio](https://flows.nodered.org/node/@pizzaprogram/mcp-pcf-aio)  is published by László Szakmári and we made some changes based on it to set RESET pin for MCP23017 chip.



## Example

[mcp-pcf-aio-examle.json](https://github.com/RAKWireless/node-red-nodes/blob/master/node-red-contrib-mcp-pcf-aio/examples/mcp-pcf-aio-examle.json)  - The example shows how to Control LED using [RAK14003 WisBlock LED Bar Graph Module](https://docs.rakwireless.com/Product-Categories/WisBlock/RAK14003/Overview/).



## License

This project is licensed under MIT license.
npm package: @rakwireless/pi4ioe5v
Description: PI4IOE5V96224 GPIO Expander node
Author: rakwireless.com
Latest version: 1.0.0

# @rakwireless/pi4ioe5v

The @rakwireless/pi4ioe5v node is  IO expander Node-RED node running on raspberry pi.  

[![version](https://img.shields.io/npm/v/@rakwireless/pi4ioe5v.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/pi4ioe5v)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/pi4ioe5v.svg)](https://www.npmjs.com/package/@rakwireless/pi4ioe5v)

Its chip is  PI4IOE5V96224 which can expand 24 IO pin with i2c interface.

![image-20220302171903406](assets/image-20220302171903406.png)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/pi4ioe5v` and install it.


## Manual installation (development)

Please install `@rakwireless/pi4ioe5v` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`.

```
git clone https://github.com/RAKWireless/node-red-nodes.git
```

```
cp -rf node-red-nodes/node-red-contrib-pi4ioe5v ~/.node-red/node_modules
```

```
cd ~/.node-red/node_modules/node-red-contrib-pi4ioe5v && npm install
```

**Tips:**  After `@rakwireless/pi4ioe5v` being installed,  **Node-RED should be restarted**, otherwise, the node cannot be found on the page.

## Usage

**NOTE**: Please make sure that user of system has the permissions to access i2c device, or  you cannot get  the result you want when use  pi4ioe5v node.

Provides two nodes - one to receive IO state, and one to set IO state.

### pi4ioe5v in

PI4IOE5VXXX IO expander input node. Generates a `msg.payload` with either a 0 or 1 depending on the state of the input pin.

<img src="assets/image-20220310143705111.png" alt="image-20220310143705111" style="zoom:80%;" />

- **Name**

  Define the msg name if you wish to change the name displayed on the node.

- **Bus**

  Default I2C Bus is 1.  `1` is for `'/dev/i2c-1'`.

- **Address**

  The Address by default is set to 0x20. You can setup the PI4IOE5V96224 address according to your hardware. Please see  PI4IOE5V96224 documentation for more information.

- **IO**

  Select one pin whose state you what get.



### pi4ioe5v out

PI4IOE5VXXX IO expander output node. Set specific IO pin as  0 or 1. 

<img src="assets/image-20220303171847690.png" alt="image-20220303171847690" style="zoom:80%;" />

- **Name**

  Define the msg name if you wish to change the name displayed on the node.

- **Bus**

  Default I2C Bus is 1.  `1` is for `'/dev/i2c-1'`.

- **Address**

  The Address by default is set to 0x20. You can setup the PI4IOE5V96224 address according to your hardware. Please see  PI4IOE5V96224 documentation for more information.

- **IO**

  Select one pin whose state you what set.



## Example

[pi4ioe5v-toggle-led](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-pi4ioe5v/examples/pi4ioe5v-toggle-led) - The example shows how to toggle the LED which connects to IO0_7 pin of PI4IOE5V96224.



## License

This project is licensed under MIT license.
npm package: @rakwireless/pn532
Description: A Node-RED node providing access to PN532 to read UID of RFID card.
Author: rakwireless.com
Latest version: 1.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @rakwireless/pn532-i2c

A node-red node providing access to PN532 to read UID of RFID card.

[![version](https://img.shields.io/npm/v/@rakwireless/pn532-i2c.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/pn532-i2c)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/pn532-i2c.svg)](https://www.npmjs.com/package/@rakwireless/pn532-i2c)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/pn532-i2c` and install it.


## Manual installation (development)

Please install `@rakwireless/pn532-i2c` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`.

```
git clone https://github.com/RAKWireless/node-red-nodes.git
```

```
cp -rf node-red-nodes/node-red-contrib-pn532-i2c ~/.node-red/node_modules
```

```
cd ~/.node-red/node_modules/node-red-contrib-pn532-i2c && npm install
```

**Tips:**  After `@rakwireless/pn532-i2c` being installed,  **Node-RED should be restarted**, otherwise, the node cannot be found on the page.

## Usage

To get  UID of RFID card from PN532 you just need to select the correct settings for your device and trigger the node.

<img src="assets/image-20220408160754221.png" alt="image-20220408160754221" style="zoom: 80%;" />	

- **Name**

  Define the msg name if you wish to change the name displayed on the node.

- **/dev/i2c-?**

  Default I2C Bus is 1.  `1` is for `'/dev/i2c-1'`.

- **i2c_Address**

  The Address for pn532 is 0x24 which can not be changed. 




## Example

[rak13600-nfc-read](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-pn532-i2c/examples/rak13600-nfc-read)  - Read NFC tag information by rak13600.



## License

This project is licensed under MIT license.
npm package: @rakwireless/pn532-i2c
Description: A Node-RED node providing access to PN532 to read UID of RFID card.
Author: rakwireless.com
Latest version: 1.1.0

node-red-contrib-pn532-i2c
==================================

A node-red node providing access to PN532 module via an i2c connection, reading or writing the specified block data for a NFC/RFID card.

[![version](https://img.shields.io/npm/v/@rakwireless/pn532-i2c.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/pn532-i2c)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/pn532-i2c.svg)](https://www.npmjs.com/package/@rakwireless/pn532-i2c)

## Install from Node-RED
 
From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/pn532-i2c` and install it.## Install

## Manual installation (development)
 
Please install `@rakwireless/pn532-i2c` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`.

```
git clone https://github.com/RAKWireless/node-red-nodes.git
cp -rf node-red-nodes/node-red-contrib-pn532-i2c ~/.node-red/node_modules
cd ~/.node-red/node_modules/node-red-contrib-pn532-i2c
npm install
```

**Tips:**  After `@rakwireless/pn532-i2c` being installed,  **Node-RED should be restarted**, otherwise, the node cannot be found on the page.

## Usage

### Configure the bus

There is a `pn532_i2c-read` node and a `pn532_i2c_write` node, to read or write a NFC/RFID card from PN532 module you need to select the correct settings for the `pn532_i2c_config` node.

<img src="assets/configuration-node.png" alt="configuration-node" style="zoom:67%;" />

- **I2C Bus Number**

  Default I2C bus number for pn532 is 1.  

- **I2C Address**

  Default I2C address for pn532 is 0x24. 

### Read a specified block data

To read a specific block data from a NFC/RFID card, you just need to set the `Block Number` option in the `pn532_i2c_read` node, then you can use a `inject` node to trigger it.

<img src="assets/read-node.png" alt="read-node" style="zoom:67%;" />


### Write a specified block data

To write a specific block data to a NFC/RFID card,  you need to set the `Block Number`  in the `pn532_i2c_write` node,  you also need to set the block data in the `inject` node. data must be a buffer of 16 bytes.

<img src="assets/write-data-node.png" alt="write-data-node" style="zoom:67%;" />


## Examples

* [rak13600-nfc-read](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-pn532-i2c/examples/rak13600-nfc-read) - Read NFC tag information by rak13600.
* [rak13600-nfc-example](https://github.com/RAKWireless/node-red-nodes/tree/master/node-red-contrib-pn532-i2c/examples/rak13600-nfc/README.md) - Read or write a NFC/RFID card by rak13600.


## License

This project is licensed under MIT license.
npm package: @rakwireless/shtc3
Description: A Node-RED node providing access to an SHTC3 I2C temperature and humidity sensor
Author: rakwireless.com
Latest version: 1.0.4

@rakwireless/shtc3
==================================

A Node-RED node providing access to an SHTC3 temperature and humidity sensor.

[![version](https://img.shields.io/npm/v/@rakwireless/shtc3.svg?logo=npm)](https://www.npmjs.com/package/@rakwireless/shtc3)
[![downloads](https://img.shields.io/npm/dm/@rakwireless/shtc3.svg)](https://www.npmjs.com/package/@rakwireless/shtc3)

## Install from Node-RED

From within NodeRED, visit the top right menu, select `Manage palette` and then the `Install` tab. Look for `@rakwireless/shtc3` and install it.


## Manual installation (development)

Please install `@rakwireless/shtc3` node with the following commands. If you use docker of Node-RED, you may need to replace `~/.node-red` with `/usr/src/node-red`.

```
git clone https://github.com/RAKWireless/node-red-nodes.git
```

```
cp -rf node-red-nodes/node-red-contrib-shtc3 ~/.node-red/node_modules
```

```
cd ~/.node-red/node_modules/node-red-contrib-shtc3 && npm install
```

**Tips:**  After `@rakwireless/shtc3` being installed,  **Node-RED should be restarted**, otherwise the node cannot be found on the page.

## Usage

**NOTE**: Please make sure that the user running Node-RED has the permissions to access I2C devices. 

- **shtc3_i2c**

​		To get value of  temperature and humidity you just need to select the correct settings for your device and trigger the node.

​		<img src="assets/image-20220321162437053.png" alt="image-20220321162437053" style="zoom:80%;" />	

​		**Name**

​			Define the msg name if you wish to change the name displayed on the node.

​		**/dev/i2c-?**

​			Default I2C Bus is 1.  `1` is for `/dev/i2c-1`.

​		**i2c_Address**

​			The Address for shtc3 is `0x70` which can not be changed. 

​		**Temperature Unit**

​			You can select `Celsius` or `Fahrenheit` as you like.



The output of the node is a payload contains `temperature` and `humidity` data.

```
{
	temperature: "34.72 °C"
	humidity: "17.92 %"
}
```


## Example

- [shtc3-read](./node-red-contrib-shtc3/examples/shtc3-read) -  Read temperature and humidity data from shtc3 sensor.


## License

This project is licensed under MIT license.