Build an open future with us.

Invest in Mycroft and become a community partner.

Major Picroft Update - Moving to Raspbian Stretch


#1

Originally published at: https://mycroft.ai/blog/major-picroft-update-moving-to-raspbian-stretch/

It’s Alive!


There’s a brand new Picroft image available! Click here to get setup instructions. Read on to learn more.

In late 2016 I created the original Picroft as a way for anyone to interact with Mycroft, not just those who were able to purchase the Mark 1. Since then, Picroft has been downloaded more than 35,000 times. It has become the basis for numerous Raspberry Pi projects, like Magic Mirrors, home automation systems, robots, and hundreds of other wonderful testaments to creativity.

Picroft was designed to self-update, and we did publish some new versions periodically to simplify moving to major new releases. It has held up well and essentially remained the same for the last two years.

However, the new Raspberry Pi 3B+ introduced new chipsets that broke Picroft. The original Pi 3 is still available, but this was a good reason to show Picroft some love and introduce some cool new stuff.

[caption id=“attachment_40527” align=“alignnone” width=“1316”]The electricity that gave Picoft life will be how Picroft gives life to your Raspberry Pi projects. This was the sky the night I started rebuilding the Picroft image. Fitting, right?[/caption]

What’s New?

Lots of little things, and a few big things. Once things are up and running, it will still be Mycroft -- a voice interface. The main changes are at the setup and “plumbing” level. We also listened to the findings of our Picroft survey -- thanks to all who participated!

Stretch’ing ourselves

With the release of the Raspberry Pi 3B+ hardware changes required a new release of the Raspbian operating system. The new version is referred to as “Stretch” (following the tradition of Toy Story references). Picroft is now based on this latest version of Raspbian, allowing support for both the Raspberry Pi 3 and the 3B+.

No more packages, go Git it

To simplify and unify the Mycroft experience on the various platforms, we rethought how Mycroft should sit on the Raspberry Pi. At the low level, we switched from a Debian package install (which was originally a hack of the Mark 1 package that just disabled the faceplate) to a Github-based install that can be set to automatically update.

This unifies the Picroft environment with what most desktop developers are using, allowing us to simplify documentation.

Wizards!

One of the recurring issues users encounter is difficulty in configuring the audio pieces. Linux is incredibly flexible, but nobody wants to deal with the audio subsystems if they can avoid it. Configuring sound drivers is full of alchemy and dark magic. Connecting to all the different kinds of wifi security protocols is a whole different book of incantations. So we are including a Wizard with Picroft to help cast these spells!

During the initial setup, the user is now presented with a series of simple questions to configure the network connection, pick the type of microphone and audio output they want to use, and configure security options based on their intended use. Configuration happens automatically, and tests immediately verify the speaker output and sound levels, and the microphone input.

MOAR Microphones

We have a great community who have proven that Mycroft can operate with nearly any kind of hardware. Over the next few days, the Picroft image will incorporate support for the Google AIY Voice Kit array microphone. In the future, there will be an easy path for automating the install of other microphones, such as the Matrix Creator and Seeed ReSpeaker.

Environment Helpers

As I developer, I feel justified in making fun of every time one of us answers a question by saying something like:

Oh, that is really simple. First pip install pyjokes. Then just type python -m test.integrationstests.skills.runner. You are in the virtual environment, right? Oh, well you just need to do source /opt/venvs/mycroft-core/bin/activate before that. Still not working? Oh, were you in the venv when you did the pip install? …

I’ll let you in on a secret – this is also a pain for us and we probably mistype these commands half the time.

As part of this overhaul, we’ve unified most Mycroft related commands under a mycroft- prefix. This is particularly helpful because you can now take advantage of Linux’s excellent auto-completion by typing my<TAB> to get to mycroft-, then hit TAB two more times to see all the options available for you.

Helpers include:

  • mycroft-help Get brief summaries of the commands
  • mycroft-pip Install Python packages inside the Mycroft venv
  • mycroft-msm Invoke the Mycroft Skills Manager
  • mycroft-msk Mycroft Skill Kit, submit and manage skills in the community repos
  • mycroft-speak Make mycroft speak for you (handy inside scripts)
  • mycroft-say-to Send a string to Mycroft, just like you spoke it (also handy for scripts)
These same tools are also available under all other environments now.

What Else Can You Look Forward To?

We’ll be providing Skills that are unique to the Picroft environment, allowing you to attach buttons to the GPIO pins to emulate the Mark 1 button. Or use this example to do whatever else you might want to do -- this is your Picroft!

As mentioned above, we’d like to expand the microphone and audio hardware supported by Picroft. With a little help from community members, I expect we’ll have support for various USB and Bluetooth mics and speakers soon. Join us on the forums to give feedback on AIY integration, how to pipe in new mics, and what you’d like to connect over GPIO.

Gimme, Gimme, Gimme!!!

You can download the new Picroft image from https://mycroft.ai/to/picroft-image. Learn all about it (including exactly how it was built) from https://github.com/MycroftAI/enclosure-picroft/tree/stretch.

Go, download, and hack!


Hardware recommendations (Picroft)
#2

I’m look for feedback on how this image is working for you – I only have a few mics myself!

I know the AIY setup isn’t up to snuff yet, but decided to push this since AIY wasn’t supported by the previous stable image, and this is definitely an improvement when using the supported mics. I could use help from anyone who can assist in getting AIY, Matrix, Respeaker or any other non-standard mics running. Same for Bluetooth speakers (I’m not sure if anyone has that working well yet).

Thanks all!


#3

P.S. This article got pushed before I had updated the picroft-image link. So if you downloaded the image before this message, you probably need to re-download it. The new image shows ASCII-art “Mycroft” and “Picroft” at boot, so it is easy to distinguish.


#4

@steve.penrod thanks for creating the picroft images and updating to Stretch. They make setting up a picroft really simple thanks!

Do you have a checksum for the raspbian-stretch_Picroft_2018-09-12.zip? I could only find them for the previous releases on the enclosure-picroft github. I’ve already had a failed download attempt (stopped at 2.097 GB) so would like to check the image when I manage to get it to download fully.

I’m hoping to get a bluetooth speaker/mic to connect to this new version. I couldn’t get raspbian_Picroft_2018-03-14.zip (which I normally used with a PS Eye and analogue speakers) to find any bluetooth devices (the scan kept timing out no matter what trickery I tried to apply from the web). I have another Stretch rpi (a reropie) which connects to bluetooth without any hassle so I hope to compare them like-for-like if I run into any problems.

EDIT: I found the checksum on the enclosure-picroft github. Not sure how I missed it earlier sorry. (failed to download twice now :frowning:)


#5

I have a cople of Google AIY’s and as soon I get the time i will install this, and try to get it to work whith mic an audio.


#6

Awesome! If you do get that working I’d really appreciate it if you can document the steps exactly so we can make this a one-click operation for everyone.


#7

AIY v.1. Pi 3B+ 3A m-c 18.8.1
On the AIY option (3) it pulls lots of stuff in, looking similar to the google assistant version. The speaker comes up in a google voice model, but nope, no microphone. Best of luck with this part. The button light/function, is not triggering either. I’ve tried a variety of fresh installs, with a Samson USB mic as well, but not so much. That one throws errors.


#8

I have made a PR whith changes to auto_run.sh so installation of Google AIY works :slight_smile: It also make some changes to config.txt and mycroft.conf and add a asound.conf.

I think it works….


#9

Thanks so much @andlo!