Skip to content

A fork implementing support for python 3.13, fixing some scheduling bugs, as well as exposing the timezone as a configuration option.

License

Notifications You must be signed in to change notification settings

BSoDium/google-nest-telegram-sync

 
 

Repository files navigation

Google Nest camera clips - Telegram channel sync

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.

Features

  • 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

Usage:

  • 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

Credits:

About

A fork implementing support for python 3.13, fixing some scheduling bugs, as well as exposing the timezone as a configuration option.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 100.0%