Skip to main content

control your google home

Project description

googlecontroller

GITHUB EXCLUSIVE KNOWLEDGE FOR SERVE_MEDIA HERE Library for Python 3.9+ 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.

Installation

finally a pypi!!!!!!!

pip install googlecontroller

Depending On

PyChromeCast Pyngrok

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")

#When serving media NEVER USE A \ ONLY USE /
#when doing your first home.serve_media you have to include a 3rd variable, opentunnle!For that 1 first time you have to set it manually to a 0!
#opentunnel = 0
#like this home.serve_media("YourMedia.mp3", "C:/Users/YOU!/Music/", opentunnel)
#**then never use that variable again**
home.serve_media("YourMedia.mp3", "C:/Users/YOU!/Music/") # 1st is the name of the media, second is the full path to media location!
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-5.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

googlecontroller-5.5-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: googlecontroller-5.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/58.0.4 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.7

File hashes

Hashes for googlecontroller-5.5.tar.gz
Algorithm Hash digest
SHA256 8749a3499b3ddc53243e1f6d067f115f5343eb97b7ed4197a1ec5373cdf3c1d1
MD5 5ff5c661d2fad918fcfbc30857cfca84
BLAKE2b-256 767b99d99ca7edafa337299d453f9b2704b6e6f69046491d755f5a6ae282fc82

See more details on using hashes here.

File details

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

File metadata

  • Download URL: googlecontroller-5.5-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/58.0.4 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.7

File hashes

Hashes for googlecontroller-5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0d7cbb8ee779c2a402e25f2ea3b1cb2bd633cbdf4e7d9a044505f38f5c6dbeb4
MD5 20fe942dda3257a0bf19f3ea1dac8586
BLAKE2b-256 684de40929f01908c41be9d0880bcca3182a3dcf76b9e2e7ceacd2e91fb0577e

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