This script uses the newsAPI to get the top headlines and then uses openAI to get the sentiment of the headlines. The script then changes the brightness of the lifx lights depending on the sentiment of the news.
- Create a lifx account and get your token from here
- Create an openAI account and get your token from here
- Create a newsAPI account and get your token from here
- Clone the repo
git clone https://github.com/catbox-dev/newsMoodLight.git
- Install the requirements
pip3 install -r requirements.txt
- Replace the tokens in confi.ini with your tokens
- Make sure you have correctly setup your lifx lights, see here
- Run the python script
python3 newsMoodLight.py
- Install the lifx app on your phone
- Connect your phone and your computer to the same wifi network
- Open the lifx app and connect your lights
- newsAPI
- openAI
- lifx
- Project by catbox-dev