Gassistpi Documentation Release 5.0

Gassistpi Documentation Release 5.0

GassistPi Documentation Release 5.0 Shivasiddharth May 06, 2021 Contents 1 About this project 3 2 Features 5 3 Before Starting 7 3.1 Supported Platforms...........................................7 3.2 Getting Started..............................................7 4 Configuring audio 9 4.1 Choose the audio configuration according to your setup........................9 4.1.1 Users on Raspberry Pi OS Prior to Dec 2020 Release.....................9 4.1.2 Users on Raspberry Pi OS Dec 2020 Release or After..................... 12 5 Installing Google Assistant 15 6 Headless Google Assistant 17 6.1 Setting up Google Assistant to auto start on boot............................ 17 6.2 Steps to manually start the assistant................................... 17 6.3 Disabling assistant’s auto start...................................... 18 7 Updating the project 19 8 Guide to use the customizations/features 21 8.1 Enabling or Disabling Custom Actions................................. 21 8.2 Using Custom Actions in Non-English Languages........................... 21 8.3 Controlling Sonoff-Tasmota, Domoticz devices from Google Home.................. 21 8.4 Using the Interpreter Mode....................................... 22 8.5 Using Google Cloud Text to Speech................................... 22 8.6 Adding Custom Search API and Generating API Key.......................... 23 8.7 Adding YouTube Data API and Generating API Key.......................... 23 8.8 Controlling Assistant or Sending Preset Commands Using IR Remote................. 24 8.9 Sending Commands or Queries to Google Assistant Over MQTT................... 24 8.10 Streaming Music from Deezer...................................... 25 8.11 Streaming Music from Gaana.com.................................... 26 8.12 Controlling Domoticz Devices...................................... 26 8.13 Custom Conversations.......................................... 27 8.14 Custom Wakeword Activation...................................... 27 i 8.15 Playing Spotify Playlist......................................... 28 8.16 Tracking Kickstarter Campaigns..................................... 28 8.17 Emulated Philips Hue Control...................................... 29 8.18 Sending Voice Messages from Pi to Phone/Tablet............................ 29 8.19 Send SMS via Clickatell......................................... 30 8.20 Get Recipe Messaged to Mobile/Tablet................................. 30 8.21 Control Magic Mirror by Voice..................................... 30 8.22 Indicators for Google Assistant’s Listening and Speaking Events.................... 31 8.23 Pushbutton to Stop Music/Radio Playback and for Muting the Microphone.............. 31 8.24 Voice Control of GPIOs, Servo Motor and Safe Shutdown of Pi.................... 31 8.25 Voice Control of NodeMCU....................................... 32 8.25.1 Controlling NodeMCU Running Webserver.......................... 32 8.25.2 Controlling NodeMCU Running Sonoff-Tasmota Firmware.................. 32 8.26 Casting YouTube Videos to Chromecast and Chromecast Control................... 33 8.27 Controlling Media or Music Streaming by Voice............................ 33 8.28 Music Streaming from YouTube..................................... 34 8.29 Music Streaming from Google Music.................................. 35 8.30 Run Custom Scripts........................................... 35 8.31 Playing Radio Channels......................................... 36 8.32 Tracking Parcels............................................. 36 8.33 RSS Feeds Streaming.......................................... 36 8.34 KODI Control.............................................. 37 9 List of Raspberry Pi GPIOs used in the project 39 10 Google Home Like Indicator 41 11 List of available colors for home automation projects 43 ii GassistPi Documentation, Release 5.0 Contents 1 GassistPi Documentation, Release 5.0 2 Contents CHAPTER 1 About this project In May of 2017, Google Released it’s AIY Projects kit. Initially not many had access to it, so that is when I started modifying the Google Assistant SDK adding AIY like features to help out the ones left without the kit. Every project requires a name and so I named it GassistPi (“G”oogle “Assist”ant on “Pi”). Fast forwarding to date, the project works not only on Pi boards but on a number of other platforms (checkout the supported platforms page for more details). It has some interesting custom actions for both entertainment and home-automation needs. Primary language of coding is Python and the project has been structed in a way to allow even inexperienced programmers to modify existing codes and implement their own custom actions. This is a project for the single board community community, driven by the community. 3 GassistPi Documentation, Release 5.0 4 Chapter 1. About this project CHAPTER 2 Features All features are applicable to all boards, unless and otherwise mentioned. 1. Headless auto start on boot. 2. Voice control of GPIOs without IFTTT, api.ai, Actions SDK (Only for Raspberry Pi Boards - non OSMC). 3. Voice control of NodeMCU without IFTTT and MQTT. 4. Radio streaming. 5. Voice control of servo connected to RPi GPIO (Only for Raspberry Pi Boards - non OSMC). 6. Safe shutdown RPi using voice command. 7. Stream Music from YouTube. 8. Indicator lights for assistant listening and speaking events. 9. Startup audio and audio feedback for wakeword detection. 10. Pushbutton service to stop Music or Radio playback. 11. Parcel tracking using Aftership API. 12. RSS Feed streaming. 13. Control of Kodi or Kodi Integration. 14. Streaming music from Google Play Music. 15. Casting of YouTube Videos to Chromecast and Chromecast media control by voice. 16. Voice control of Radio/YouTube/Google Music volume levels. 17. Control Sonoff-Tasmota Devices. 18. Track Kickstarter campaigns. 19. Emulated Philips Hue HUB service and control of Emulated Hue Lights. 20. Search recipes and get push message of ingredients and link to recipe. 21. Remote control of Magic Mirror. 5 GassistPi Documentation, Release 5.0 22. Play your Spotify playlist. 23. Custom wakeword activation for all Pi boards using Snowboy and Picovoice-Porcupine. 24. Mute microphones to prevent listening to Ok-Google hotword (Only Raspberry Pi Boards - non OSMC). 25. Create custom conversations. 26. Control of lights added to Domoticz. 27. Stream music from Gaana.com. 28. Stream your playlist from Deezer. 29. Custom actions in French, Italian, German, Dutch, Spanish and Swedish. 30. Send commands over MQTT to the Google Assistant (Only Armv7 boards). 31. Control Assistant using IR Remote (Only Raspberry Armv7 boards). 32. Send Voice Messages from the SBC to the Mobile using Pushbullet (Only Armv7 boards). 33. Send Clickatell SMS messages. 34. CES 2019 Like Live Translator or Interpreter (Needs Cloud Speech). 35. Control Demoticz, Sonoff devices from other assistant devices. 36. Run custom script by voice. 37. Sending voice messages from phone to the Raspberry Pi. 6 Chapter 2. Features CHAPTER 3 Before Starting Note: For Non-Issue Help and Interaction Use Gitter: https://gitter.im/GassistPi/Lobby/ 3.1 Supported Platforms Note: • Do not use the prebuilt AIY Image. • Do not run the upgrade command. • Skip the updation process when setting up a fresh copy of Raspbian OS. Any single board computer or machine running one of the following OS: • Armbian Stretch • Raspbian Stretch and Buster • OSMC Stretch • Ubuntu Bionic 3.2 Getting Started Note: ${USER} will automatically take your username. No need to change that. Just copy pasting the commands on terminal will work. Install git and clone the project: 7 GassistPi Documentation, Release 5.0 sudo apt-get install git git clone https://github.com/shivasiddharth/GassistPi 8 Chapter 3. Before Starting CHAPTER 4 Configuring audio Note: • Non-Raspberry Pi users and users using other setups, choose the USB-DAC option. • The speaker-test command is used to initialize alsa, so please do not skip that. • AIY-HAT users, please reboot the Pi at places mentioned, else it will lead to audio and taskbar issues. • Those using any other DACs or HATs install the cards as per the manufacturer’s guide and then you can use the USB-DAC config file after changing the hardware ids. • Respeaker users, please do not use their official setup for this project. 4.1 Choose the audio configuration according to your setup Non-Raspbian users install Alsa first: sudo apt-get install alsa-utils 4.1.1 Users on Raspberry Pi OS Prior to Dec 2020 Release USB DAC or USB Sound Card Users Run the following in the terminal: sudo apt-get update cd /home/${USER}/ sudo chmod +x ./GassistPi/audio-drivers/USB-DAC/scripts/disable-onboard.sh sudo ./GassistPi/audio-drivers/USB-DAC/scripts/disable-onboard.sh sudo reboot (continues on next page) 9 GassistPi Documentation, Release 5.0 (continued from previous page) cd /home/${USER}/ sudo chmod +x ./GassistPi/audio-drivers/USB-DAC/scripts/install-usb-dac.sh sudo ./GassistPi/audio-drivers/USB-DAC/scripts/install-usb-dac.sh speaker-test AIY-HAT Users Run the following in the terminal: sudo apt-get update cd /home/${USER}/ sudo chmod +x ./GassistPi/audio-drivers/AIY-HAT/scripts/configure-driver.sh sudo ./GassistPi/audio-drivers/AIY-HAT/scripts/configure-driver.sh sudo reboot cd /home/${USER}/ sudo chmod +x ./GassistPi/audio-drivers/AIY-HAT/scripts/install-alsa-config.sh sudo ./GassistPi/audio-drivers/AIY-HAT/scripts/install-alsa-config.sh speaker-test AIY-VOICE-BONNET Users Run the following in the terminal: sudo apt-get update cd /home/${USER}/

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    48 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us