My MagicMirror2 & mycroft ai project


#1

So to start off with please bare in mind that I’m a total novice to this.

I was following a post by @dmwilsonkc who has been a massive help (thanks) but after try we found that my setup was not really right so decided to try on my own :thinking:.

I’m running a raspberry pi 3 b+
32gb SD card
PS3 eye
And at the moment just using headphones

I followed this installation method for the ai

And installed MagicMirror2 manually

So far so good but with a few problems no surprises there. I’m successful paired together with mycroft home.

My first problem is that a lot of the skills aren’t working, a few are like the joke skill and timer skill, on skills that are not I get the I don’t understand that or try asking a different way / questions asked cli typing

Seconded problem is that the ps3 eye mic is hit or miss I had it working once but now nothing, when running pavucontrol mic is working fine but nothing when running mycroft-core nothing.

Problem 3 I don’t get no talk back just beeping so I’m lost on that one totally

Any help would be greatly appreciated thanks


#2

ok so solved 2 problems

the beeping totally my fault / ALARM lol :flushed:
solved by “hay mycroft” / “delete all alarms”

the other problem i solved was my mic issues easy to solve by running these commands

pulseaudio -k

pulseaudio --start

now iv got to try figure out whats up with the skills, one thing with the skills iv noticed is that i cannot add or remove skills from mycroft home, but i could change the wake word.


#3

Hey, that’s excellent that you got it working!

Are you able to install skills using voice commands? eg

“Hey Mycroft, install pick number”


#4

yes iv tried “install” but with no luck,

and now one of my problems are back sound and mic have stopped working? i restarted my pi and now its gone again :disappointed_relieved:


#5

Have you checked the audio settings in mycroft.conf?

Also checkout the audio troubleshooting page as you are far from the first to have trouble with audio in linux!


#6

im not running picroft

running Mycroft for Linux


#7

@Jmh474 Awesome! Glad to hear you are nearly there! Wish I could help with the mic stuff, I’m only familiar with the RPi stuff. I had a terrible time myself getting pulseaudio started. I finally created a startup script to initiate the mycroft-core and to start pulseaudio.

  #!/bin/bash
     #start.sh for starting mycroft-core

  Echo Waiting for MagicMirror to complete startup...

   Sleep 25

    Echo Starting Mycroft-core virtualenv...
   
   Sleep 5

    Cd /home/pi/mycroft-core/

    start-pulseaudio-x11

     ./start-mycroft.sh all

     Sleep 5

     ./start-mycroft.sh cli

That is the only way I could figure out to keep the pulseaudio running every time the RPi rebooted.


#8

@Jmh474 Have you tried running the
cd ~/mycroft-core
Pulseaudio -k
Pulseaudio --start
After a reboot but right before you start Mycroft?

If that works, create a startup script like I did to automate it on boot. That is if you start Mycroft every time you reboot.

As far as installing skills, have you tried to install skills by typing “install cocktails skill” in the CLI for example?

To install the MagicMirror voice control skill you will need to cd to the skills directory and type

git clone https://github.com/dmwilsonkc/magic-mirror-voice-control-skill.git

Because it is not on the marketplace and cannot be installed by voice or typing in the CLI


#9

when i run

Pulseaudio -k

i get the response

bash: Pulseaudio: command not found

i know i have pulseaudio is installed


#10

@Jmh474 not sure if capitalization makes a difference. weird.


#11

Yep, @Jmh474 capitalization is important on linux systems, so Pulseaudio is a completely different command to pulseaudio

@dmwilsonkc are the capitals in your script above just on the post, or are they in your actual script? I didn’t think Cd would work unless you’ve created an alias for it.


#12

@gez-mycroft I used an iPad to make the post, and it has a bad habit of automatically capitalizing new lines. It is not in the actual startup script. Good catch. Sorry, I’ve got to watch that much closer.


#13

@dmwilsonkc

@gez-mycroft is right capitalisation does make a different’s, so iv tried running

arecord -vvv /dev/null

and the mic is showing up in testing but sound and mic just don’t seem to want to work in -mycroft- so there must be something im missing in the file

system of mycroft.

also when i run the

./start-mycroft.sh audiotest

the mic is picked up.

the mic just seems to stop working when i run ./start-mycroft.sh all and does not show mic level in cli.

sometimes the mic and sound work and sometimes it dont :thinking:


#14

You could try specifying the exact device Mycroft should use in your mycroft.conf file.

The audiotest now has an option to list the available devices so from your mycroft-core directory (usually ~/mycroft-core) run:
./start-mycroft.sh audiotest -l

From this output, copy the device name you want to use, eg “pulse”.
If it’s something like “HD-Audio Generic: ALC892 Analog (hw:1,0)” then you want to leave off the final “(hw:1,0)”.

Then edit the configuration file:
nano ~/.mycroft/mycroft.conf

Add the following entry:

"listener": {
    "device_name": "DEVICE_NAME"
  }

Where “DEVICE_NAME” will be the full name copied from above. Also be sure to add a comma to the end of the previous line (JSON is not very forgiving).

Finally make sure it’s fully restarted with:

./stop-mycroft.sh
./start-mycroft.sh debug

Delayed sound with UGreen usb sound card
#15

so its working this is the code after edit

{
“max_allowed_core_version”: 18.8,
“listener”: {
“device_name”: “USB Camera-B4.09.24.1: Audio”,
}

but when i reboot the pi the mic is missing again, do i have to insert this code every time i run mycroft?

so to my other issue my skills are still not all working, i think mycroft dont seem to be is seeing them and i can not add or remove from mycroft.home im successfully paired as iv changed from hay mycroft to jarvis


#16

Hi Jamie,

I’m assuming there’s an extra } in your mycroft.conf that just didn’t get copied across to the post?

Does the file revert after reboot to just:

{
  “max_allowed_core_version”: 18.8
}

This shouldn’t be happening, you shouldn’t need to modify the file on boot. So let us know if that is the case.

For the skills not working stuff, can you show us your skills, voice and audio log files by putting them in a pastebin (or similar)?


#17

yes after a reboot the file reverted back to as shown above, and yes sorry missed out the extra }. you’ll have to forgive me as this is my first project like this so its a big learning curve for me.

so here are my log files -

https://pastebin.com/u/jmh474/1/0/1/?guest=1

Hoping iv given you the right logs :thinking:


#19

Hey, no trouble at all, hope we can get it all ironed out.

I’d say until we work out why the user level mycroft.conf is resetting itself, you could add the listener attribute to /etc/mycroft/mycroft.conf instead. Just be careful with the JSON formatting making sure there are the right number of brackets and comma’s. From your logs it actually looks it can’t currently read that file. Have you edited /etc/mycroft/mycroft.conf already?

Your skills.log is also saying you have uncommitted changes to a range of skills which means they are not matching with those found in the github repo’s. To trigger an update of all skills you can run:
mycroft-msm update

If that doesn’t resolve it, I would try removing and reinstalling one specific skill and see if that helps. Eg:

mycroft-msm remove mycroft-weather
mycroft-msm install mycroft-weather

#20

So just a little bit of an update, I lost the plot and formatted the SD card :cry:.

But good news is mycroft is up and running, I have full control via skills market place, full voice control, mic working grate, sound via 3.5mm jack so I’m over the moon, still a few problems tho like to market place keeps dropping out but I think it could be my end (well I’m hoping it is).

Going to try installing MagicMirror2 later and add @dmwilsonkc skill, and see what other skills are out there.

Just one question is there any way to trigger a TIP120 for when mycroft is listening please as I have a 12v source I want to trigger (led strip)

Thanks for all the help for this noob


#21

Hardware is not my strong suite - but check out our documentation on the GPIO pins. There’s an example GPIO Skill too.

If you get stuck, Darren-Mycroft is our hardware hacker so will be able to provide better advice than I can!