• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

A magic mirror based on Raspberry Pi3B, Respeaker sensor and google assistant (Tutorial Inside)

Scheduled Pinned Locked Moved Show your Mirror
6 Posts 4 Posters 9.3k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    Rosley GE
    last edited by Rosley GE Nov 2, 2018, 6:59 AM Oct 18, 2018, 8:47 AM

    I did a magic mirror with ReSpeaker 4 Mic Linear Array to add voice interface to a Magic Mirror. It is very interesting. Children like it so much. hahah
    As using a 4 Mic Linear Array, we are able to detect sound Direction of Arrial (DOA) which can be used to provide some creative functions. We can use beamforming to enhance a specific direction’s sound. It is really a good sensor to do voice related projects. The link is as below.
    respeaker-mic

    alt text

    Bild Text

    Material:
    Raspberry Pi 3B
    ReSpeaker 4 Mic Linear Array(sound card)
    HDMI display
    two way mirror
    frame
    SD card
    Raspberry Pi 3B
    ReSpeaker 4 Mic Linear Array(sound card)
    HDMI display
    two way mirror
    frame
    SD card

    :grinning_face_with_smiling_eyes:


    Software Tutorial for you

    Setup Raspberry Pi

    Download a customized pi image, which includes the sound card’s driver and some voice related packages (Do not use the lite version for we need desktop enviroment to show GUI). We can write the image to a SD card with rufus (very tiny but only for windows) or ether.

    If you don’t have any extra keyboard to access and configure the Raspberry Pi, you can setup WiFi configuratio and enable SSH before first time boot. To do that, Juse add a file named ssh to the boot partition of the SD card, which enables SSH, and then create a file named wpa_supplicant.conf with the following content, replace ssid and psk with yours

    country=GB
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    network={
         ssid="WiFi SSID"
         psk="password"
    }
    

    Power on your Pi, use Pi’s IP or raspberry.local(requires mDNS support, need to install Bonjour on Windows) to login via ssh (On Windows, putty is a handy ssh client).

    alt text
    Install Magic Mirror

    To install Magic Mirror software package, just run:

    bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
    This command will clone MagicMirror repository from github to ~/MagicMirror, install node, npm and other dependencies.

    Note: Do not use apt install to install node and npm, node and npm in the deb repository is kind of outdated. Remove them if already installed.
    Install Magic Mirror modules: MMM-Remote-Control and MMM-kalliope

    cd ~/MagicMirror/modules
    git clone https://github.com/kalliope-project/MMM-kalliope.git
    git clone https://github.com/Jopyth/MMM-Remote-Control.git
    cd MMM-Remote-Control
    npm install
    

    and then add the configuration of MMM-Remote-Control and MMM-kalliope to moddules of ~/MagicMirror/config/config.js

    {
        module: "MMM-kalliope",
        position: "upper_third",
        config: {
            title: "",
            max: 1
        }
    },
    {
        module: 'MMM-Remote-Control'
        // uncomment the following line to show the URL of the remote control on the mirror
        // , position: 'bottom_left'
        // you can hide this module afterwards from the remote control itself
    },
    

    restart MagicMirror to enable the new configuration. Use the following command to test if we can send a message to MagicMirror

    curl -H "Content-Type: application/json" -X POST -d '{"notification":"KALLIOPE", "payload": "my message"}' http://localhost:8080/kalliope
    Configure Weather module

    By default, a weather module using OpenWeatherMap is included, we need sign up OpenWeatherMap to get a API key and fill the key to ~/MagicMirror/config/config.js

    Set Google Assistant

    Go to Introduction to the Google Assistant Library to install and setup Google Assistant Library

    After authorization, we can just run mirror_with_google_assistant.py to start the Google Assistant for the Mirror.

    1 Reply Last reply Reply Quote 1
    • Z Offline
      zdenek
      last edited by Oct 19, 2018, 4:14 PM

      @rosley-ge said in A magic mirror based on Raspberrt Pi3B, Respeaker sensor and google assistant (Tutorial Inside):

      respeaker-mic

      wow, looks great. I’ve no expirience connecting any HW to RPi. Can u plese give StepByStep how to connect Mic+Repro?

      thanks, Zdeněk

      1 Reply Last reply Reply Quote 0
      • R Offline
        Rosley GE
        last edited by Oct 22, 2018, 2:01 AM

        Zdenek,
        Don’t worry. It is very easy. The respeaker mic sensor has many detailed connection guidance. You can visit respeaker wiki first.
        Respeaker-wiki
        If you have any question, I am happy to share my experience.

        1 Reply Last reply Reply Quote 0
        • C Offline
          canadrian
          last edited by Nov 8, 2018, 4:17 PM

          Hi,
          Looks beautiful.
          Where I can download the image from? Thanks.

          R 1 Reply Last reply Dec 3, 2018, 1:04 AM Reply Quote 0
          • P Offline
            Peter
            last edited by Nov 8, 2018, 6:17 PM

            Interesting!
            Are MM and GA independend or can you influence MM with GA (like showing or hiding modules)?
            I think I made my mirror in the same way.
            I have the original Google AIY kit in my MM.
            They work independend: I can ask Google any kind of questions, set timers and turn on the gardenlights and the fountain in the pond with my voice.
            But I cannot hide or show modules with voice.
            I am very interested in integrating MM and GA, but I do not know how.
            Peter

            1 Reply Last reply Reply Quote 0
            • R Offline
              Rosley GE @canadrian
              last edited by Dec 3, 2018, 1:04 AM

              @canadrian Just download it from Raspberry Pi official website. It is convenient.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy