Upgrade Mark1 to 18.02b over SSH

Can I upgrade my Mark 1 to the 18.02b release over SSH? I’ve read the upgrade instructions and they either involve taking my Mark 1 apart (which I really don’t want to do, not least because I don’t have a long-enough thin screwdriver) or upgrading by voice command. However, I cannot get it to recognise the install platform patch command, or indeed hardly any other voice commands at all. (Fixing this is exactly what I’m hoping 18.02b will do.) I have enabled ssh as per instructions and can ssh into the Mark 1; can I do the equivalent of install platform patch from the command line?

looking at /var/log/mycroft-speech-client.log on the device, it seems to not be finding intents.

00:54:16.426 - mycroft.client.speech.main:handle_utterance:61 - INFO - Utterance: [u'what time is it']
00:54:16.467 - mycroft.client.speech.main:handle_complete_intent_failure:77 - INFO - Failed to find intent.

so this suggests that it’s not recognising install platform patch because it’s broken in some way. So perhaps a better question would be “how do I fix this, without taking the device apart and reflashing it?”

I’ve tried using msm default to update the default skills, but it can’t write to any of it; this is because I’m sshed in as the pi user, but all the skills are owned by the mycroft user. The msm docs don’t mention anything about that. Should I just be changing to the mycroft user to do command-line management? I don’t seem to be able to ssh in as mycroft.

Yes, you can definitely upgrade via ssh. The command to upgrade is:

curl -sL https://mycroft.ai/to/platform_patch_1 | base64 --decode | bash
sudo apt-get update
sudo apt-get install -y mycroft-mark-1 mycroft-core

Let me know if this helps :slight_smile:

I’m not sure it has, I’m afraid.

pi@mark_1:~ $ curl -sL https://mycroft.ai/to/platform_patch_1 | base64 --decode | bash
Detected platform: mycroft_mark_1, build: 9
pi@mark_1:~ $ sudo apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://repo.mycroft.ai debian InRelease                                    
Hit http://repo.mycroft.ai debian/main armhf Packages
Get:1 http://repo.mycroft.ai debian/main Translation-en_GB [339 B]             
Get:2 http://repo.mycroft.ai debian/main Translation-en [336 B]                
Get:3 http://repo.mycroft.ai debian/main Translation-en_GB [339 B]             
Get:4 http://repo.mycroft.ai debian/main Translation-en [336 B]                
Get:5 http://repo.mycroft.ai debian/main Translation-en_GB [339 B]             
Get:6 http://repo.mycroft.ai debian/main Translation-en [336 B]                
Get:7 http://repo.mycroft.ai debian/main Translation-en_GB [339 B]             
Get:8 http://repo.mycroft.ai debian/main Translation-en [336 B]                
Get:9 http://repo.mycroft.ai debian/main Translation-en_GB [339 B]             
Ign http://repo.mycroft.ai debian/main Translation-en_GB                       
Get:10 http://repo.mycroft.ai debian/main Translation-en [336 B]               
Ign http://repo.mycroft.ai debian/main Translation-en                          
Reading package lists... Done                                                  
pi@mark_1:~ $ sudo apt-get install -y mycroft-mark-1 mycroft-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mycroft-core is already the newest version.
mycroft-mark-1 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 148 not upgraded.

pi@mark_1:~ $ apt-cache policy mycroft-core
  Installed: 18.2.2
  Candidate: 18.2.2
  Version table:
 *** 18.2.2 0
        500 http://repo.mycroft.ai/repos/apt/debian/ debian/main armhf Packages
        100 /var/lib/dpkg/status
pi@mark_1:~ $ apt-cache policy mycroft-mark-1 
  Installed: 18.2.2
  Candidate: 18.2.2
  Version table:
 *** 18.2.2 0
        500 http://repo.mycroft.ai/repos/apt/debian/ debian/main armhf Packages
        100 /var/lib/dpkg/status

So this suggests that I’m already running 18.02? And yet nothing works; no intents are fired and msm can’t upgrade them. This seems… worrying…?

msm default also seems to be confused:

pi@mark_1:~ $ msm default
=== Checking for default skills
rm: remove write-protected regular file ‘/opt/mycroft/skills/.msm’? ^C
pi@mark_1:~ $ ls -l /opt/mycroft/skills/.msm
-rw-r--r-- 1 mycroft mycroft 504 Mar 22 08:30 /opt/mycroft/skills/.msm

Hi @Sil, can you ask Mycroft, Hey Mycroft, what is the listener??
I’d just like to confirm you’re using the Precise Wake Word Engine:

It was made default in 18.02b, so I just want to check that it’s installed.

Best, Kathy

The current listener is Precise, says Mycroft.

However, bizarrely, things seem to be working now! I didn’t change anything :frowning: How can I best work out whether my Mark 1 is operating correctly and is up to date?

Sure, to ensure the Device is up to date say Hey Mycroft, what version are you running?
This will show the currently installed version and whether it is the latest version. If it isn’t, it will prompt you to upgrade.

To ensure correct operation, a basic ‘health check’ looks like:

  • On reboot, blue spinny eyes, followed by Yellow Eyes, then full blue eyes

  • Unit responds to Wake Word with a “ding” sound

  • Unit responds to basic commands like;

  • Hey Mycroft, show me the time

  • Hey Mycroft, what's the weather like

  • Hey Mycroft, set the color to Indigo

  • Hey Mycroft, what's your IP address

Yup. All of that is working. How strange; I didn’t do anything, and now things seem to be working. Unclear why it happened (and I’m happy to provide debug information if I can). Mycroft says it’s running the latest version (hooray!)

However, msm default still does the following:

pi@mark_1:~ $ msm default
=== Checking for default skills
rm: remove write-protected regular file ‘/opt/mycroft/skills/.msm’? 

am I safe to remove that file?

No, try sudo msm default :slight_smile:

Ah, I’m meant to run it as root? The docs don’t say that (and indeed all the example commands are not run as root). It might be worth clarifying that in the docs; like apt, “query” commands can be run as the pi user but “updating” commands should be run as root with sudo.

Good point @sil

/me flags for documentation follow up :slight_smile: