How I turned my old 55″ Samsung TV into a SmartTV with AmbiLight
Tags: esp8266, smarttv, diy
Published: 2021-10-21 22:23:15

# TLDR;

This solution, uses an AndroidTV box to provide the SmartTV functionality. For the ambilight, I had to “hack” into my TV to grab the pixel-information of what is shown on the screen and send that to an ESP8266-controller to control the LED-strip attached to it.

#The Smart TV

Looking around at many of the solutions, AppleTV, AndroidTV, etc… I opted for the Xiami MiBox, which recently got upgraded to AndroidTV Oreo.

It’s a full working stock AndroidTV, with built in ChromeCast and which also allows me to sideload apps, that are not accessible from the GooglePlay-store.

For 70,- bucks a great extension.

# The Ambilight

Now this one is tricky. As of now, there is a great ambilight project out there, the hyperion-project. But the fact, that I have to use an HDMI-splitter and not being able to switch HDMI-sources with my TV remote and automatically having the LED-strip using that source, bothered me.

As a smartphone-user who is familiar with rooting and installing custom software, I thought of the idea, that there MUST be some “rooting” method for a TV, to gain access to the TV’s pixel data and to send that somehow to a LED-strip. Luckily, there actually is something like that, well… kind of.

Doing my research, I stumbled upon SamyGO. Which is a community of programmers, providing useful instructions, how to “root” a Samsung TV, and offering some useful “libraries” to extend it’s functionality. Unfortunately, the information is just accessible to people who donate a small amount of BTC (10$) to the forum-owner. Which is really worth the money.

After I rooted my TV, I hoped, that one of these programmers already had the same idea like me and developed a library for an ambilight-solution. But unfortunately there wasn’t — so I had to write my own.

Since, I could not find any instructions on how to write libraries, I started digging into the source-code of other libraries to find out, how they’re developed. Well, after some trial&error, and after crashing my TV a bunch of times :-D, I finally had a working solution.

# How it works

The idea is very simple. I grab the TVs pixel, and send them via UDP to an ESP8266, which controls the LED-strip. This works no matter what is displayed on the TV, so the integrated tuner, every HDMI-source (AndroidTV, PlayStation4, … you name it).

# Installation

So, if you want to try it on your own, here are some instructions how to achieve the same result as I have.

## Requirements

- Samsung TV (E, F or H series)
- Good USB-Stick (16GB)
- ESP8266 12E (NodeMCU)
- Addressable LED-strip (WS2801, WS2811… etc)
- Power supply unit for the LED strip
- Xiaomi MiBox

## Rooting the TV

Head over to https://forum.samygo.tv/, get into the Donator group and find a rooting method that works for your TV. I’d suggest one of these methods, where you install the root onto a USB stick. Since this is the saver method. If you screw anything up, you can remove the USB stick, and start over again, without messing with your TV system.

## Setting up the AmbiLight

When you’re in the donor group, you should be able to access the files provided by me in the libAmbilight-topic and follow the installation-instructions there: https://forum.samygo.tv/viewtopic.php?f=75&t=12460

# Total costs

- TV 55″: free (but 830 € if I hadn’t one)
- USB-Stick: 20 €
- ESP8266: 5 €
- LED-strip: 40€
- PSU for LED-strip: 10€
- Xiaomi MiBox: 70 €
- Total: ~ 145 € (975 € with TV)
- Hours spent in research and programming: ~ 70h

# Conclusion

Now the question is, was it worth all the effort. Considering that, if I haven’t had the TV and had to buy a new one, I would’ve spent 975 € for these setup, and another 70h of research and programming. Since there’s a Philips 55″ with AndroidTV and ambilight for around 700 €, it’d be much cheaper buying a new one with all the features included.

Another option would be to sell the TV, since it’s an older model, I don’t think I’d get more than 400 € for it, so I’d have to spend 300€ to buy the Philips one, which would be 150€ more than extending it myself. Although, I’d save on the 70hrs of research and programming.

IMHO: It was totally worth it. The 70 € for the MiBox is a really good deal. The nice-to-have-ambilight which is another 75€ was a great opportunity to improve my programming skills.