n61ab
21 September 2019 22:44
1
I am trying to use the "node-red-contrib-bme280-rpi" to read a BME-280 pressure / temperature sensor using the I2C bus of a Rasberry PI.
The node appears to connect to the sensor. I did verify the sensor i.d. and its the same as showing on the Node-Red node.
Problem is, there is no data coming out of the node-red-contrib-bme280-rpi node???
Documentation is very skimpy.
Have others used this device and could you share with me the details for making it work?
Alan
Did you follow the instructions ? Did you restart node-red after installation of the node ?
ie. permissions
and what does your flow look like ?
node-red,npm and node js version?
As has been mentioned before, I'm not sure many people actually connect sensors direct to their Pi's. It generally seems much easier and more reliable to connect sensors to Arduino's or ESP8266/ESP32 devices.
Certainly I've used the BME-280 quite happily on an Arduino and more recently on the ESP8266. It is a good device and works well.
n61ab
22 September 2019 14:27
4
bakman2
Thank - you for the reply
Yes, restarted and rebooted several times.
Screenshots attached:
I2C buss scan
Node Setup
Flow showing debug window (no output from the node)
Alan
n61ab
22 September 2019 17:50
5
Udate - Still Need Help
I noticed that bakman2 referenced a different node, node-red-contrip-bme28, so I gave this one a try:
First I followed the instructions to create a software based I2C bus. I completed those steps and rebooted, moved my clock and data to pins 23 and 24 then scanned the new bus 3. My sensor showed up at #77 .
Added a trigger and output to the BME Node, still no output??
Screenshots attached:
I2C Bus Scan
Trigger Configuration
BME280 Node Configuration.
Alan
Your screenshot shows “muted” debug nodes?
and also bus number 7 rather than 3
n61ab
22 September 2019 22:14
8
ukmoose and bakman2
Thanks. Making progress.
Now, I get this message in the alarm panel:
"Sensor Init failed ->Error: ENOENT: no such file or directory, open '/dev/i2c-7'"
I went over the install instructions but couldn't find a reference to adding this file. Obviously I missed a step.
Help.
Alan
n61ab
22 September 2019 22:17
9
I followed these instructions to set up the software I2C bus as required by the Node install instructions:
## Configuring Software I2C on the Raspberry Pi
Raspbian has a software I2C driver that can be enabled by adding the following
line to `/boot/config.txt`:
```
dtoverlay=i2c-gpio,bus=3
```
This will create an I2C bus called `/dev/i2c-3`. SDA will be on GPIO23 and SCL
will be on GPIO24 which are pins 16 and 18 on the GPIO header respectively.
For further information about `i2c-gpio` and the parameters it supports see
`/boot/overlays/README` on the Raspberry Pi.
The advantage of software I2C over hardware I2C on the Raspberry Pi is that
software I2C supports I2C clock stretching. Hardware I2C doesn't support I2C
clock stretching due to a
[hardware bug](http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html).
This file has been truncated. show original
Alan
n61ab
23 September 2019 00:02
11
Thanks, bakman for the help.
Ran the command, see the attached screenshot from the terminal.
Rebooted.
Continue to get the error message:
Sensor Init failed ->Error: ENOENT: no such file or directory, open '/dev/i2c-7
Alan
n61ab
23 September 2019 00:05
12
Looks like we installed -1 and -3. Do the same for -7?
Alan
n61ab
23 September 2019 00:25
13
See attached screenshot of dev file contents. I can see that it has i2c-1 and i2c-3. How do I add i2c-7?
Alan
Looking at https://www.npmjs.com/package/bme280-sensor
Which is the underlaying code for the sensor, they use i2c-1 in their examples.
I'm not sure you need to add bus -7
You searched and found the sensor using
i2cdetect -y 3
but in the nodes config' you have entered Buss #
7
rather than 3
n61ab
23 September 2019 18:55
16
Followed those instructions. Moved the sensor back to bus 1. Rebooted. Now get this error message:
"Sensor Init failed ->Error: , Remote I/O error"
So.... a new genuine Adafruit BME280 sensor is arriving tomorrow. I will update the group after I try again, with a new sensor.
Alan
n61ab
24 September 2019 19:53
17
Thanks bakman and ukmoose.
Success!
Installed a new BME280 sensor from AdaFruit, installed on I2C-1, rebooted.....and it worked!
Alan
1 Like
n61ab
25 September 2019 00:58
18
How do I mark this "solved"??
Alan
If the option isn't available to you in the controls (...) for a reply, just edit the title and put "[Solved] " at the start.
1 Like