After months of hacking with LIFX Z lightstrip I have something to show. App that creates Ambilight-like effect based on screen content. I know there are many apps doing more or less the same but I have not seen any decent ones yet. Here is a video showing my project in action:
This setup uses 3 meter LIFX Z strip around TV with 24 individual zones to control. I use Mac to mirror video to Apple TV 4 via Airplay and my Mac app to read screen content and control lights.
App does it’s best to set color to one or more zones at a time to match content as closely as possibly. Doing this in real-time is non-trivial, there are some many possible color/zone combinations. If LIFX engineers added a new LAN protocol message to set multiple zones with different colors it would make the app even better.
Another challenge was how to update lightstrip as quickly as possible without packet loss or increased latency. Currently I am sending around 60-120 messages per second, this varies based on network conditions. If I wanted to update all 24 zones (3 meter strip) 24 times per second (typical movie framerate) individually I would need to send 576 messages per second. This would only lead to enormous packet loss and latency.
Due to added Airplay latency light control latency is actually negative in this video. I tried to add some latency to light control but at the moment lights are updated around 130ms too early. Using HDMI instead of Airplay would fix this. There are still many issues to fix before releasing this but at some point it will be available for various platforms. If you guys have any questions I am happy to answer!