Picroft
Last updated
Was this helpful?
Last updated
Was this helpful?
Picroft is a ready-made way to run Mycroft on a Raspberry Pi 3 or Raspberry Pi 3B+ and is provided as a disk image that you can burn to a Micro SD card. Picroft will not work properly on other Raspberry Pi models.
As of December 2018, Picroft includes built-in support for the Google AIY voice HAT.
In order to set up Picroft, you will need to have a basic understanding of the Linux (Raspbian) command line, be comfortable connecting devices to WiFi networks, and have a little patience when setting up audio devices.
Model
Level of support
Pi3 B+
Supported
Pi3 B
Supported
Pi 2
Functions very slowly, limited wifi support
Pi B
Not supported
Pi A+
Not supported
Pi Zero, Zero W, Zero WH
Not supported
As well as a Raspberry Pi, you will also need:
Micro SD card, 8GB or larger highly recommended
An analog Speaker that can be plugged into the 3.5mm audio jack on the RPi 3 or a USB Speaker (Bluetooth on Picroft is difficult to get working and is not recommended)
USB Microphone
Installing Picroft may be easier if you also have:
USB keyboard
Monitor or TV connected via HDMI cable
Ethernet cable (if not connecting via WiFi)
NOTE: We do not gain any profit or benefit from the links below, they are provided only to assist you in acquiring compatible components.
Type of component
Model
Where to buy
Notes
Microphone
Blue Snowball
Microphone (and camera)
PS3 Eye
An excellent introductory model if you are just checking Picroft out.
Microphone and speaker
Jabra Speak 410
Premium microphone and speaker combination.
Speaker
Logitech Z50
If mycroft audio output fails (No speech or audio) when using some sort of USB soundcard for output it might be worth trying to reset the play commandlines used by mycroft.
To accomplish this, edit /home/pi/.mycroft/mycroft.conf
and insert
If no other edits has been applied to the file it should look something like
Next, the disk image needs to be burnt to the Micro SD card.
If you prefer to use the Linux command line tool dd
to burn the disk image instead, follow these instructions:
Insert the Micro SD card you wish to burn the image to. It must have a storage capacity of 8GB or higher.
Identify the path where the MicroSD card is mounted by running the command sudo fdisk -l
. You will be able to tell the path based on the storage size of the device.
Keep a note of this - it will be something like /dev/sdb1
Unmount the disk so that no other operation can write to the device while it is being imaged using the command sudo umount /dev/sdb1
. Make sure to substitute for the location of your device.
Run the command sudo dd if=path-to-your-image.img of=/dev/sdb1 bs=20M
. Make sure to substitute the location of your device, and the path to the .img
file you downloaded.
This will take several minutes to run. The command prompt will return if successful, otherwise an error message will be displayed on your terminal.
There are two ways to see the output from a Picroft Device:
Plug Picroft into a HDMI monitor or television, and attach a USB keyboard. If you are planning to connect Picroft to a WiFi network, you will first need to connect to a HDMI monitor or television so that you can manually configure Picroft's WiFi settings.
ssh
into Picroft once Picroft is connected to a wired or wireless network
If you would like to see the output of Picroft on a monitor (rather than SSH'ing in to Picroft), you can plug a HDMI monitor in to the HDMI slot on the Raspberry Pi.
If you would like to connect a keyboard or mouse (rather than SSH'ing in to Picroft), connect them via the USB slots on the Raspberry Pi.
In our experience, we've found most monitors, keyboards and mice are plug-and-play - ie. you shouldn't have to install any additional drivers.
Simply plug the ethernet cable into the RJ45 (ethernet) socket on the RPi. Picroft will then attempt to connect to the network, and request a DHCP address.
You will need to connect to your router, or use other networking diagnostics, to identify what IP address your Picroft has been allocated on the network.
By default, Picroft is not configured for WiFi. Picroft can connect to most 2.4GHz WiFi networks, but this has to be manually configured.
First, you need to be able to edit files on the filesystem of the Picroft. There are two ways to do this.
Plug the Picroft into a keyboard and HDMI monitor then type Ctrl + C
to get to the command line or
wpa_supplicant.conf
fileNext, we edit the wpa_supplicant.conf
file. This file controls WiFi connections for the Raspberry Pi.
Type sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Using the down arrow key, navigate to the bottom of the file, and add credentials for your SSID
Type Ctrl + X
to exit and Y
then Enter
to save your changes.
Type sudo reboot now
You will need to connect to your router, or use other networking diagnostics, to identify what IP address your Picroft has been allocated on the network.
Manually configuring WPA2 Enterprise WiFi with MSCHAPV2 authentication
If you are on an enterprise network, your network security might use WPA2 with MSCHAPV2 authentication. Configuring Picroft to use MSCHAPV2 is similar to the above, but requires some additional steps.
First, we need to generate a hash of your SSID's password.
Next, run the following commands:
Add the following to the bottom of the wpa_supplicant.conf
file, replacing ssid
with your SSID name, identity
with your username and password
with the hash generated earlier. Type Ctrl + O
to save, then Ctrl + x
to exit.
Next, reboot the Picroft using sudo reboot now
. If these steps have worked, you will be connected to your enterprise WiFi shortly after rebooting.
You will need to connect to your router, or use other networking diagnostics, to identify what IP address your Picroft has been allocated on the network.
NOTE: Picroft cannot connect to WiFi networks that operate in the 5GHz band. You must select a WiFi network that operates in the 2.4GHz band.
NOTE: Picroft cannot connect to WiFi networks that operate on Channels 12 or 13 (2467MHz and 2472MHz frequencies). Please configure your SSID to use a different channel or frequency. These channels are often used in Germany and other European countries.
Once you've burned the disk image to the Micro SD card, insert the Micro SD card into the Micro SD card slot on the Raspberry Pi. Plug in your microphone, speakers, and if you're using a monitor and/or keyboard, plug these in too.
Next, plug in the power and connect the Micro USB cable to the RPi. This "power on" the device.
If you have a HDMI monitor connected, you should start to see some output on screen.
If you're going to ssh
into Picroft, do the following:
ssh
into PicroftSSH access to Picroft is enabled by default, so you don't have to enable SSH access.
Ensure you know the IP address of your Picroft Device on your network. If your Picroft is already paired, then a handy way to do this is to install the IP Address Skill, and then Speak:
Hey Mycroft, what's your IP address?
"here are my available IP addresses: wlan IP address ... Those are all my available IP addresses"
If not, you will need to know what IP address your Picroft has. You may need to log in to your router to find out the IP address of your Picroft.
Open up your favorite terminal program, like PuTTy on Windows, or a new terminal on Linux
ssh pi@IPADDRESS
The default password is mycroft
, so enter this when prompted.
If you have successfully logged in via SSH you will see a command prompt like the one below:
You are now connected to Picroft via SSH.
On first boot, you will see a screen which looks similar to the one below:
Picroft will then ask you whether you would like to do the guided setup, or drop straight to a command line. If you are new to Picroft, we recommend that you complete the guided setup.
NOTE: Audio output and audio input is the single most problematic part of Picroft setup; we've tried to provide lots of guidance here to get you up and running, but you may need to experiment to find a solution for your chosen audio output and input devices.
The guided setup will then ask you to select your audio output device, as shown below:
Enter the number 1
, 2
, 3
or 4
corresponding to:
Next, test and adjust the volume. You may need to reboot your Picroft in order for the audio output device to be correctly selected.
The final step of the guided setup is microphone configuration. You will be asked to select your audio input device, as shown below:
Enter the number 1
, 2
, 3
or 4
corresponding to:
The guided setup will then do a microphone test to ensure your chosen microphone is working OK.
There are a few tricks that we know of to get your audio input or output device working correctly - however, these are somewhat technical and will require typing commands on the Linux command line interface (CLI).
Alsamixer
alsamixer
is a utility provided by the ALSA sound system on Raspbian Stretch that allows you to select an audio playback (output) and input (capture) device.
To run alsamixer
, type Ctrl +C
to exit the guided setup and you will be at the Linux command line. Type alsamixer
as shown below:
You will see a screen similar to the one below, and may have different options depending on which audio devices you have connected.
Different devices will have a different command key for choosing 'Capture' devices, in this case it is F4
.
If you do not see any capture devices, as shown below, then you may need to select a different sound card.
To select a different sound card, follow the instructions on your version of alsamixer
. In this case, the command key for choosing 'Select sound card' is F6
. Use the arrow keys on your keyboard to navigate up and down the list to choose your preferred soundcard.
alsamixer
usually has an option to see all capture and playback devices. In this case, the command key to see all devices is F5
.
pulseaudio
If alsamixer
does not work for you, then you may have some success with pulseaudio
. We've recently updated the Picroft repo to include pulseaudio
, but if you haven't updated for a little while then you may need to manually install it.
Once the Picroft is connected to the internet, and you have run through the guided setup, Picroft will reboot. Picroft will boot into the mycroft-cli-client
screen, and a Registration Code will be spoken, and will also be shown on the mycroft-cli-client
screen, as shown below:
To keep mycroft-core
and the Skills on your Picroft updated, first ssh
in to Picroft, then run the update.sh
script:
This script will update both mycroft-core
and the Skills on your Picroft device.
If you plan to do Skills development work, or other development work with Picroft, you'll find knowing these file locations useful.
Skills - have a shortcut in /home/pi
that points to /opt/mycroft/skills
mycroft-core
- is located at /home/pi/mycroft-core
Logs - are located at /var/log/mycroft/
mycroft.conf
- is located at /home/mycroft/.mycroft/mycroft.conf
Identity file (do not share) - is located at /home/mycroft/.mycroft/identity/identity2.json
There are several commands that are packaged into Picroft to help you with advanced functionality:
mycroft-cli=client
: This command will start the Mycroft CLI client if you are on the Linux command line
mycroft-help
: This command brings up help information
mycroft-mic-test
: This command re-runs the microphone test from the guided setup
mycroft-pip
: This command runs pip
within the Mycroft Python virtual environment
(venv
). This is useful if you are installing dependencies for Skills.
mycroft-say-to
: This command sends a command to Picroft, just like you had 'spoken' a command. This is useful if your microphone is not working.
mycroft-setup-wizard
: This command re-runs the guided setup
mycroft-skill-testrunner
: This command runs the testrunner
- used to run unit tests for a Skill. This is useful if you are doing Skills development with Mycroft
mycroft-speak
: This command gets Mycroft to 'speak' using Text to Speech.
mycroft-venv-deactivate
: This command deactivates the Mycroft Python virtual environment
and is useful if you want to install other software on the Picroft device.
mycroft-wipe
: This command wipes Picroft back to factory default status. This will unpair the device and remove any configuration changes you have made.
Congratulations! You now have a fully functional Picroft, and can start exploring all the options you now have. Consider using it as a stand-alone voice assistant, or connect it to a monitor and keyboard, and develop straight away. If you don't have a monitor and keybaord, SSH is enabled by default so you can remotely connect to it straight away.
Picroft uses a Raspbian Stretch Lite image under the hood - with Mycroft pre-installed - so everything you can do with Raspbian, you can do with Picroft. You can download other packages, get it running as a server - or more!
The answer is 'Yes' - but this requires some additional configuration.
You need to add the mycroft
user to the gpio
group with the command
sudo usermod -g gpio mycroft
You also need to install some additional packages:
sudo apt-get install python-rpi.gpio && sudo apt-get install python3-rpi.gpio
Picroft is based on .
Picroft is entirely open source, and PRs and Issues are warmly welcomed on the .
Power adapter with micro USB for your country. .
While we don't currently offer a Picroft kit with microphone and speaker to purchase , we've provided links below to components we know to work "out of the box".
United States , Australia , United Kingdom
United States
United States - , Australia - , United Kingdom -
United States , Australia - , United Kingdom
First, download the .
We also have a available of our unstable
branch if desired.
The on this, using Etcher software. We recommend that you burn the Picroft image to the Micro SD card using Etcher.
Download the
if you are already connected using a wired connection and you know the Picroft's IP address,
This will use the which is a 16 bit MD4 hash. Make sure to copy this as we will need it for later steps.
.
Once paired, you can then use to get started. For example, you can ask questions like 'Tell me about Abraham Lincoln' - shown below:
To reimage a Picroft Device, . Burn that to a MicroSD card using Etcher, and insert the burned MicroSD card into the Raspberry Pi, then connect the Raspberry Pi to power.
mycroft-msk
: This command runs the
mycroft-msm
: This command runs the
The Picroft image building instructions can now be found on GitHub at;
For more help or ideas, consider joining our or reading through our .
One common question we get is - "Can I use the on the Raspberry Pi 3 with Picroft?".
This provides some good examples of how to use GPIO input and output in your Mycroft Skill.