# Building a Flow for the BME680 what is the set message.payload for the correct sensor?

**URL:** <https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297>\
**Category:** General\
**Created:** [27 May 2024 11:56 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297 "2024-05-27T11:56:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [27 May 2024 11:56 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/1 "2024-05-27T11:56:20Z")

</div>

Building a Flow for the BME680 sensors to Influxdb, I was told to use BME680 then set message.payload and send to Influx DB.  
However what do I use in the message to send the correct sensor?  
payload.temperature\_C works for the temperature, but the bme680 has other sensors that I have no idea what the correct "set message.payload \*\*\*\*\*\* would be. I could really do with some help I have searched the internet endlessly, thanks in advance, TG

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [27 May 2024 13:06 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/2 "2024-05-27T13:06:39Z")

</div>

Hi Tim,  
Welcome to the Forum.  
You haven't give us much to go on.  
For example, what is the BME680 connected to?  
The pins on a Raspberry Pi or ESP32 microcontroller, etc.. ?

What language are you using to "talk" to the BME680?  
A Node-RED node or Micro-Python or Arduino, etc.. ?

You might want to read this thread as it explains what a number of users do which is to use a cheap WiFi microcontroller (e.g. ESP32-C3-Super-Mini) to act as a slave to the Raspberry Pi.

> [@BME680 and i2c communication](https://discourse.nodered.org/t/bme680-and-i2c-communication/15527):
>
> Hey, Have anyone managed to connect bme680 or similar i2c sensor in Nodered using i2c contrib node? Can you share the sample flow? I read the sensor datasheet, but looks like my knowledge is limited. I know the i2c adress and sensor is working in python, so wiring is good. I tried various numbers for command and bytes, but the values recieved are not good. Maybe I need to send specific command first, before sensor returns data? I also tried to use exec node, to run the python code directly, …

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [27 May 2024 14:11 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/3 "2024-05-27T14:11:58Z")

</div>

Sorry for the lack of information. I can clarify  
It's a BME680 attached to the Pimoroni Breakout Garden to a Raspberry Pi 3.  
The Pi is running Node-Red and I have Influx db install and active as well as Grafana that I use to visualise the data with.  
I had a BME280 using the same process and works perfectly, only because I stubbled to an online tutorial taht said what the names for the payload messages should be.  
Thank you for your help.

TG

---

<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:** [27 May 2024 15:30 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/4 "2024-05-27T15:30:47Z")

</div>

If you use a debug node set to show the entire message object, does it not give you the other sensor properties?

ps How long are the wires between the Pi and the BME? Is it all enclosed in a case?  
The Pi might be boosting your temperature readings.

---

<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:** [27 May 2024 16:54 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/5 "2024-05-27T16:54:30Z")

</div>

> [@TimG](#):
>
> I have no idea what the correct "set message.payload \*\*\*\*\*\* would be

The help text for the influxdb node tells you what format the payload should be in, and I think there are also examples in the node's readme.

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [27 May 2024 16:55 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/6 "2024-05-27T16:55:49Z")

</div>

Thank you, I will take a look at all

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 08:04 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/7 "2024-05-28T08:04:52Z")

</div>

Hi and thank you, as below the debug node shows all the message formats, how I didn't work this one out for myself is beyond me! But a huge thatnk you

{"heat\_stable":true,"temperature\_C":28.05,"pressure\_hPa":1013.53,"humidity\_pc":39.793,"gas\_resistance\_Ohms":259109.3117408907}

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 08:20 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/8 "2024-05-28T08:20:21Z")

</div>

# BME680

## BME680 Sensor - I2C interface

The Bosch BME660 sensor provides 4 observations in `msg.payload` :

temperature\_C  
ambient temperature in degrees Celsius  
humidity\_pc  
relative humidity as a percentage  
pressure\_hPa  
barometric/atmospheric pressure in hectoPascal - "standard" pressure being ~1013hPa or 1013mbar  
gas\_resistance\_Ohms  
gas resistance in Ohms - indicating lesser (low resistance) or greater (high resistance) air quality, based on the higher or lower presence of particles in the ambient air

The reliability of the gas resistance value is gated by the value of _heat\_stable_ , also returned in `msg.payload` - if True, the gas\_resistance\_Ohms value can be used.

For more detailed information, visit [Pimoroni BME680, getting started](https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-bme680-breakout)

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 08:20 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/9 "2024-05-28T08:20:56Z")

</div>

Thanks again all.

Tim

---

<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:** [28 May 2024 09:58 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/10 "2024-05-28T09:58:25Z")

</div>

Do you know how you want it stored in influxdb? What measurement name and what field names do you want?

If you are happy with the field names in the object you should be able to feed that directly into an influxdb out.

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 11:41 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/11 "2024-05-28T11:41:38Z")

</div>

Hi Colin, thanks for replying. I have the data being sent now to influx from Node Red, which is great! Thank you.  
Although, not sure if this is the correct part of forum, but it does follow on from this.  
I wanted to us Node Red Dashboard, all installed and working can access the url and get it to a very basic point, however the dashboard is picking up the payload message not the actual temperature itself. Message payload is payload.temperature\_C, attached image  
 ![Environment](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/8/e8f2bb390209028a4ec4731b05a4b0f44a2d98cf.jpeg)

---

<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:** [28 May 2024 11:57 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/12 "2024-05-28T11:57:11Z")

</div>

Which set of dashboard nodes do you have installed?  
That does not look like a node-red-dashboard gauge.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [28 May 2024 12:21 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/13 "2024-05-28T12:21:27Z")

</div>

Most of the widgets used in Node-RED Dashboard version 1 expect the value to be in msg.payload, so you want want to try moving 'msg.payload.temperature\_C ' into 'msg.payload'.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [28 May 2024 12:32 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/14 "2024-05-28T12:32:20Z")

</div>

Not entirely true Dave, you can enter any property in most widgets.  
e.g  
`{{msg.payload.temperature_C}}`  
Can be used in the dashboard 1 gauge value field.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [28 May 2024 12:34 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/15 "2024-05-28T12:34:44Z")

</div>

Thanks I stand corrected.  
I should have thought more about this question especially since I've used that method in some of my flows. Suspect my old-age and memory failure creeping in again.

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 13:00 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/16 "2024-05-28T13:00:19Z")

</div>

Dashboard v 3.6.5 just installed

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 13:05 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/17 "2024-05-28T13:05:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 May 2024 13:09 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/18 "2024-05-28T13:09:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c953ccf7cf0f1729bb486a0e35e867e8951ac2ae.png)

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.nodered.org/u/TimG)\
**Post date:** [28 May 2024 15:05 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/19 "2024-05-28T15:05:51Z")

</div>

Thank you, will test and reply  
Tim

---

<div class="post-metadata">

**Author:** ![dukora53](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dukora53/32/43370_2.png) [@dukora53](https://discourse.nodered.org/u/dukora53)\
**Post date:** [4 June 2024 20:57 UTC](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297/20 "2024-06-04T20:57:52Z")

</div>

Good evening. Try looking at the Random Nerd Tutorial. BME680, NodeRed, MQTT in ArduinoIDE.  
I don't advertise, I use a lot.

[Next page](https://discourse.nodered.org/t/building-a-flow-for-the-bme680-what-is-the-set-message-payload-for-the-correct-sensor/88297.md?page=2)
