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
New I2C sensors supported
#11
Did you also create the actual influx database, in your case "boatDB"? 
You need to do this only once in the lifetime of your raspberry Pi.

  1. Open a terminal window and enter command: influx
  2. influx has a help built-in: HELP
  3. Create your database: CREATE DATABASE boatDB
  4. Check if your new database is indeed created: SHOW DATABASES
  5. Exit influx: exit
Reply
#12
(2020-11-17, 10:48 PM)beercansailor Wrote: Did you also create the actual influx database, in your case "boatDB"? 
You need to do this only once in the lifetime of your raspberry Pi.

  1. Open a terminal window and enter command: influx
  2. influx has a help built-in: HELP
  3. Create your database: CREATE DATABASE boatDB
  4. Check if your new database is indeed created: SHOW DATABASES
  5. Exit influx: exit


There's actually no need to do that, put a database name in the influxdb writer plugin config and if it doesn't exist the plugin will create it in influxdb and start writing to it.

(2020-11-17, 09:19 PM)Didier B Wrote: Yes, indeed ! How can I fill this info ? and where do I find it ?

Server>plugin config.
Same as in the screenshot.
Reply
#13
Thanks to the helpers for influxdb !

About mysterious I2C info (temperature, atmospheric pressure) disappearing : 
  • It occurs repetitively after a few hours ;
  • Pipylot info (pitch, heel & heading) are not affected and remains available ;
  • Stopping/starting OpenCPN doesn't allow to recover lost I2C info ;
  • Neither re-starting signal K server ;
  • Nor rebooting the Pi (after stopping OpenCPN) ;
  • Only shutdown and power cut-off, followed by a complete cold restart of the Pi allows to get I2C info back.
  • After a cold start I2C info is always present ;
  • both I2C and Pipylot data are generated by the same (and only) GY91 module.
EDIT : next day, this evening, more of the same : after new I2C info disappearance, I could check once more that going through un-powering was required to recover.
  • I then started to play with the GY91 module. When removing the GND wire from GPIO, after 7 to 10 seconds Pypilot info disappear, then 15 s later I2C info vanishes.
  • When re-plugging this GND wire, everything comes back almost instantly (say less than one second).
Next test : after spontaneous disappearance of I2C info, I will try to unplug/replug this GND wire... almost waiting for it to happen !
Cordialement
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN  5.8.4 :  Thank you  Thank you  Thank you


Reply
#14
Hello,
I have just received one of the Adafruit BMP390 sensors and would like to get it working with Openplotter.
I also have a BMP280 and that is working fine, it is connected to a Raspberry Pi with I2C and using the Openplotter I2C 2.2.0 connection
However when I connect the BMP390 in the same way using I2C and adding the "BMP3XX" sensor in the I2C screen of Openplotter I am not receiving any data in the SignalK server...?

I have been able to connect to the BMP390 and receive the Pressure and Temperature readings from the board by using the Adafruit Python3 "simple test" program
https://learn.adafruit.com/adafruit-bmp3...cuitpython
bmp3xx_simpletest.py
although to get it working I did need to change a part of the adafruit_bmp3xx.py program as per the following forum post
https://forums.adafruit.com/viewtopic.ph...xx#p840816

So I know that the BMP390 board and I2C wiring is working okay.

I am just wondering if the same problem exists in the Openplotter I2C BMP3XX code ie if it is using the same code:-
https://github.com/adafruit/Adafruit_Cir..._bmp3xx.py
and hence assuming the CHIP_ID ...
_CHIP_ID = const(0x50)
(0x50 is correct for the BMP388)
when for the BMP390 it should be:-
_CHIP_ID = const(0x60)

Any help to figure out what is going wrong would be much appreciated...

Thanks very much
Cheers
Jeremy

Hi,
Update from my earlier post about Adafruit BMP390 Barometric Pressure sensor board...
Having amended the local copy of the adafruit_BMP3XX.py on my RPI, I then deleted the Openplotter I2C BMP3XX sensor/connection and reinstalled it... and now it is working perfectly...!
So there is an issue with getting the BMP390 to work with Openplotter, but it appears to be an issue with the Adafruit_BMP3XX.py code.. So hopefully they will get it working properly soon....
In the meantime please read the following forum post, or search for BMP390 in the Adafruit Forums...
https://forums.adafruit.com/viewtopic.ph...90#p840831

Cheers
Jeremy
Reply
#15
Once more this afternoon, the disparition of I2C data occurred . This time, I could restore the I2C by simply removing the I2C GND wire, and when I reconnected that wire, all data as shown back (both Piylot and I2C) : no need to switch power off then on again !
Cordialement
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN  5.8.4 :  Thank you  Thank you  Thank you


Reply
#16
(2020-11-26, 03:43 PM)jpaul1 Wrote: Hello,
I have just received one of the Adafruit BMP390 sensors and would like to get it working with Openplotter.
I also have a BMP280 and that is working fine, it is connected to a Raspberry Pi with I2C and using the Openplotter I2C 2.2.0 connection
However when I connect the BMP390 in the same way using I2C and adding the "BMP3XX" sensor in the I2C screen of Openplotter I am not receiving any data in the SignalK server...?

I have been able to connect to the BMP390 and receive the Pressure and Temperature readings from the board by using the Adafruit Python3 "simple test" program
https://learn.adafruit.com/adafruit-bmp3...cuitpython
bmp3xx_simpletest.py
although to get it working I did need to change a part of the adafruit_bmp3xx.py program as per the following forum post
https://forums.adafruit.com/viewtopic.ph...xx#p840816

So I know that the BMP390 board and I2C wiring is working okay.

I am just wondering if the same problem exists in the Openplotter I2C BMP3XX code ie if it is using the same code:-
https://github.com/adafruit/Adafruit_Cir..._bmp3xx.py
and hence assuming the CHIP_ID ...
_CHIP_ID = const(0x50)
(0x50 is correct for the BMP388)
when for the BMP390 it should be:-
_CHIP_ID = const(0x60)

Any help to figure out what is going wrong would be much appreciated...

Thanks very much
Cheers
Jeremy

Hi,
Update from my earlier post about Adafruit BMP390 Barometric Pressure sensor board...
Having amended the local copy of the adafruit_BMP3XX.py on my RPI, I then deleted the Openplotter I2C BMP3XX sensor/connection and reinstalled it... and now it is working perfectly...!
So there is an issue with getting the BMP390 to work with Openplotter, but it appears to be an issue with the Adafruit_BMP3XX.py code.. So hopefully they will get it working properly soon....
In the meantime please read the following forum post, or search for BMP390 in the Adafruit Forums...
https://forums.adafruit.com/viewtopic.ph...90#p840831

Cheers
Jeremy

Jeremy, thanks for this debug work. The fastest way to get this solved is reporting it to github so I have created an issue there and we should wait for them to fix this:
https://github.com/adafruit/Adafruit_Cir.../issues/12
Reply
#17
(2020-11-26, 05:57 PM)Didier B Wrote: Once more this afternoon, the disparition of I2C data occurred . This time, I could restore the I2C by simply removing the I2C GND wire, and when I reconnected that wire, all data as shown back (both Piylot and I2C) : no need to switch power off then on again !

What sensors you have connected?
What sensor is failing?
What "i2cdetect -y 1" returns when this happens?
Reply
#18
Jeremy please could you unzip and replace the attached file and report the result?


Attached Files
.zip   adafruit_bmp3xx.py.zip (Size: 3.26 KB / Downloads: 190)
Reply
#19
Hi
Wow that was quick...

I think I have done what you wanted and it seems to be fine.
I unzipped the file, put it in my local directory
/usr/local/lib/python3.7/dist-packages/adafruit_bmp3xx.py
then I removed the sensor/connection from openplotter I2C
and reinstalled the sensor/connection...

and it is working fine, and passing data to signalK

I hope I have done it right..
Let me know if you need me to check anything else.
Kind regards
Jeremy
Reply
#20

(2020-11-26, 07:00 PM)Sailoog Wrote:
(2020-11-26, 05:57 PM)Didier B Wrote: Once more this afternoon, the disparition of I2C data occurred . This time, I could restore the I2C by simply removing the I2C GND wire, and when I reconnected that wire, all data as shown back (both Piylot and I2C) : no need to switch power off then on again !

What sensors you have connected?  GY91 breakout including MPU9250 and BMP280
What sensor is failing? BMP280
What "i2cdetect -y 1" returns when this happens? I'll post (here, by editing) at next occurence (now : 1a, 68 & 76)

Hello Sailoog, sorry for the delay, but it only occurred a few min ago, missing address is 76, but where is the issue : BMP280 part of my GY-91 breakout, or with the I2C app ?
I have spare IMU & environmental sensors, I am testing them from now on !
Cordialement
Didier B
Pi4, SSD USB3, OP 3.0 Touch SK 3.2.1 OpenCPN  5.8.4 :  Thank you  Thank you  Thank you


Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)