Estimated reading time: 11 minutes
Have you ever wondered why you need an expensive Philips Hue Bridge when you already have a powerful home assistant server? Maybe you use Zigbee2MQTT and have dozens of inexpensive light bulbs from IKEA, Lidl or Sonoff in use, but sorely miss the beautiful, intuitive user interface of the Philips Hue app?
Until now, there has been a strict division here: either you use the open, powerful Zigbee2MQTT universe with its huge device compatibility, or you stay in the Philips Hue „golden cage“ to enjoy functions such as Hue Entertainment, Sync and app control.
Enough of this!
There's a new sheriff in town, and his name is Bifrost. As the name from Norse mythology suggests, this ingenious tool builds a bridge. A bridge between your Zigbee2MQTT installation and the world of Philips Hue. The promise: Home Assistant becomes your Hue Bridge. No additional hardware, no restrictions on the choice of lamps and full control over your lighting.
In this extremely detailed guide, I'll show you what Bifrost is, how to install it, what requirements you need to fulfill and - most importantly - what the limits are. Make yourself comfortable, let's take a deep dive!
For detailed instructions and explanations of all configuration options, I recommend watching the YouTube video linked below. This video goes into detail about each individual setting, providing you with comprehensive instructions on how to set everything up correctly. Any code from the video can be found in this article, so you can use it directly without having to type it out.
This blog post, including video, is part of a series in which we build and set up our own home server. We start with the basics, such as installing Ubuntu VM with Docker, and then move on to configuring our own domain, security measures, and, above all, lots of cool and useful self-hosted services. Whether it's media servers like Plex or Jellyfin or document management like Paperless-NGX, we'll work together to build the setup you want to see. We'll even tackle topics like single sign-on (SSO) together.
What is Bifrost actually?
Bifrost is a piece of software (an emulator) that behaves exactly like a real Philips Hue Bridge in the network. When you open your Hue app on your smartphone and search for a new bridge, Bifrost „shouts“ in the network: „Here I am, I am a Hue Bridge V2!“.
The highlight: Bifrost itself has no radio antennas. Instead, it connects in the background with your Zigbee2MQTT (Z2M) Server. When you switch on a lamp in the Hue app, Bifrost translates this command at lightning speed and sends it to Zigbee2MQTT, which then controls the actual lamp.
The genius of it: The Hue app doesn't care whether the lamp behind it is a genuine €50 Philips Hue bulb or a €5 LED strip from a discount store. As long as Zigbee2MQTT recognizes the lamp, the Hue app „thinks“ it is a compatible lamp.
The core features at a glance:
- Cost savings: You can sell the real Hue Bridge or put it in the cupboard.
- Hue app support: Use the official app for all your Zigbee devices.
- Entertainment Areas: Yes, you read that right. Bifrost supports the streaming protocol for Hue Sync (more on this later).
- Zigbee groups: Bifrost uses real Zigbee broadcasts for groups. If you switch off the „living room“, all the lights go out at the same time not one after the other (the so-called „popcorn effect“ is eliminated).
The requirements: What you need
Before we get to the installation, we need to make sure that your smart home is ready for Bifrost. As Bifrost is „only“ an intermediary, the base must be in place.
1. home assistant (OS or supervised)
We concentrate here on the installation as Home Assistant Add-on. This is the easiest way for most users. Your Home Assistant should be up to date.
2. Zigbee2MQTT (mandatory!)
This is the most important point that many people overlook: Bifrost does NOT work with ZHA (Zigbee Home Automation) or deCONZ. It is mandatory to Zigbee2MQTT instructed. Why? Because Bifrost communicates directly with the Z2M API via WebSockets to query the status of the lamps and send commands.
- You need a running MQTT broker (e.g. Mosquitto).
- You need a running instance of Zigbee2MQTT.
- Your lamps must already be taught and controllable in Zigbee2MQTT.
The restrictions: What is NOT possible?
Before you get started, we need to talk about the downsides. Transparency is important so that you are not disappointed.
1. no new devices via the Hue app
This is the biggest „mindset shift“: In the Philips Hue app, you can not Click on „Add luminaire“ and wait for something to happen.
- The workflow is: You learn a new lamp in Zigbee2MQTT on. As soon as it exists there, Bifrost automatically recognizes it and presents it to the Hue app.
- The Hue app is therefore only your „remote control“, no longer your „admin tool“ for learning.
2. dependency on Zigbee2MQTT
If your Z2M crashes or the stick fails, your „Hue Bridge“ is also dead. The system becomes more complex as more software components interlock.
3. firmware updates
Logically, you cannot use the Hue app to install firmware updates on your lights, as they are not real Hue components on a real bridge. You can still make updates conveniently via the Zigbee2MQTT front end (OTA updates).
4. Hue accessories (switches/sensors)
Bifrost focuses primarily on Lights. Hue dimmer switches or motion detectors that you have in Z2M do not necessarily appear as configurable devices in the Hue app. It's better to automate these directly in Home Assistant. The Hue app is really only used for lighting control and scene creation.
Installation: Bifrost as a Home Assistant add-on
Enough theory, let's roll up our sleeves. The installation is done via a custom repository in the Home Assistant Add-on Store.
Source: https://github.com/chrivers/bifrost-hassio
1. add repository
- Open your Home Assistant.
- Navigate to Settings -> Add-ons.
- Click on the button at the bottom right „Add-on Store“.
- Click on the three dots at the top right and select „Repositories“.
- Paste the following URL into the field:
https://github.com/chrivers/bifrost-hassio - Click on Add.
2. install add-on
- Reload the page of the add-on store (F5 or pull down).
- Scroll to the bottom or search for „Bifrost“.
- Click on the add-on and then on Install.
- Wait a moment, the Docker image needs to be downloaded.
- IMPORTANT: Activate „Watchdog“ so that the add-on restarts if it crashes. However, start the add-on not yet!
3. prepare Zigbee2MQTT
Bifrost needs to know where to find Z2M.
- Go to your Zigbee2MQTT add-on in the „Configuration“ tab.
- Make sure that under the item
frontenda port is defined (default is often8080or8099). - Bifrost does not connect via MQTT, but via the WebSocket of the front end. Make a note of this port and the IP of your Home Assistant.
Configure Bifrost
Go back to the Bifrost add-on in the tab Configuration. You will see a YAML configuration. You need to customize this. A minimal example looks like this:
bridge:
name: "Bifrost Bridge"
mac: "52:54:00:1e:be:f5" # see below the code
ipaddress: "192.168.1.50" # IP of your Home Assistant (you can find it in HA under Settings -> System -> Network -> IPv4)
z2m:
server1:
url: "ws://192.168.1.10:8080" # IP of your Home Assistant and port of the Z2M frontend
Finding the MAC address is a little trickier. To do this, call in Home Assistant Settings -> System -> Network on. Under Network adapters you will find something like: Discovered: enp1s0 ...
We now need this value and must use it in a terminal in Home Assistant. You can also download an add-on from the store for this purpose. In this terminal, enter ip addr show enp1s0 to match the value you previously received.
The output should look something like this:
2: enp1s0: mtu 1500 qdisc fq_codel state UP qlen 1000
link/ether 52:54:00:1e:be:f5 brd ff:ff:ff:ff:ff:ff:ff
inet 192.168.178.135/24 brd 192.168.178.255 scope global dynamic noprefixroute enp1s0
valid_lft 844566sec preferred_lft 844566sec
inet6 fde7:c6c5:3f6c:4121:89c5:2192:430a:18f5/64 scope global dynamic noprefixroute
valid_lft 1732sec preferred_lft 1732sec
inet6 fe80::15ec:1c00:89d6:8257/64 scope link noprefixroute
valid_lft forever preferred_lft foreve
This means that 52:54:00:1e:be:f5 now the MAC address that we have to enter in the configuration.
Starting and pairing
- Save the configuration.
- Click on Start.
- Check the Protocol (log). If it says „Waiting for link button press...“, the server is running!
- Now open your Philips Hue app on the smartphone.
- Go to Settings -> Bridges -> Add new bridge.
- The app will search. Since Bifrost does not have a physical button that you can press, you often simulate this by looking in the add-on's log (depending on the version) or simply waiting - Bifrost is often permanently in „pairing mode“ when first started or automatically allows pairing for a short time after restarting.
The highlight: Hue Entertainment & Sync
That's the reason why most people go to this effort. You want to recreate Ambilight for your PC or TV, but with inexpensive Gledopto or WS2812 strips (via WLED and Zigbee controller).
Bifrost implements the Philips UDP streaming protocol.
- Create one in the Hue app Entertainment area.
- Place your (non-original) lamps virtually in the room (where is the TV, where is the sofa?).
- Use the Philips Hue Sync App on your PC (or a Sync Box, although caution is advised here due to HDCP and recognition).
- Start the sync.
Result: Your PC sends the color information to Bifrost at breakneck speed. Bifrost converts these UDP packets and sends them to Zigbee2MQTT. Attention: For this to run smoothly, your Zigbee network must be extremely stable. Zigbee is not primarily made for high-speed streaming. Too many lights in entertainment mode can „clog“ the mesh network (flooding). For 2-3 light strips behind the monitor it usually works perfectly, but don't expect miracles with 50 lamps in the whole room.
Comparison: Bifrost vs. Emulated Hue vs. DIYHue
Why Bifrost and not the others?
- Emulated Hue (home assistant integration): This integration is very old and usually only simulates a V1 Bridge. It is primarily intended to make devices visible to Alexa or Logitech Harmony. The official Hue app often no longer works at all or only to a very limited extent. It does not support entertainment.
- DIYHue: DIYHue is the „big brother“ in spirit. It is an independent, very powerful OS/project. It has its own add-ons, its own logic. The difference: Bifrost is „slimmer“. It doesn't want your smart home be, it just wants to be a bridge to Z2M. DIYHue often tries to recreate the complete logic of Hue, including its own integration of lamps. Bifrost says: „Z2M is the boss, I'm just the translator“. This often makes Bifrost more attractive and less error-prone for existing Z2M users.
Troubleshooting: When it gets stuck
1. the Hue app cannot find the bridge.
- Are the cell phone and Home Assistant in the same subnet? Detection runs via mDNS/UPnP, which does not work well across VLAN boundaries.
- Try the manual IP entry in the Hue app.
2. lamps switch with a delay.
- Check the load on your Zigbee stick.
- Check the WLAN interference (Zigbee and WLAN both transmit at 2.4 GHz).
- Do you have too many logs active in Z2M?
3. entertainment sync is jerky.
- This is often a limit of Zigbee. Try to reduce the number of lights in the entertainment area.
- Make sure that your Home Assistant is connected via LAN cable and not via WLAN.
YouTube video implementation
Conclusion
Is Bifrost the „egg-laying wool-milk sow“? For users of Zigbee2MQTT: Definitely yes.
It eliminates the need for proprietary hardware and opens up the beloved Philips Hue app to low-cost hardware. The one-time installation effort is slightly higher (especially because of the port issue), but the result immediately makes up for it. You get the best of both worlds: The stability and openness of Zigbee2MQTT and the user experience (UX) of Philips Hue.
So if you still have an old Hue Bridge lying around: Try Bifrost, and maybe the bridge will soon end up on eBay. Good luck building bridges! Your smart home will thank you.
Useful links at a glance
- Bifrost GitHub:
https://github.com/chrivers/bifrost - Bifrost HA Add-on:
https://github.com/chrivers/bifrost-hassio - Zigbee2MQTT:
https://www.zigbee2mqtt.io/
0 Comments