I have some old telephones lying around - few of them fully functional anymore. I was going to throw out one of them when I realized I could replace the inner wiring with a Raspberry Pi, and have the Google Assistant running on it.
While its certainly easier to call hey google across the room, theres something fun about picking up the phone, asking it a question, and having it immediately respond. This is how to install the Google Assistant on an old rotary telephone with a Raspberry Pi Zero.
This Raspberry Pi project is quite extensive and can take a bit of time, so Ive split it up into four distinct parts:
Before we use a Raspberry Pi as a Google Assistant, we must register the device with Google. This process can be a bit confusing if youve never used Google Cloud Platform before, but the steps should be easy enough to follow.
1. Clone this repository to your raspberry pi.
2. Navigate to https://console.actions.google.com in your browser. This site allows us to manage Google Assistant Actions, as well as register custom Google Assistant devices.
3. Click New Project and fill in the required information. The name doesnt matter - just pick something you can remember.
4. In a new tab, visit this link to Google Cloud Platform, and confirm that the name of the project you just created appears in the top bar - if not, select it. Then, click the Enable button to turn on the API.
5. In your original tab, scroll to the bottom of the page and click Are you looking for device registration? Click here
6. On the next page, click Register Model.
7. Fill in the required information and copy down the Model ID to file - you will need it later.
8. Click Download OAuth 2.0 credentials to download the credentials file your Raspberry Pi will use to make requests.
9. Rename the downloaded file to oauth_config_credentials.json and transfer it to your pi. Place it into the repository folder you cloned in step 1.
10. Back in the browser, after downloading and renaming the credentials, click the Next button.
11. On the Specify traits tab, click Save Traits without adjusting any settings to complete the setup.
Weve now registered a device with Google. Next, its time to authenticate this device so it has access to our Google account and personalized assistant.
1. Navigate to https://console.cloud.google.com/apis/credentials/consent ensuring that the project matches the name you decided in Step 3 of Registering With Google.
2. Select External and click the Create button.
3. Fill in an App name. Once again, this doesnt really matter - but to keep it simple I went with the same name as before.
4. Select your email from the dropdown in User support email. This is in case any users of your app need to contact you, but since we wont be making the app public, theres no need to worry.
5. Add that same email under Developer contact information and click Save and Continue.
6. On the next page, click Add or Remove Scopes to bring up the scopes sidebar.
7. Search for Google Assistant API in the search bar, and check the /auth/assistant-sdk-prototype scope. Then click update, followed by Save and Continue at the bottom of the page.
8. On the next page, click Save and Continue to skip Optional Info.
9. With the setup complete, click OAuth Consent Screen in the sidebar to refresh the page - then Add User under Test Users.
10. Add your Google accounts email, and click save.
11. Next, on your pi navigate to the downloaded repository and run the following command:
12. Follow the link it gives you and complete the Authentication process in your browser. Once the process is complete, copy the code and paste it back in your terminal.
13. If successful, youll see a message indicating credentials saved: followed by a path to the credentials. Use this path to move the credentials into the current directory. Transfer these credentials to your repositorys root directory
Depending on your rotary phone, this process will vary widely. These are the steps that I used, but likely this will require a fair bit of trial and error on your part. Make sure you use a phone you dont care about, as it wont be able to work normally after this.
1. Take the cover off the telephone. You may need to loosen a screw on the bottom.
2. Find and strip the wires connected to the hook switch. Well connect these wires to the pis GPIO pins to determine if the receiver has been picked up or set down.
3. Connect the hook switch wires to GPIO Board pin 18 and ground. You may need to solder the wires from the hook switch to jumper wires to connect them easier, or just attach them together with a bit of electrical tape.
4. Connect your USB audio adapter to the raspberry pi zero. You will need a USB-micro to female USB-A adapter to do this.
5. Solder the microphone and speaker in the handset to two separate 3.5mm cables. These will carry the signal from the pi to the speaker, and from the microphone to the pi. You should be able to connect these within the phone case and use the original handset cord. This will take a bit of trial and error to determine which wires belong to the speaker, and which to the microphone.
6. Connect the 3.5mm cables to the USB audio adapter being mindful to connect them in the proper order.
7. Tuck the pi into the phone, and close up the cover - or keep it open while you debug setting up the assistant. Run the power adapter connected to the pi out the back of the case where the original telephone wire would go.
1. Run the installation script. Itll take care of base and python requirements. If you have a Raspberry Pi Zero, the compilation process can take hours and will appear stuck on a step installing grpc (it just moves very slowly). Id recommend leaving it running over night.
2. Configure your USB audio by running the following command. It will take care of editing your alsamixer config, setting your USB card as your default audio output, and setting volumes for the speaker and microphone.
3. Test and adjust your volumes by running the following command, speaking, and listening through your phones handset. If your volume is not high enough on your microphone or speaker, set it with the alsamixer command.
4. Export your project ID to an environment variable. You can retrieve your project ID by visiting this URL, selecting your project, clicking the three dots next to your profile photo in the top right, and clicking Project Settings
5. Export your model ID from the Registering With Google steps to an environment variable.
6. Run the make run command. It will take care of registering this device, and saving the configuration to disk so you wont need the environment variables in the future.
7. Test your assistant by picking up the phone, and asking it a simple question, like What is the capital of Canada? If all goes well, youll see some logs in the terminal, and the assistant will respond. To ask another question, hang up the receiver and pick it up again.
8. Finally, run the following command to configure the assistant to run on boot.
Visit link:
How to Turn a Rotary Phone into Google Assistant with Raspberry Pi - Tom's Hardware
- Is Google Advertising Revenue 70%, 80%, Or 90% Of Alphabets Total Revenue? - Forbes [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Google My Business Photos Being Added To Google Posts Without Option To Delete - Search Engine Roundtable [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Even amid the affluence of tech capital in Silicon Valley, local news struggles - CNBC [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Where in the world was Santa? It depended on which online tracker you were following - The Boston Globe [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Huawei, Facebook, and Oracle Put Pressure on Google - Market Realist [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Huawei and Google Diverge in Their Treatment of ToTok - Market Realist [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Google Maps: Aftermath of plane crash in Somalia discovered - what happened? - Express [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Why Apple, Google, and other big tech companies create their own fonts - Mashable [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- ProBeat: Google only updated Android distribution data once in 2019 - VentureBeat [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- 10 things to try with your new Google Nest smart speaker - VentureBeat [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Google workers exposed to chemical that causes birth defects - City A.M. [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- The most popular products of 2019, according to Google - TODAY [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Google Chromes five security features that every user should know - Hindustan Times [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Googles YouTube Goes To War With Bitcoin And Crypto [Updated] - Forbes [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Google is poised to make another blitz at CES 2020 - CNET [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- These Were The Top Google Searches And Trends Of 2019 - Forbes [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Google Search now lets you add movies and shows to a 'Watchlist' - Engadget [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- 31-year-old Google executive says reading this one book has had a huge influence on her career - CNBC [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Obama praises book that slams his White House for its Google relationship - Mashable [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Why Google was the most important brand marketer of the 2010s - Fast Company [Last Updated On: December 30th, 2019] [Originally Added On: December 30th, 2019]
- Amazon and Facebook Are the Most 'Evil' Tech Companies, According to Experts. Google Isn't Far Behind - Inc. [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Rich Results testing tool now reports on unloadable embedded resources - Search Engine Land [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Assistant routines haven't worked on Android Auto for over a year, still no fix in sight (Update: Google acknowledges) - Android Police [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Jussie Smollett is probably toast now that Google is handing his data to the special prosecutor - Washington Examiner [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Americans trust Amazon and Google more than the police or the government - MarketWatch [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Using Google Authenticator? Here's why you should get rid of it - ZDNet [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Googles hidden AR tool will blow your mind - Creative Bloq [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Kids, Want to Win a $30,000 Scholarship and Show Your Art to Billions? Googles Annual Doodle Contest Is Now Open - artnet News [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- 1 Reason 2020 Will Be a Big Year for Google and Facebook - The Motley Fool [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Health Exec Defends Controversial Partnership With Ascension: Were Super Proud Of It - Forbes [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Labs arrive in Google app to let you experiment with features like pinch-to-zoom - 9to5Google [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Sorry, Alexa and Siri, but only Google Home can do these 5 things - CNET [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Kittle photobombed by The Rock in roster Google search - NBCSports.com [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- This Is How Your iPhone Is A Cool New Way To Access Google - Forbes [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Googles Takeover of Fitbit Faces Another Regulatory Hurdle - Motley Fool [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Health VP on Ascension partnership: 'The press has made this into something it's not' - Healthcare IT News [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Maps keeps a detailed record of everywhere you go here's how to stop it - CNBC [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Will Googles more-efficient Reformer mitigate or accelerate the arms race in AI? - ZDNet [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Rachel Bovard: Congress has a role to play in regulating Google - Home - WSFX [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Why Google added little logos next to search results this week - CNBC [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Report: Google wants to bring the Steam game store to Chrome OS? - Ars Technica [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- BT partners with Google to bundle free Stadia with broadband deals in the UK - The Verge [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Play [Last Updated On: January 18th, 2020] [Originally Added On: January 18th, 2020]
- Google Photos app for Android will soon phase out the hamburger menu - GSMArena.com news - GSMArena.com [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- What Is Google Coral And Do You Need It? - Lifehacker Australia [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google and Amazon limit employees travel because of coronavirus fears - The Verge [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google, Toyota Tsusho invest in WhereIsMyTransport to map transport in emerging cities - TechCrunch [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- This Is Huaweis Alarming New Surprise For Google: Heres Why You Should Be Concerned - Forbes [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google and Microsoft offer free teleconferencing tools to combat coronavirus - TechRadar [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google bans on-site job interviews for the foreseeable future due to coronavirus - The Verge [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- AWS to double sales droids as Google, Microsoft's growing clouds threaten to gobble larger slices of Bezos' pie - The Register [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google's Exposure To Travel Will Impact Revenue, BofA Says - Benzinga [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google Cloud goes after the telco business with Anthos for Telecom and its Global Mobile Edge Cloud - TechCrunch [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Apple, Microsoft, Google look to move production away from China. That's not going to be easy - CNBC [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google will lose its John Legend Google Assistant voice on March 23rd - The Verge [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google and Microsoft are giving away enterprise conferencing tools due to coronavirus - The Verge [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Google Stadia now supports 4K streaming on the web - The Verge [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Star Engineer Who Crossed Google Is Ordered to Pay $179 Million to Company - The New York Times [Last Updated On: March 5th, 2020] [Originally Added On: March 5th, 2020]
- Why companies like Microsoft and Google are betting big on Africa - CNBC [Last Updated On: March 8th, 2020] [Originally Added On: March 8th, 2020]
- Google Announces A Coronavirus Incentive For G SuiteAnd Other Small Business Tech News - Forbes [Last Updated On: March 8th, 2020] [Originally Added On: March 8th, 2020]
- Microsoft, Google, and Twitter Are Telling Employees to Work From Home Because of Coronavirus. Should You? - Inc. [Last Updated On: March 8th, 2020] [Originally Added On: March 8th, 2020]
- Facebook, Google among those kicking some cash over to Silicon Valley communities affected by coronavirus cancellations - CNBC [Last Updated On: March 8th, 2020] [Originally Added On: March 8th, 2020]
- Google now giving away three months of Stadia access to Chromecast owners - The Verge [Last Updated On: March 8th, 2020] [Originally Added On: March 8th, 2020]
- Google location data turned a random biker into a burglary suspect - The Verge [Last Updated On: March 8th, 2020] [Originally Added On: March 8th, 2020]
- Apple, Google and others partner with Ad Council and US govt to expand coronavirus messaging - The Drum [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google Has No Plans To Postpone Killing Third-Party Cookies In Chrome - AdExchanger [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Why Zoom is winning so much hype over Microsoft and Google - Business Insider [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Logged On From the Laundry Room: How the C.E.O.s of Google, Pfizer and Slack Work From Home - The New York Times [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google cancels its infamous April Fools jokes this year - The Verge [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google Tests Audience Buying In ADH, A Big Step From Analytics To Activation - AdExchanger [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Googles new Pixel Buds could hit spring release date, as they may have just hit the FCC - The Verge [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google Removes Infowars Android App From Online Store Over Coronavirus Misinformation - Variety [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Cruising Through South Central Los Angeles With Google Street View : The Picture Show - NPR [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google ups Duo group calling limit from eight to twelve - The Verge [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Outside China, Android isnt Android without Google - The Verge [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google has banned the Infowars Android app over false coronavirus claims - The Verge [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- My top 3 Google Home pet peeves and how to fix them - CNET [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Google Unveiled a Massive Stimulus Program of Its Own - Inc. [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Facebook, Google and Twitter Struggle to Handle Novembers Election - The New York Times [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]
- Test and trace with Apple and Google - TechCrunch [Last Updated On: March 30th, 2020] [Originally Added On: March 30th, 2020]