This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I2C bme280 set up problem
#5
(2021-09-17, 02:16 AM)Matilda Wrote: Smile
Thank you Jay your work around worked well and now I have the bme280 working, and the other units on the I2C are all good.

So Jay I will include some of your post here so others can see what i did,

"
So I figured out the problem with not getting BME280 sensor data into SignalK described in my previous posts.

It turns out Adafruit has updated their BME280 python library used in the openplotter i2c app to read sensor data. So new installs download the updated library which breaks the openplotte i2c read app.  The openplotterI2cRead app runs as a service, reads the sensor data and sends it to signalk.  The problem is that the library import in openplotterI2cRead.py is not compatible with the new library.   So the openplotter i2c app sets up the bme280 sensor correctly and configures signalk with a good connection but no data is sent to that connection by the openplotterI2cRead app.

So Sailoog needs to correct the BME280 library import call in a future release.   For those that are willing to hack the changes necessary to make it work here is what I did...

In the directory;
/usr/lib/python3/dist-packages/openplotterI2c
The file openplotterI2cRead.py needs to be edited. (sudo needed to edit file),

Change line 44 (in the BME280 section)
from:        
        import adafruit_bme280

to:
        from adafruit_bme280 import basic as adafruit_bme280

(be aware the from is preceeded by 2 tabs not spaces).

After saving these changes, either restart the openplotter-i2c-read.service or reboot.

That fixed the problem for me.   I hope this helps others.  
I'm not a coder so Sailoog will probably have a proper fix in a future release.  "

the screen shot is my file after the edit, and as normal good practice make a copy of the file before editing in case you make unintentional changes

Matilda and all,
I was premature in my asking of the question. I did in fact figure out how to  edit the document. This did in fact fix the issue. I now have BME280 data on the server.

For anyone that might have a similar issue and are as "terminal-ly" challenged as I am here is the exact text to get to and edit said doc.

sudo nano /usr/lib/python3/dist-packages/openplotterI2c/openplotterI2cRead.py

Thanks
Jim
Reply


Messages In This Thread
I2C bme280 set up problem - by Matilda - 2021-09-16, 10:44 PM
RE: I2C bme280 set up problem - by Jay_cd33 - 2021-09-17, 12:31 AM
RE: I2C bme280 set up problem - by Matilda - 2021-09-17, 02:16 AM
RE: I2C bme280 set up problem - by svcalm - 2022-05-16, 02:26 PM
RE: I2C bme280 set up problem - by svcalm - 2022-05-16, 02:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)