Fix for openplotteri2cRead service GPIO error
I was getting a GPIO error with the openpiloti2cRead service on a PI5. I added 2 SignalK keys for the BMP280 pressure and temperature, but the i2cRead service stops running. The issue occurs in the lgpio.py script, when calling open on file 'lgd-nfy{}' (line 504).
The problem is that the service and therefore the lgd-nfy{} pipe has a default working directory of root /.
The fix is to specify the pi user's home directory for the service by adding the line:
WorkingDirectory=/home/pi
to the [Service] block in file /etc/systemd/system/openplotter-i2c-read.service.
I can now see .lgd-nfy0 in /home/pi and SignalK is showing the data.
Should a bugfix be raised for this? I have only just starting working with the OpenPlotter codebase although I am an experienced software developer. A similar fix, although not to the workingdirectory, is in an OpenMarine post https://forum.openmarine.net/showthread.php?tid=6149
1 Reply
OpenPlotter related discussion is concentrated at https://forum.openmarine.net/ so may not get a proper response here
...but if I were you i'd create an issue or a PR in openplotter's repo where that particular piece of code is mastered