Hey guys,
I was able to take @DaanNL’s code and compile it. Moreover I forked his fork and improved the build process. You can now cross compile vhduino on a linux box or directly compile it on a Raspberry Pi using make.
To cross compile on a linux box just do:
$ make
To compile on a Raspberry Pi do:
$ make -f Makefile.rpi
The detailed build process and prerequisites are documented in my fork: https://github.com/layereight/virtualhomeduino
Would be great if some of you guys give it a try and tell me if it works. Take the compiled vhduino binary and replace the existing binary in the plugin on your Pi, e.g.:
$ sudo cp vhduino /home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/bin/vhduino
I tested the build and the binary on a Raspberry Pi 2 (Raspbian Stretch 2017-09-07, kernel 4.9.41-v7+) and a Raspberry Pi Zero (Raspbian Jessie 2017-02-16, kernel 4.4.48+).
I tested the cross compile build on my linux box (Ubuntu 17.10). I also tested the cross compiled binary on the two Pis.
Btw, I didn’t take a deeper look into @DaanNL’s code, but I had to adapt it slightly.