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
#YOU MUST USE A DELAY IF DOING MULTIPLE IN A ROW FINE TUNE AS YOU SEE FIT
#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
textis the test message to sayspeedis the rate of speed of the message ranges from 0.000+ as slowest to 1 as normal speed.ignoreignore if audio is playing and play it regardless if ignore=True and only play if not playing if ignore=False or is not specified.langthe 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
urlan audio file URLignoreignore 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.contentTypethe audio file content type
.volume(volumelevel):
volumelevelthe 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file googlecontroller-5.7.tar.gz.
File metadata
- Download URL: googlecontroller-5.7.tar.gz
- Upload date:
- Size: 4.0 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937b8e2f958b5bd254b045a97623f6ffb9276df2c700a9f5373e293091abd034
|
|
| MD5 |
2b295ef7b61737a25002cc9073cab1df
|
|
| BLAKE2b-256 |
5eef68d0d8ff0e15caf2a77ab250d284fa64e049bd5abca7f89128b62f38b99b
|
File details
Details for the file googlecontroller-5.7-py3-none-any.whl.
File metadata
- Download URL: googlecontroller-5.7-py3-none-any.whl
- Upload date:
- Size: 4.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1965ad23a3bb96f1653cdc10860963316d4020657ebb42f96f46ad980fd8111e
|
|
| MD5 |
bb72df2eb57fb31b70ecff9d109db013
|
|
| BLAKE2b-256 |
a40a021edd27b2313cf2634849ced14b9eb34057d4e70cf72b608efc05f905db
|