9

I have the IKEA full color spectrum smart bulbs and I'm very happy with them. Technically they are regular zigbee bulbs. Today I control them with homekit, see "Today."

What I want is to use the video out of my Mac Mini as input for the light's color i.e. ambient lighting.

I need

  • some kind of software to monitor the video output of my Mac and convert it to what colors the different lights should be
  • the Mac to speak HomeKit with the iPad or the IKEA gateway directly to update with new color commands.

  • Is it possible?
  • Should I get a Zigbee transmitter for the Mac for it to be able to speak directly to the lights/remotes?
  • Where should I start looking to get going?
5

The first issue with your proposed setup is that your Mac can't communicate with any HomeKit devices. It's unclear why this is the case, and you would have thought that one Apple platform should be able to talk to the other. But, unfortunately, they can't.

Luckily, the Trådfri hub does support remote control from your Mac (or any device, really). You can talk to the gateway using CoAP (or find a library which does so, like pytradfri for Python).

You'll then need to connect that to a script which can determine the screen hue. A library like pymaScreen sounds like it fits the bill, and the task then is simply to connect the two.

Take a look at the example_color.py file in the pytradfri repository to see how to set the colours; it seems that the bulbs use the XYZ colour space rather than RGB.

  • 1
    Thanks for nudging me in the correct direction and proposing a solution, Aurora0001! CoAP looks great. pymaScreen from 2011 is pretty far off from a complete ambient lighting solution though. I will look into using CoAP to create a plugin for Hyperion – Jon Ramvi Jan 7 '18 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.