Hue Emulation for Home Assistant
Convert your Home Assistant instance to a fully functional Philips HUE bridge! Control all lights connected to your Home Assistant box with HUE compatible apps/devices like the official Hue app, Hue essentials and Philips Ambilight+Hue etc.
Once started, it will be available as a HUE bridge on your network.
The Hue Entertainment API supports a communication protocol which allows a light streaming functionality with the Philips Hue System. Using this protocol, it is possible to stream lighting effects to multiple lights in parallel with a high update rate. It's used for new Ambilight+HUE TV's and the HUE Sync app on PC and Mac.
We've created a (highly experimental!) python implementation of this streaming protocol that actually works pretty well altough not as good as it's original. While packets are indeed live streamed (at a rate between 25-50 messages per second) to our virtual bridge, we unpack them and convert them to commands the light implementations can understand at a more sane rate level (throttling). We choose some settings which result in a nice effect with not too much delay without completely overloading a platform. This means that the Entertainment mode will work with any light connected to Home Assistant. Cool!
The next step we have in mind is, if you own official HUE lights connected to ZHA, to forward the special Entertainment packets into the Zigbee mesh, resulting in the real streaming experience (realtime effects with no delay).
Please use the Github issue tracker for feature requests (including motivation) and off course for reporting any issues you may find!
By default all your Home Assistant lights and areas will be imported to get you started quickly but you can customize this. In your Home Assistant config directory you'll find a folder for emulated_hue witha file called emulated_hue.json. In that file you can disable lights or groups by setting enabled to false. You can also delete a light in the HUE app. That will also mark the light as disabled.
Entertainment mode is heavy. It will send multiple commands per second to each light. If you hardware can't cope up with this we have an advanced little setting hidden in the above mentioned emulated_hue.json config file called "entertainment_throttle". Set a value (in milliseconds) to throttle requests to this light. A good value to start with is 500. Remember to stop the addon before you start editing this file.
Sure, just run the docker image manually. We'll provide you with some sample run commands soon.
diyHue was created to be a hub on it's own. You can directly connect your lights and devices to it and it. You can see it as a minimal competitor for Home automation solutions like Home Assistant. Our approach is that we want to use Home Assistant as the "hub" connected to all our lights and devices. This emulator is just a translator between Home Assistant and the HUE api protocol and does not have any internal logic.
The emulated Hue component in Home Assistant is a very basic implemention of the HUE API for the V1 HUE bridge which is soon to be discontinued by Philips. At that time it was meant to get Alexa/Google Home devices working with Home Assistant. In the meanwhile other solutions are available for that so the component is more or less obsolete.
Well this project actually started as integration, but we ran into some serious trouble:
The current approach gives you the flexibility of running the emulated HUE bridge on a diferent machine than HA.
We now provide a binary sensor binary_sensor.emulated_hue_entertainment_active
that will allow you to detect this event in Home Assistant.