I got some sensors on a grovepi (RPI 3) and I am using them in order to see their values online.
So, I’m doing a script in Python to put the values on Munin ( http://munin-monitoring.org/).
First, I tried some Python scripts and it works (https://gist.github.com/tomoconnor/813813)
But, I think I am not able to insert the following line in the script : import grovepi
I got this error :
pi@dex:~ $ sudo munin-run tmp_number
Traceback (most recent call last):
File “/etc/munin/plugins/tmp_number”, line 6, in
File “build/bdist.linux-armv7l/egg/grovepi.py”, line 66, in
bus = smbus.SMBus(1)
IOError: [Errno 13] Permission denied
Apparently, it’s a problem of permission but I can execute any scripts from the sensors in any files, so I got the permission with i2c. I think the problem comes from munin because I have to put my code only in this directory : /etc/munin/plugins/nameofthefile
Some doc on the config on Munin : http://www.aymerick.com/2013/12/25/munin_client_on_raspberrypi.html
I forgot to say that I can execute the script in Python ( sudo python tmp_number) but I can’t launch it with munin.