Samsung Smart TV App to use HUE as Ambilight

39.9k Views Asked by At

I am trying to accomplish this task:

  1. Running an app on a Samsung Smart TV (in background, kind of)
  2. This app should check the screen content in an interval and calculate the main color of screen content or the main colors of each border (lets say 20% of width and heigth from border)
  3. Use the remote accessible api for HUE to control n Philips HUE Lights to accomplish a roomwide ambilight.

Now as I am an android developer and do not have any experience with Smart-TVs I would ask you, if this could be accomplished (or if there is any show stopper) and you have some tips for me, prior to diggin into this very deeply? The actual "How to get startet developing a SmartTV App" will not be the main problem and I am into this right now.

So my actual questions are:

  1. What is the best bettern (or is it impossible) to have something like an background job in an Samsung SmartTV? Maybe something like a ticker app with no actual visible overlay or a very small one, would also be a solution?

  2. Is there a way to access the currently shown picture on TV, so I get access to the rgb values of the areas/pixels or maybe a screenshot or thumbnail of the screen, no matter what the source of the signal is, as I have to analyze it to get the color. Would be great I you could advise me some resources specially to this tasks and give me some advice if this will be working or if there are any limitations or better concepts.

2

There are 2 best solutions below

1
On

It seems the Huey app in the Play Store does what you want but accomplishes it in a different manner, using the camera of a device set in front of the TV to determine the colors.

0
On

Steve,

Hue API is not fit to be used as Ambilight control facility, since Hue API is not run real-time. Overheads generated by client and server make it possible to develop Hue API - based Ambilight apps supporting 1-2-3 Hue Lights, since hue, sat, bri are updated by server-side run scripts, so upddate is slow. You need to run Ambilight real-time ( 5-10 updates in 1 sec) and have 8-10 or more Hue lights controlled real-time.

So I develop real-time hardware based Ambilight demo for my students.

Hue API alone is not heavy but Hue API calls are server-side processed by API handlers, to send calls via Zigbee master to Hue Lights with Zigbee hardware and protocol embedded.

Smart TV is hardware based solution, so runs almost real-time and you can get video image updated frequently.