From 035de767fa76638f537fff096efe85e6599a9795 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Thu, 26 Mar 2020 17:42:01 -0400 Subject: [PATCH 1/3] updated readme --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d08fc7..ee39436 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,56 @@ # bleak Change the aura of the room with your smart TV! -Details to come soon. +## What is this?? + +This came from an idea in high school where one could change a channel and some LEDs could change color. This project is just that, only with Smart TV's. One changes the application to Netflix, the LEDs turn red. Another changes the application to Hulu, the LEDs turn green. + +## Pre req's + +* A Raspberry Pi (tested with a Raspberry Pi 4) +* A WS2818B LED strip +* Rust 1.40+ (this is the version of Rust `bleak` was written in) + +## Installation + +### Hardware + +Coming soon! + +### Software + +Download and install Rust. You can find Rust [here](https://www.rust-lang.org/) or just use `curl` to install Rust via rustup (recommended): + +`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` + +Clone this repository: + +`git clone https://github.com/wymillerlinux/bleak` + +Asssuming one is a command line wizard, you have navigated to the root of the project. + +## Compilation/Use + +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 hoodoo voodoo magic which I have not explored as of yet. Once I figure out to use cross-compliation effectively, I will update this readme. + +Next, run `cargo` to compile it (I happened to compile this on the Raspberry Pi itself): + +`cargo build --release && cp ./target/release/bleak ~/.cargo/bin && bleak` + +or you can: + +`cargo run` + +to run this program as one is hacking away. + +I wrote a systmed 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 :) + +## Troubleshooting + +Things that I've noticed: +* `bleak` will fail from time to time. There's no error handling at this point. +* `bleak` like to change color to some random color(s) when being told to change color to, say, green or red. +* Roku TV's tend to be slow while `bleak` is running. Can't reproduce this problem, however... ## Smart TV support @@ -14,3 +63,7 @@ Future possibilities: * Samsung SmartThings TV * Android TV * Amazon's Fire TV + +## Contribution + +I'd love some contributors! Submit a PR and email me for some more information! From 6d6e872edc32b2d3902190ec99c831928aa79526 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Thu, 26 Mar 2020 17:46:34 -0400 Subject: [PATCH 2/3] updated readme again --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee39436..13085e3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,15 @@ Change the aura of the room with your smart TV! ## What is this?? -This came from an idea in high school where one could change a channel and some LEDs could change color. This project is just that, only with Smart TV's. One changes the application to Netflix, the LEDs turn red. Another changes the application to Hulu, the LEDs turn green. +This came from an idea in high school where one could change a channel and some LEDs could change color. This project is just that, only with Smart TV's (Roku TV's and Roku devices supported). One changes the application to Netflix, the LEDs turn red. Another changes the application to Hulu, the LEDs turn green. + +## How does it work? + +`bleak` sends out a API request to your Roku TV/Roku device 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. + +TL;DR + +Read the source code. ## Pre req's @@ -48,7 +56,7 @@ I wrote a systmed service file so starting and stopping would be like I'm starti ## Troubleshooting Things that I've noticed: -* `bleak` will fail from time to time. There's no error handling at this point. +* `bleak` will fail from time to time when grabbing responses. There's no error handling at this point. * `bleak` like to change color to some random color(s) when being told to change color to, say, green or red. * Roku TV's tend to be slow while `bleak` is running. Can't reproduce this problem, however... From 13477b05846fdcdca5cc86b976b6e491d6c054b5 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Mon, 30 Mar 2020 19:35:22 -0400 Subject: [PATCH 3/3] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13085e3..70cdd2d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Read the source code. * A Raspberry Pi (tested with a Raspberry Pi 4) * A WS2818B LED strip -* Rust 1.40+ (this is the version of Rust `bleak` was written in) +* Rust 1.40+ (this is the version of Rust `bleak` was written in) However, any version of Rust 2018 will most likely be fine ## Installation