Skip to main content

control your google home

Project description

googlecontroller

Library for Python 3.8+ to push text message or audio file with the Google Home.Originally made by - Thomas Deblock (@tdeblock) I have expanded most of the code quite a bit little of the original remains, but the idea came from Mr.Deblock.This is a sorta v2 for the googlehomepush module they made.

This is now officially broken and will no longer be updated.If you are better at python then I take a shot at this problem.Fork this repo, do what you must.

Installation

finally a pypi!!!!!!!

pip install googlecontroller

Depending On

PyChromeCast

How to use

from googlecontroller import GoogleAssistant
from googlecontroller.http_server import serve_file # for local files
host = "ip"
home = GoogleAssistant(host=host)
home.say("test")
home.play("http://www.hubharp.com/web_sound/BachGavotteShort.mp3")

file_url = serve_file("/path/to/file", "audio/mp3") # local
home.play(file_url, "audio/mp3")
home.volume(100)
home.volume(0)

.say(text, speed,ignore, lang)

Push a message on Google home

  • text is the test message to say
  • speed is the rate of speed of the message ranges from 0.000+ as slowest to 1 as normal speed.
  • ignore ignore if audio is playing and play it regardless if ignore=True and only play if not playing if ignore=False or is not specified.
  • lang the text language, default value is 'en' to change it have lang = 'language' as described in google translate en-Us, es (spanish), ect

.play(url, ignore, contentType = 'audio/mp3'):

Push a sound to Google home

  • url an audio file URL
  • ignore ignore if audio is playing and play it regardless if ignore=True and only play if not playing.If ignore is not specified it will be set to False.
  • contentType the audio file content type

.volume(volumelevel):

  • volumelevel the volume level from 0-100 Example: home.volume(5) or home.volume(volumelevel=5). If you want to take it as user input you can do home.volume(volumelevel=input()).

Maintainers

  • Dray-Cyber

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

googlecontroller-3.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

googlecontroller-3.6-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file googlecontroller-3.6.tar.gz.

File metadata

  • Download URL: googlecontroller-3.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.0

File hashes

Hashes for googlecontroller-3.6.tar.gz
Algorithm Hash digest
SHA256 3938512c284e0bb78a902ce2df5b4b488de43ff65f8c079d1c563043a4622772
MD5 be4776a4fe9436b493aa4216cae065cc
BLAKE2b-256 b839409b697402c13cc9af40f3bd0194cfe6fd1a7957b6dc912e2ec1ff42a1c0

See more details on using hashes here.

File details

Details for the file googlecontroller-3.6-py3-none-any.whl.

File metadata

  • Download URL: googlecontroller-3.6-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.0

File hashes

Hashes for googlecontroller-3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 55e849e6ee2abc2daf5fe832618029b50fa1513ae163f7d9aa498650166fd106
MD5 9326f53c6c445803d0cbb5bc6c952e30
BLAKE2b-256 112a8896b6cd545cfbc64fe05a581c7d3f6a02953a3b8222442a3bd944025b71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page