https://github.com/avicted/stock-hue
Changes the color of all Philips Hue lights connected to a bridge when the stock price of GME changes.
https://github.com/avicted/stock-hue
Last synced: 8 days ago
JSON representation
Changes the color of all Philips Hue lights connected to a bridge when the stock price of GME changes.
- Host: GitHub
- URL: https://github.com/avicted/stock-hue
- Owner: Avicted
- License: mit
- Created: 2021-03-09T16:56:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-10T19:04:55.000Z (over 5 years ago)
- Last Synced: 2025-03-02T16:28:57.434Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stock-hue
### Changes the color of all Philips Hue lights connected to a bridge when the stock price of GME changes.
Uses the following packages:
- Q42.HueApi and
- YahooFinanceApi.
---
## Color logic
```
Green = regularMarketPrice > regularMarketOpen
Red = regularMarketPrice <= regularMarketOpen
```
---
## Flow
1. stock-hue will search for the first Hue bridge that it can find in the same LAN as the computer running stock-hue.
2. stock-hue will generate a new appKey with the bridge.
3. stock-hue checks the price every 3 seconds and compares it to the opening price (regularMarketOpen).
---
## Production build
Requires the dotnet cli or you could start the VSCode development container and build from there.
```bash
# Linux
dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained false -c Release
# Windows
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true -c Release
```