I recently purchased a GrovePi Zero and expected this to be a reasonable straight forward way to connect Grove sensors to your Raspberry Pi, read sensor values via Python and pushing them upstream via MQTT. However the software side of things turns out anything but straight forward. Most of the suggestions on the Dexter Industries forum suggest to download some custom OS image – WTF? Hopefully this will save some people time to chase down the same rabbit holes…..

The problem starts with the install scripts which (a pet hate of mine) assume the /home/pi account to be present. There is a variable in at least the 2 of the install scripts (another Github repository – one calls another from a Github URL – like that will ever work ???) which allows you to change the user account but there is also hard-coded references all over the place that still point to that user account. Trying to step manually through the dependency hell in these install scripts that call other scripts ended to be a complete nightmare. It seems to download specific (old !?!) versions of libraries all of which have perfectly fine binaries in the Raspbian repos. Most of the troubleshooting tips use the UI which is not much good on a headless system.

Since all I wanted was to read the sensors from Python I found that there was a library on PyPi (https://pypi.python.org/pypi/grovepi) which should actually do this without installing all this redundant dependencies on what is essentially a remote sensor aggregator. Got hopes up too quickly. Unfortunately turns out that the firmware on these devices is really old and riddled with bugs (could not read from most sensors I tried and all were known issues fixed in later firmware releases. Trying to manually install some of the dependencies (such as avrdude which are all in the Raspbian repositories) for the simple firmware update script turned out useless as they use a custom ‘gpio’ programmer not present. If you are splitting things into multiple Github repositories (which is in itself a good idea) why don’t be consistent about it and create one for the firmware updater alone? You shouldn’t have to compile half of Github on a low-powered device just to flash a firmware file.

Looks like the only solution is to bite the bullet and get another SD card with a default Raspbian image and go through the whole painful experience of installing the whole dependency hell and compiling everything on a RaspberryPi Zero which is like watching paint dry. Hopefully this should then just work on another device that only needs the Python library as a dependency.

Let’s hope so… [will update once finished jumping through all the hoops]

Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.