It is an old topic. Not sure if it will be helpful to Warren et al. Just wants to share my experience struggling with hap-nodejs with my omega2+. Obviously you need to setup the compilers on the omega2+. Please see the documentation on setting up a compiler for details. It turns out that 128M ram does not cut it either. So you also need to set up a swap file or a swap partition. Again, please check the documentation for how to do that. At last, Omega2's C compiler does not need the -lpthread. In fact, there is no libpthread provided. Just create a dummy libpthread.so, like using a C file as this:
static void __dummy()
Say, you save it as dummy.c, and compile it as
gcc -c -fPIC -o dummy.o dummy.c
gcc -shared -fPIC -Wl,soname,libpthread.so -o libpthread.so dummy.o -lc
I ended up using my RPI 3 to run homebridge and used the script plugin to contact my omega2+.
The on script: ssh root@omega-ABCD.local "relay-exp 0 1"
The off script: ssh root@omega-ABCD.local "relay-exp 0 0"
Initially the delay was noticeable due to the new ssh connection every time but then I used the ControlMaster feature of OpenSSH, which opens a unix domain socket for the first connection and reuses this connection in all subsequent calls.
The achieve this you should place this in your ~/.ssh/config of the RPI 3 that will contact the omega2+:
# I chose to persist it for 5 days
It is now very responsive and I don't wast a full RPI to this single button
Looks like your connection to Community was lost, please wait while we try to reconnect.