Posts: 3
Threads: 1
Joined: Jan 2020
Reputation:
0
2020-04-02, 08:09 PM
(This post was last modified: 2020-04-05, 12:58 PM by Sailoog.)
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!
Posts: 2,900
Threads: 59
Joined: Mar 2016
Reputation:
278
2020-04-03, 11:26 AM
(This post was last modified: 2020-04-03, 11:26 AM by Sailoog.)
"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?
Posts: 3
Threads: 1
Joined: Jan 2020
Reputation:
0
(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
}
Posts: 2,900
Threads: 59
Joined: Mar 2016
Reputation:
278
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?
Posts: 2,900
Threads: 59
Joined: Mar 2016
Reputation:
278
Test this package, it should fix your problem:
https://launchpad.net/~sailoog/+archive/...le_all.deb
Please report so we can go to production.
Posts: 3
Threads: 1
Joined: Jan 2020
Reputation:
0
(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!
Posts: 2,900
Threads: 59
Joined: Mar 2016
Reputation:
278
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
Marking this thread as solved.
Posts: 2,900
Threads: 59
Joined: Mar 2016
Reputation:
278
FYI. GPSD connections have been added to Signal K server 1.27.1. You should replace your manual GPSD connection.
|