This project is a fork of @TamirMa's repository, implementing support for python 3.13, fixing some scheduling bugs, as well as exposing the timezone as a configuration option.
- Get list of Google Home devices through HomeGraph
- Retrieve recent Google Nest events
- Download full-quality Google Nest video clips
- Send those clips to a Telegram channel
-
Install the required dependencies:
pip install -r requirements.txt
-
Get a Google "Master Token", using the ha-google-home_get-token docker image.
docker run --rm -it breph/ha-google-home_get-token
Tip
The image will prompt you to provide an app password, which you can retrieve by creating a new app on your Google account app passwords page.
Warning
The app password is NOT your Google account's password. It is a unique password generated for the app you are creating.
-
Create a .env file with the following contents:
GOOGLE_MASTER_TOKEN="aas_..." GOOGLE_USERNAME="youremailaddress@gmail.com" TELEGRAM_BOT_TOKEN="token..." TELEGRAM_CHANNEL_ID="-100..." TIMEZONE="US/Central"
Note
To retrieve your telegram bot token, create your telegram bot using @BotFather.
If the channel you want to sync the videos to is private, use @username_to_id_bot to get the channel's ID. Public channels expose their id in the URL, making this step unnecessary.
All available timezones can be found in this gist by heyalexej
-
Finally, run:
python3 main.py
- original repository from which this project is forked
- glocaltokens for the Google Home Graph API
- ha-google-home_get-token for the Google Master Token retrieval process
- python-telegram-bot for the Telegram API