OpenMarine
Importing I2C data - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2)
+--- Thread: Importing I2C data (/showthread.php?tid=2444)

Pages: 1 2 3


Importing I2C data - deanfourie - 2020-03-24

Hi, please could someone explain to me how to add I2C sensors, namely being the compass.

I have i2cdetect -y 1 print out my current device address however when I go to the I2C app, and add sensors the only two options in the drop down box are 

BME280
MS5607-02BA03

No other devices are listed. Im trying to add a I2C compass that is integrated with my GPS which is being used with GPSD. Is there also any way to send GPS and Compass data over GPSD? The Compass is separate and is I2C data.

Regards
Dean


RE: Importing I2C data - Sailoog - 2020-03-24

At this moment only this sensors are supported by I2C app:
BME280
MS5607-02BA03
We will add more soon.

Compass is managed by pypilor app and these are the supported models:
https://github.com/openplotter/RTIMULib2

GPSD can not manage compass data, only GPS and AIS data.


RE: Importing I2C data - solosails - 2020-04-17

(2020-03-24, 11:00 AM)Sailoog Wrote: At this moment only this sensors are supported by I2C app:
BME280
MS5607-02BA03
We will add more soon.

Compass is managed by pypilor app and these are the supported models:
https://github.com/openplotter/RTIMULib2

GPSD can not manage compass data, only GPS and AIS data.

Hi, Is there a way to add ones own ? I had a quick look at the source files and can see the entry for I2C looks reasonably straight forward (not that I am a coder) - is this just a case of adding an I2C python script to the folder and connecting it up? 

Are you able to give a very brief summary of how one would go about adding an I2C sensor manually please? Thanks!


RE: Importing I2C data - Sailoog - 2020-04-17

I am afraid more changes have to be done in i2c app core code to add more sensors. Besides this I need to make important changes before adding the new sensors to be able to manage extra parameters in some of them. What sensors are you thinking of?


RE: Importing I2C data - ckon - 2020-04-18

(2020-04-17, 07:20 PM)Sailoog Wrote: I am afraid more changes have to be done in i2c app core code to add more sensors. Besides this I need to make important changes before adding the new sensors to be able to manage extra parameters in some of them. What sensors are you thinking of?

I do not want to hijack the thread, but I am thinking of the bme680 (similar to the bme280) and the I2C Digital Wattmeter based on the TI INA219 for the 12V monitoring.

Thank you,
-C


Importing I2C data - tkurki - 2020-04-19

SensESP is also an option. Lately there’s been a flurry of activity adding new sensors.


https://github.com/SignalK/SensESP

Maybe worth adding a pointer to SensESP in OpenPlotter documentation? It allows adding sensors without wiring to the Pi.


RE: Importing I2C data - deanfourie - 2020-04-19

By all means hijack the thread haha. This system is in desperate need of additional sensor support!!


RE: Importing I2C data - solosails - 2020-04-20

(2020-04-17, 07:20 PM)Sailoog Wrote: I am afraid more changes have to be done in i2c app core code to add more sensors. Besides this I need to make important changes before adding the new sensors to be able to manage extra parameters in some of them. What sensors are you thinking of?

Hi Sailoog, Thanks for the reply.

I have just purchased a Adafruit INA260  in order to monitor the batteries voltage level. I don't need to measure amps, just the state of the batteries. 

If there is an easy way to add this in? or perhaps if you can give me a brief list of files that need to be created to add it myself - that would be great - thanks!


RE: Importing I2C data - Sailoog - 2020-04-22

(2020-04-19, 12:33 PM)tkurki Wrote: SensESP is also an option. Lately there’s been a flurry of activity adding new sensors.


https://github.com/SignalK/SensESP

Maybe worth adding a pointer to SensESP in OpenPlotter documentation? It allows adding sensors without wiring to the Pi.

Yes, we could add this to all openplotter apps using sensors connection as a kind of advanced option.


RE: Importing I2C data - Sailoog - 2020-04-22

(2020-04-20, 09:38 AM)solosails Wrote:
(2020-04-17, 07:20 PM)Sailoog Wrote: I am afraid more changes have to be done in i2c app core code to add more sensors. Besides this I need to make important changes before adding the new sensors to be able to manage extra parameters in some of them. What sensors are you thinking of?

Hi Sailoog, Thanks for the reply.

I have just purchased a Adafruit INA260  in order to monitor the batteries voltage level. I don't need to measure amps, just the state of the batteries. 

If there is an easy way to add this in? or perhaps if you can give me a brief list of files that need to be created to add it myself - that would be great - thanks!

The plan before the apocalypse was to make the required changes in openplotter-i2c app to allow extra parameters for some sensors (INA family need them) but I have not sensors and instruments to develop this at home/prison. The situation is getting better here in Catalonia but I will not be able to go to the office without risk in 2 weeks.

So the answer is no, there is not a fast and easy way. You need python skills to modify this code to add more sensors but you should wait for my changes: https://github.com/openplotter/openplotter-i2c

sorry