# Node-Red direct wifi link to DHT22/ESP8266

**URL:** https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783
**Category:** General
**Created:** [6 December 2021 16:48 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783 "2021-12-06T16:48:04Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![fredshortlv129bis](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fredshortlv129bis](https://discourse.nodered.org/u/fredshortlv129bis)
#### Post date: [6 December 2021 16:48 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/1 "2021-12-06T16:48:04Z")

</div>

I currently measure the outside and inside temperature according to the diagram below. It is programmed by a friend to teach me IDE programming. I suppose that Node-Red might be easier to program. I am at least a fan.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/772901162b0d5c68937ca0cb4108df3376959c7d.png)

I now wish to receive a WhatsApp when for example T in = T out or T out reaches its maximum and so on.....

1. Where can I find the base instructions to do it?
2. Is it possible to read the data directly from the ESP8266 (NodeMCU Amica V2 – ESP8266-12F-processor Espresif WLAN)?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/30f2711eed659e4312a059b4bb5f21ac7e6a1b3a.png)

```auto
type or paste code here

```

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 December 2021 17:01 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/2 "2021-12-06T17:01:04Z")

</div>

How is the esp sending data to the pi?  
What s/w is running on the Pi to get the data to influx?

---

<div class="post-metadata">

### Author: ![fredshortlv129bis](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fredshortlv129bis](https://discourse.nodered.org/u/fredshortlv129bis)
#### Post date: [6 December 2021 20:45 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/3 "2021-12-06T20:45:47Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/79d496d21627d540c18763120451d1938a8d41d4.png)  
I assume you mean IDE  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/c/ac5d8170ef1113f1d9eeb01af895ec75fe6650f9.png)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [6 December 2021 21:24 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/4 "2021-12-06T21:24:48Z")

</div>

I would program the ESP to send readings by MQTT to a Mosquitto broker on the Raspberry Pi.

In node-red subscribe to the topics used and store the data in Influxdb.

There is a tutorial at [https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/](https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/)  
I have not followed that tutorial, I use a different MQTT client library: pubsubclient. It explains the setup though.

Regarding notifications from node-red, I think Telegram is the most popular way.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [6 December 2021 21:25 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/5 "2021-12-06T21:25:35Z")

</div>

You are writing direct to InfluxDB but that doesn't pass events onward - so you would have to periodically query the data again in Node-RED.

Put MQTT in the mix and simply send the data to the MQTT broker and use Node-RED to pass it on to InfluxDB. MQTT provides you with an event-driven interface.

* * *

As @jbudd mentions, Telegram is preferred for notifications since it is MUCH (I mean really A LOT MUCH!) easier to work with than WhatsApp.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 December 2021 21:44 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/6 "2021-12-06T21:44:26Z")

</div>

@fredshortlv129bis If you want to learn more about MQTT then see this excellent tutorial [MQTT Essentials - All Core Concepts explained](https://www.hivemq.com/mqtt-essentials/)

---

<div class="post-metadata">

### Author: ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)
#### Post date: [6 December 2021 22:02 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/7 "2021-12-06T22:02:56Z")

</div>

> [@fredshortlv129bis](#):
>
> I now wish to receive a WhatsApp

If I'm not talking nonsense, Wathsapp does not have an open API to communicate with the outside world. Unless that has changed recently. So no way to get the info on your phone.  
That's why we often use Telegram

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [6 December 2021 22:09 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/8 "2021-12-06T22:09:01Z")

</div>

It is possible - just not easy.

---

<div class="post-metadata">

### Author: ![fredshortlv129bis](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fredshortlv129bis](https://discourse.nodered.org/u/fredshortlv129bis)
#### Post date: [17 December 2021 20:44 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/9 "2021-12-17T20:44:26Z")

</div>

Thank you to all who are thinking along. Due to my ignorance, I have involuntarily asked an inappropriate question apparently. I still do not know how to answer appropriately. I am forced to limit myself to further learning IDE programming and using InfluxDB and Grafana.`Preformatted text`

---

<div class="post-metadata">

### Author: ![lu4t](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lu4t/32/32276_2.png) [@lu4t](https://discourse.nodered.org/u/lu4t)
#### Post date: [17 December 2021 22:45 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/10 "2021-12-17T22:45:54Z")

</div>

if are thinking of getting the whatsapp on your own phone , you might want to give this node a try:

> **[node-red-contrib-whin](https://flows.nodered.org/node/node-red-contrib-whin)**
>
> Whatsapp self notification

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [15 February 2022 22:46 UTC](https://discourse.nodered.org/t/node-red-direct-wifi-link-to-dht22-esp8266/54783/11 "2022-02-15T22:46:42Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
