2021-09-06, 04:48 AM
(2021-08-30, 01:03 AM)Jay_cd33 Wrote:
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.
Hi Jay_cd33,
Worked for me ! THANKS