Here are instructions for compiling it on the RPi3B+:
sudo su
cd /var/lib/grafana/plugins
git clone https://github.com/grafana/grafana-image-renderer
cd grafana-image-renderer
Now we’ll update npm
, just in case:
npm -g install npm
Now we’ll install yarn
and typescript
:
npm -g install yarn
npm -g install typescript
The following line is essential for compiling the plugin’s dependencies on a RPi3B+ on openhabian buster:
npm config set unsafe-perm=true
We can now at last add the Node.JS dependencies to compile the plugin:
npm i grpc
npm i husky
npm i puppeteer
npm i postinstall
npm i install
npm install
Time to edit add // @ts-ignore
above 2 TypeScript lines (see above):
cd src
nano grpc-plugin.ts
And now we can build the plugin:
cd ..
yarn run build
Copy plugin_start_linux_amd64
as plugin_start_linux_arm
and restart the Grafana server:
cp plugin_start_linux_amd64 plugin_start_linux_arm
systemctl restart grafana-server.service
After 10 seconds, verify that the plugin has been loaded successfully:
systemctl status grafana-server.service
Look for the following log lines:
Nov 24 12:11:58 openhab grafana-server[18874]: t=2019-11-24T12:11:58+0100 lvl=info msg="Renderer plugin found, starting" logger=rendering cmd=plugin_start_linux_arm
. . .
Nov 24 12:12:00 openhab grafana-server[18874]: t=2019-11-24T12:12:00+0100 lvl=info msg="Renderer plugin started" logger=rendering timestamp=0001-01-01T00:00:00.000Z
Have fun!