Using Omega with HomeKit bridge project
I bought my omega in hopes of using it as a HomeKit bridge using this Homebridge project. I'm pretty new to this stuff, but I was able to get homebridge working in a linux virtual machine. It seems like OpenWRT uses completely different commands so I'm at a loss.
Anyone want to help a newbie out?
Hi @lessphiling, we will be uploading Node to our repo within this week, then it should be possible to run this project on the Omega.
Thanks @Boken-Lin, will there be an announcement of some kind or should I keep an eye on the forums?
@lessphiling We will be making an announcement via the forum.
@Boken-Lin I did the software update, installed node and git, I tried the following and got an error. Is there something else to install?
root@Omega:~# npm install -g homebridge
-ash: npm: not found
Thanks for your help!
@lessphiling We are still working on npm. The npm that works with nodejs 0.10.x (the version that we currently have on our repo) is very old, and has a few problems. We might just release the npm for 0.12.x when we release nodejs 0.12 in couple weeks, and skip the npm for node 0.10.x. Also, installing homebridge with npm directly on the Omega won't work because it requires node-gyp to compile some C/C++ code to binary. We are working on a private npm repository with crossed-compiled binary of npm modules.
For now, to get homebridge to work, you will need to manually cross-compile some modules required by hap-nodejs, which is itself required by homebridge.
@lessphiling Did you ever get this working?
@Boken-Lin Are there current docs that cover how to exactly do this?
any update about this topic?
Hello. Is any progress?
Because. I don't want to buy Raspberry Pi 3. Omega is cheaper.
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
ControlMasterfeature 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/configof the RPI 3 that will contact the omega2+:
Host * ControlMaster auto ControlPath ~/.ssh/master-%r@%h:%p # I chose to persist it for 5 days ControlPersist 432000s
It is now very responsive and I don't wast a full RPI to this single button