# How to add new sensor in node-red

**URL:** https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137
**Category:** General
**Created:** [8 August 2019 10:04 UTC](https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137 "2019-08-08T10:04:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![adamf](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@adamf](https://discourse.nodered.org/u/adamf)
#### Post date: [8 August 2019 10:04 UTC](https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137/1 "2019-08-08T10:04:09Z")

</div>

Hi, I am a newbie here. I have worked with node-red that has already installed sensors or I got npm install files from the internet.

But now I want to work with [this temp and hum sensor](https://store.ncd.io/product/sht31-humidity-and-temperature-sensor-%c2%b12rh-%c2%b10-3c-i2c-mini-module/) and send its data to google sheet using node-red.  
But, how can I add this sensor in node-red?

Any leads will be a great help.

Thanx in advance.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [8 August 2019 10:12 UTC](https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137/2 "2019-08-08T10:12:13Z")

</div>

How do you read the data coming from the sensor ?

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [8 August 2019 10:36 UTC](https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137/3 "2019-08-08T10:36:52Z")

</div>

Its an I2c device so you could use [https://flows.nodered.org/node/node-red-contrib-i2c](https://flows.nodered.org/node/node-red-contrib-i2c) to get data from it.

Unfortunately, this is going to require a bit of prodding and poking to get it working

This should give an idea of commands needed and format of received messages

> **[Raspberry Pi and SHT31 sensor example](http://www.pibits.net/code/raspberry-pi-sht31-sensor-example.php)**
>
> SHT31 is the next generation of Sensirion’s temperature and humidity sensors. It builds on a new CMOSens® sensor chip that is at the heart of Sensirion’s new humidity and temperature platform. The …

PS You can proably get the module in a cheaper configuration  
[https://www.ebay.co.uk/sch/i.html?\_from=R40&\_trksid=m570.l1313&\_nkw=sht31&\_sacat=0](https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=sht31&_sacat=0)

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [12 August 2019 08:48 UTC](https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137/4 "2019-08-12T08:48:45Z")

</div>

Hi Adam, I’m a bit late to the conversation. Have you followed NCD’s own Node-RED tutorial for connecting these sensors to Node-RED yet? For connecting it to a google spreadsheet there’s countless of questions on this forum, a search should find you a solution that works. But start with NCD’s tutorial, it gives you the basics.

---

<div class="post-metadata">

### Author: ![belveder79](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/belveder79/32/39991_2.png) [@belveder79](https://discourse.nodered.org/u/belveder79)
#### Post date: [8 April 2021 09:50 UTC](https://discourse.nodered.org/t/how-to-add-new-sensor-in-node-red/14137/5 "2021-04-08T09:50:48Z")

</div>

I just published a first version of a node for the SHT31...

[SHT31 Contrib Module](https://flows.nodered.org/node/node-red-contrib-sht31)

it's barely tested, but it works for my custom setup... any feedback welcome...
