Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arionmiles/f1
Change my room's bulb colors based on F1 race leaders
https://github.com/arionmiles/f1
f1 fastf1 tuya
Last synced: 22 days ago
JSON representation
Change my room's bulb colors based on F1 race leaders
- Host: GitHub
- URL: https://github.com/arionmiles/f1
- Owner: ArionMiles
- License: mit
- Created: 2024-07-28T06:41:11.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T19:33:55.000Z (5 months ago)
- Last Synced: 2024-11-18T15:51:29.066Z (about 2 months ago)
- Topics: f1, fastf1, tuya
- Language: Python
- Homepage:
- Size: 50.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# f1
This is a simple script to change my room's smart bulbs during a live F1 stream. The colors are based on the P1 driver's team colors. The colors should change in near real-time however it all depends on how fast or how slow the live timing feed is.
The bulbs are controlled entirely by sending instructions over the LAN. Currently only Wipro smart bulbs are supported since that's all I have.
F1's Live Timing feed operates over SignalR protocol which is unauthenticated so you **don't** need an F1TV or F1TV Pro account to use this.
## Setup
### Prerequisites
You need:
1. Python (v3.9 specifically, due to constraints by fasft1's live-timing implementation)
2. Poetry (`python3 -m pip install poetry`)
2. Some tuya compatible smart bulbs.
- I have a couple of Wipro bulbs which are compatible.
- See [tinytuya](https://github.com/jasonacox/tinytuya) for instructions on generating your `data/devices.json`### Getting started
```
# Install all dependencies
poetry install# Start venv
poetry shell# Start runner
python3 main.py# If you need debug logs
LOG_LEVEL=DEBUG python3 main.py
```- `python3 -m tinytuya wizard` should help create `devices.json` which you can move under `data/`
## Why python?
I usually prefer Go and hate Python with a passion. But, I needed something quick, and the libraries for interfacing with my smart bulbs and streaming the live timing data are readily available.
## Thanks
Thanks to the following folks, I learnt a few neat things from their implementation:
- [theOehrly/Fast-F1](https://github.com/theOehrly/Fast-F1)
- [f1stuff/f1-live-data](https://github.com/f1stuff/f1-live-data)