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
[SOLVED] i2c app wont open
#1
Hi,

the i2c app  (2.1.0)  on my system wont open. I'm on Pi 4, tried to open it from Terminal. First Error was "Could not open file /dev/i2c-0...". After adding i2c-0 to the config text, this is gone, but now i still get 

File "/usr/lib/python3/dist-packages/openplotterI2c/openplotterI2c.py", line 222, in readSensors
    if i['pipeElements'][0]['options']['type']=='SignalK':
KeyError: 'type'

There is no entries under [i2c] in openplotter.conf.
Any Ideas how to fix it?

Thanks!
Reply
#2
"After adding i2c-0 to the config text, this is gone"

That error is expected and just informative so remove what you have done in config file to avoid collateral effects.

I think I know what happens, please could you post here the contents of /home/pi/.signalk/settings.json file?
Reply
#3
(2020-04-03, 11:26 AM)Sailoog Wrote: "After adding i2c-0 to the config text, this is gone"

That error is expected and just informative so remove what you have done in config file to avoid collateral effects.

I think I know what happens, please could you post here the contents of /home/pi/.signalk/settings.json file?

Hi,

here is the settings.json content:


Code:
{
 "mdns": false,
 "pipedProviders": [
   {
     "id": "gpsdProvider",
     "pipeElements": [
       {
         "options": {
           "hostname": "127.0.0.1",
           "port": 2947,
           "providerId": "gpsdProvider"
         },
         "type": "providers/gpsd"
       },
       {
         "optionMappings": [
           {
             "fromAppProperty": "selfId",
             "toOption": "selfId"
           },
           {
             "fromAppProperty": "selfType",
             "toOption": "selfType"
           }
         ],
         "type": "providers/nmea0183-signalk"
       }
     ]
   },
   {
     "enabled": true,
     "id": "st2nmea",
     "pipeElements": [
       {
         "options": {
           "logging": false,
           "subOptions": {
             "baudrate": 38400,
             "device": "/dev/ttyOP_st2nmea",
             "type": "serial",
             "validateChecksum": true,
             "providerId": "st2nmea",
             "toStdout": "nmea0183out"
           },
           "type": "NMEA0183",
           "providerId": "st2nmea"
         },
         "type": "providers/simple"
       }
     ]
   },
   {
     "pipeElements": [
       {
         "type": "providers/simple",
         "options": {
           "logging": false,
           "type": "NMEA0183",
           "subOptions": {
             "validateChecksum": true,
             "type": "udp",
             "port": "10110",
             "sentenceEvent": "ais"
           }
         }
       }
     ],
     "id": "ais",
     "enabled": true
   }
 ],
 "vessel": {
   "brand": "Buchanan",
   "dimensions": {
     "depthTransducer": 0.5,
     "keel": 1.85,
     "length": 11,
     "mast": 15,
     "width": 2.85
   },
   "name": "Nutria",
   "type": "36",
   "uuid": "urn:mrn:signalk:uuid:c0d79334-4e25-4245-8892-54e8ccc8021d"
 },
 "interfaces": {
   "appstore": true,
   "logfiles": true,
   "nmea-tcp": true,
   "plugins": true,
   "providers": true,
   "rest": true,
   "tcp": true,
   "webapps": true,
   "ws": true
 },
 "wsCompression": false,
 "enablePluginLogging": true,
 "pruneContextsMinutes": 60
}
Reply
#4
Thanks strly,

Interesting, it seems that your GPSD connection in Signal K server is causing the crash of i2c app. I will fix this and will send you a test package.

Is this GPSD connection working? that is an old connection that was not ported to the Signal k server GUI, wondering if it would be worth adding a GPSD option in SK GUI. Tkurki?
Reply
#5
Test this package, it should fix your problem:
https://launchpad.net/~sailoog/+archive/...le_all.deb
Please report so we can go to production.
Reply
#6
(2020-04-05, 12:19 PM)Sailoog Wrote: Test this package, it should fix your problem:
https://launchpad.net/~sailoog/+archive/...le_all.deb
Please report so we can go to production.


Perfect, works fine! Yes, the gpsd provider is working.
Now, as I wanted to use i2c for the INA219 current sensor: is there a way to add it in the i2c-app?

Thank you!
Reply
#7
OK, thanks!

Adding support for the INA219 is in the TODO list but I do not have neither the sensors nor instruments required to develop this at home/prison. Here in Catalonia there is a total lockdown and I will not be able to go to the lab until April 13 at least Sad

Marking this thread as solved.
Reply
#8
FYI. GPSD connections have been added to Signal K server 1.27.1. You should replace your manual GPSD connection.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)