Guide: Install HomeBridge on Firewalla

Follow

Comments

75 comments

  • Avatar
    Michael Turchin

    Home Assistant would be nice to install as I do not have a HomePod or Apple TV to act as the base station for HomeKit.

    1
    Comment actions Permalink
  • Avatar
    sk0rp10

    Great guide! I have got it all working … almost! I am trying to workout why is that a plug-in I am trying to use is being denied opening a UDP socket (and thus fails). Any suggestions @firewalla? Are there particular restrictions that might cause this? (I am on firewalla gold)

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @sk0rp10 what plugin? 

    0
    Comment actions Permalink
  • Avatar
    sk0rp10

    Michael, it’s Nest SDM

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @sk0rp10 ah. I have other nest stuff, but not their cameras so I don't know how I can really test this. 

    0
    Comment actions Permalink
  • Avatar
    sk0rp10

    The plugin doesn't really matter, @Michael, the issue is generically described here, which was opened for a different one: https://github.com/Sunoo/homebridge-camera-ffmpeg/issues/1087 

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @sk0rp10 nothing shows in that github issue.

    I install ffmpeg in my homebridge startup.sh script if that's of any help. 

    if ! [ -x "$(command -v ffmpeg)" ]; then
    sudo curl -Lf# https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-$(uname     -m).tar.gz \
    | sudo tar xzf - -C / --no-same-owner
    else
    echo "ffmpeg is already installed."
    fi
    0
    Comment actions Permalink
  • Avatar
    sk0rp10

    Okay, basically it’s an issue with the get-port api. It’s discussed in the thread I linked . Nothing to do with ffmpeg either

    0
    Comment actions Permalink
  • Avatar
    sk0rp10

    @Michael if it helps, here's the GitHub Issue where we're discussing this problem with the author of the Nest SDM plugin: https://github.com/potmat/homebridge-google-nest-sdm/issues/31 

    0
    Comment actions Permalink
  • Avatar
    Patrick Burtchaell

    Thanks for the tutorial! Super easy to follow. Homebridge is running on my FWG and I'm able to access the Homebridge UI. However, it looks like there's some DNS issue blocking Homebridge from accessing the npm registry, making it so I can't install plugins.

    I'm getting this error in the Homebridge logs:

    Failed to check registry.npmjs.org for updates: "getaddrinfo EAI_AGAIN registry.npmjs.org" - see https://homebridge.io/w/JJSz6 for help.

    Do you know if this this caused my FWG config or something else?

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @patrick can you try the following from the device running homebridge? 

    dig registry.npmjs.org
    ping registry.npmjs.org
    0
    Comment actions Permalink
  • Avatar
    Patrick Burtchaell

    @Michael, those seem to be working. Response for dig:

    ; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> registry.npmjs.org
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1822
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 12, AUTHORITY: 0, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 512
    ;; QUESTION SECTION:
    ;registry.npmjs.org. IN A

    ;; ANSWER SECTION:
    registry.npmjs.org. 101 IN A 104.16.17.35
    registry.npmjs.org. 101 IN A 104.16.23.35
    registry.npmjs.org. 101 IN A 104.16.19.35
    registry.npmjs.org. 101 IN A 104.16.18.35
    registry.npmjs.org. 101 IN A 104.16.26.35
    registry.npmjs.org. 101 IN A 104.16.24.35
    registry.npmjs.org. 101 IN A 104.16.21.35
    registry.npmjs.org. 101 IN A 104.16.25.35
    registry.npmjs.org. 101 IN A 104.16.20.35
    registry.npmjs.org. 101 IN A 104.16.16.35
    registry.npmjs.org. 101 IN A 104.16.27.35
    registry.npmjs.org. 101 IN A 104.16.22.35

    ;; Query time: 7 msec
    ;; SERVER: 68.105.28.11#53(68.105.28.11)
    ;; WHEN: Wed Nov 16 12:44:18 CST 2022
    ;; MSG SIZE  rcvd: 239

    Response for ping:

    PING registry.npmjs.org(2606:4700::6810:1723 (2606:4700::6810:1723)) 56 data bytes
    64 bytes from 2606:4700::6810:1723 (2606:4700::6810:1723): icmp_seq=1 ttl=58 time=19.5 ms
    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Patrick 

    Can you check a few settings?
    1. Network Manager [WAN name ] > Edit > Primary & Secondary DNS. These can be the DNS provider of your choice or empty. If empty, it goes to your ISP's DNS settings. If you set them this will be used for devices that aren't DoH, Unbound, or assigned to Family protect.
    2. Network Manager [LAN name ] > Edit > Primary & Secondary DNS The Primary DNS should be set to the LAN IP. So if your LAN is 192.168.0.1 set it to the same. Secondary can be empty. This says all DNS should go through Firewalla and let it decide.
    3. Make sure Settings > Advanced > Configurations > DNS Booster is turned on.
    4. Check ipinfo.com and see if it shows 68.105.28.11
    0
    Comment actions Permalink
  • Avatar
    Patrick Burtchaell

    @Michael, steps 1-3 done, but my ipinfo is not showing 68.105.28.11.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Patrick, Is 68.105.28.11 your ISP DNS? 

    0
    Comment actions Permalink
  • Avatar
    Patrick Burtchaell

    @Michael, correct. 68.105.28.11 is my ISP DNS and the primary DNS server under my WAN configuration.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Patrick can you try 

    ping registry.npmjs.org

    In the homebridge terminal 

    0
    Comment actions Permalink
  • Avatar
    Patrick Burtchaell

    I'm getting:

    root@firewalla:/var/lib/homebridge $ ping registry.npmjs.org
    ping: registry.npmjs.org: Temporary failure in name resolution
    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Patrick, That would do it. Something is not set up correctly. The fastest thing would be to uninstall and install using a script that I wrote. 

    github.com/mbierman/homebridge-installer

     

     

    0
    Comment actions Permalink
  • Avatar
    Patrick Burtchaell

    That fixed it, thanks!

    1
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Patrick,

    🎉 🥂 Excellent! enjoy. 

    0
    Comment actions Permalink
  • Avatar
    Mark Besecker

    Hello, 

    Is it possible to add the HomeBridge to your Apple Home app via VPN?  I have been messing around for a couple hours today with the firewalla having HomeBridge installed directly on it, VPNed to the firewalla, on paper I'd imagine this should be able to communicate since you're connecting directly to the server (originally I was trying to do it with HomeBridge hosted on my NAS and I was thinking the subnet difference was causing communication issues).  However I can't for the life of me have it detect the HomeBridge hosted hub.  

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    Hi Mark,

    Not sure I follow your question. What are you trying to do exactly?

    0
    Comment actions Permalink
  • Avatar
    Mark Besecker

    Hi Michael,

    Thank you for responding. I have a garage door opener set up on HomeBridge and I wanted to add it to the Apple Home app in order to open and close it once logged in via VPN.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    HomeKit doesn’t require VPN. Your hub will take care of this.

    0
    Comment actions Permalink
  • Avatar
    Mark Besecker

    Understood, I was trying to do this without an official hub and direct connect to the firewalla that was hosting the homebridge, but it looks like it still communicates to the Apple app via mDNS/Bonjour or some method that isn't transferrable through VPN normally.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    Hey Mark, 

    Ah! So I haven't tried it, but I don't think homebridge alone is sufficient for that. Also, I don't think Bonjour does well over VPN. Apple expects any homekit environment to have at last one hub: 

    • Apple TV
    • Apple iPad
    • HomePod mini or HomePod
    0
    Comment actions Permalink
  • Avatar
    Mark Besecker

    Hi Michael,

    Thanks for reviewing. I’m miffed because I was able to get this working with a SmartThings hub when I had an Android phone but with the different ecosystem there’s no crossover compatibility and you need the Apple equivalent hub now. It makes sense it would still need a hub. I bit the bullet last night and bought a HomePod mini to be delivered this week. Thanks again!

    0
    Comment actions Permalink
  • Avatar
    Sergio Lopez

    Hello,
    I'm having issues and I don't even know where to begin or what information to provide to help in troubleshooting.

    I had homebridge running fine on my Firewalla. A few months ago, I noticed I could no longer use it or even login in the UI. I finally got around to ssh into the Firewalla. Everything is there without modification, but I can't not see the docker running. A similar issue is happening with my Pi-Hole (the only two dockers I have installed).  Could it be something happenign with the Firewalla?

    What can I do to troubleshoot why my dockers aren't running?

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @sergio, 

    You could do:

    sudo docker ps 

    And see if it is running. However, unless you want to learn how to debug docker in general and this one specifically, the easiest thing to do is re-install it either using this guide or a script I wrote, github.com/mbierman/homebridge-installer 

    You may want to uninstall first just so nothing is left behind that might cause issues. There's an uninstall script in my installer as well. 

    0
    Comment actions Permalink

Please sign in to leave a comment.