This project is licensed by the [Mozilla Public License v2](https://www.mozilla.org/en-US/MPL/2.0/). A copy of this license is in the project's root directory for your convenience.
The logo is licensed by the [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/).
This came from an idea in high school where one could change a channel and some LEDs could change color based on the channel selected. This project is just that, only with smart TV's (see the [supported devices](#smart-tv-support) for a list of supported devices). One changes the application to Netflix, the LEDs turn red. Another changes the application to Hulu, the LEDs turn green.
`bleak` sends out a network request to your smart TV's IP address that you specify in a JSON file, which is read by `bleak`, and based on that response, the LEDs will change color. These requests happen at one second intervals.
The hardware installation process isn't too tedious. However, it does take some knowledge of Raspberry Pi's GPIO and how it works.
There should be three wires coming out the LED light strip. Typically, a red wire, a black wire, and another wire that could be any color besides red or black.
Red can usually signify that this wire should be on a 5V GPIO pin. There are multiple so choose any that fits your fancy.
Black can usually signify ground. So it should sit on a ground GPIO pin. Again, there are multiple.
The wire I want to bring attention to is the other wire. This is the data wire. This wire holds all the data going to lights. This wire is placed on GPIO pin 19, an SPI wire.
SPI is kind of neat but I'll spare you the details. If you would like to get more information on SPI, you can go read about it [here](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface).
**NOTE:** If you followed option one, you can skip the following, just run `bleak` or enable and run the systemd file, given you have copied and modififed the JSON file. If you followed option two, please continue.
Next, there's two ways of compiling this project. One way is to compile on Rasberry Pi itself, which is a bit slow. The other way is some cross-compilation which takes a bit of paitence as you have to compile a GCC toolchain by yourself. Alot goes into GCC such as not limited to Glibc and Bison. Once I figure out to use cross-compliation effectively, I will update this readme and probably provide a shell script to automate building such a toolchain.
I wrote a systemd service file so starting and stopping would be like I'm starting and stopping any service on a Linux machine. I also didn't like `bleak` taking control of my terminal session :)
*`bleak` like to change color to some random color(s) when being told to change color to, say, green or red. I think that's just my light strip (or my breadboard I use for development) but I have no other light strips to test...