Mycroft Community Forum

Pairing code line command?

Is there a line command to list the 6 character paring code?

Thanks.

-Mike M

check the logs (/var/log/mycroft/) or run the CLI and it will show it in there.

Thanks baconator for a quick reply. I have seen the six lines I need in the logs, but a line command sure would be nice. I’d write one if I knew where the key is stored.

-Mike M

Hey Mike, currently it’s not written to disk anywhere but the logs.

You could do something like:

grep -Po "Pairing code obtained: [a-zA-Z0-9]{6}$" /var/log/mycroft/skills.log | tail -1

Thanks for the hint. The one-liner is quite relevant for automated deployments too. Saves the struggle of going through logs manually.

1 Like

Thanks @gez-mycroft , I’ll write a short script such as lspairingcode.

-Mike M

This is how I did it with Ansible:

1 Like