-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Basic Troubleshooting
There does not yet exist a way to do systematic troubleshooting. However, we encourage you to isolate your issues into the smallest parts possible and come up with a way to test each issue.
For example, if you have permissions trouble or errors installing npm, solve that problem first by using any error messages to search for solutions. Once that problem is solved, move on to the next problem.
- Home
- Debug Mode
- Validate
config.json
Format - Understanding Where Your Files Are (macOS)
- Reset Pairing/Accessories
- Home Can't Connect To Accessory
- Examine Logs For Errors
- Error - Not A Valid Username
- Error -
EADDRINUSE
- Best HomeKit App
- Home
- NPM Registry Issues
- Eero Routers
- Multiple Instances Of Homebridge Found Installed
- Unable To Find Homebridge Installation
- Error -
update-node
- Your Version Of Linux Does Not Meet The GLIBC Version
To run Homebridge in full debug mode run the following command DEBUG=* homebridge -D
.
By far the most common issue new Homebridge users run into is formatting their configuration file. Many users will have misplaced a comma for example.
To prevent these errors, use an online JSON validator like JSON Lint or one of the many utilities here: Google Search: Json Validator
As a side effect, most utilities format your configuration.
Users running Homebridge on macOS may have difficulty locating their Homebridge install and logs. This is because Homebridge is installed in a hidden folder that begins with a period: .homebridge
By default, macOS hides folders and files that start with a "period". To toggle the visibility of these hidden files and folders, open a finder window and use the following shortcut: cmd-shift .
Once hidden file/folder visibility is toggled to the on position, navigate to Users/Your_Username
and the .homebridge
folder will be visible.
Configuring Homebridge with platforms and accessories typically requires a lot of trial and error. This applies both to the software setup, and adding accessories to HomeKit.
If you are stuck, you can reset Homebridge/HomeKit and start again. Here's how:
- Delete any Homebridge platforms/accessories from your Home app.
- Delete/remove any homebridge platforms/accessories from HomeKit.
- Delete all the files in the
.homebridge/persist
and.homebridge/accessories
. Eg.cd ~/.homebridge rm -rf persist
. If you prefer using a GUI to access the files useopen ~/.homebridge
. - Change your username in the
config.json
file. - Restart your computer/server (advanced users can quit/restart Homebridge and any boot processes rather than reboot).
Once you have Homebridge successfully running, you may also get errors in the Home app when adding accessories. One common error occurs after scanning the QR code. While trying to connect for 20 seconds or so, the following error is displayed: Home couldn't connect to this accessory
.
This appears to result from some cache issue in the Home app as resetting Homebridge (above) does not resolve the issue. This WiFi trick appears to work however:
- Reset Pairing/Accessories as described above.
- On your iOS device, use the
Forget Network
feature in your WiFi settings. - Rejoin your WiFi network.
- Attempt to add the Homebridge platforms/accessories as you normally would.
This error can also occur when mDNS needs to be configured, e.g. when Avanti needs to be set up on Linux.
Potential Solution 2 (User Solution, thanks @flowoy96!)
I opened Container Manager (DSM7) on my Synology NAS and stopped the container. I deleted it and started a new one. I did NOT remove the settings and files from the mounted folder, so I was able to keep my configuration. When starting the new container, I switch the network setting from "bridge" to "host". After that, the container had the correct IPv4 (my NAS's address) and I was able to connect to the UI :8581. Then I could easily add Homebridge to HomeKit and everything was exposed correctly.
Homebridge logs to:
/var/lib/homebridge/homebridge.log
PROTIP: Unix has the tail
command, which makes it nice to see logs in real-time.
Assuming you have Homebridge running, from that server run one of the following commands to see what is getting logged live.
tail -f /var/lib/homebridge/homebridge.log
This error results from a problem in the config.json file and may look something like this:
Receiving " Error: Not a valid username: DD: 33: 4E: F4: DF: 31 . Must be 6 pairs of colon-separated hexadecimal chars (A-F 0-9), like a MAC address."
In this example, the issue is the second "D". The correctly formatted version would look like "D3:33:4E:F4:DF:31".
This error is a Generic TCP/IP message thrown by Node.js apps trying to listen on a port already being listened to. This is normally caused by a homebridge process running in the background without you realizing it. If you've set your homebridge install to run when your system starts up, try removing this until your setup/config is complete.
Originally (2016) there was some discussion about apps to use to manage homekit apps. However, many people are simply using Apple's native Home app. This is the best choice for beginners.
Alternatives to Home that are well-rated and actively developed as of this writing (Jan 2019) include Home 3 (paid) and Home Assistant (the latter is for super-advanced users who are running home-assistant.io and have integrated their homekit devices into home assistant).
- Raspberry Pi
- Debian, Ubuntu
- CentOS, Fedora, Red Hat
- Arch, Manjaro
- macOS
- Windows 10 / 11 (Hyper-V)
- Docker
- Synology DSM 7
- Other Platforms
- Basic Troubleshooting
- Backup and Restore
- Child Bridges
- Config File
- Connect To HomeKit
- FFmpeg for Homebridge
- HomeKit Glossary of Terms
- iOS Homemanager App
- mDNS Options
- Remote Access
- Useful Links
- Basic Troubleshooting
- Config Options
- Enabling Accessory Control
- Enabling UI with Docker
- Homebridge Service Command
- Manual Configuration
- Reverse Proxy: Apache
- Reverse Proxy: Nginx and SSL
- Standalone Mode
- Swap From Standalone To Service Mode
- Developer Docs
- API Reference
- Plugin Templates
- Other Links (Internal)
- Other Links (External)