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
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.
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
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.
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.
Thank you, I will take a look at all
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}
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
Thanks again all.
Tim
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.
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
Which set of dashboard nodes do you have installed?
That does not look like a node-red-dashboard gauge.
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'.
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.
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.
Dashboard v 3.6.5 just installed
Thank you, will test and reply
Tim
Good evening. Try looking at the Random Nerd Tutorial. BME680, NodeRed, MQTT in ArduinoIDE.
I don't advertise, I use a lot.