Mycroft Community Forum

Programming Mark1 directly from your computer (no Github needed)

Hi folks,

After a year or so I have unpacked my Mark1 again in an effort to automate my new house and learn some extra programming in the process :slight_smile: My goal is to set up the Mark1 and be able to program it quickly without using Github, since I don’t want to keep pushing and pulling stuff in order to test the functionality of it (I intend to use a lot of the hardware features of the Mark1 so testing on my laptop is in many cases not an option). I am not a programming wiz by any means so right from the start I found myself running into some problems.

The Mark1 itself is running fine, I installed the latest image for it and updated the software without any problems. To reach the files on the Mark1 I tried using the SSH-extension of VSCode (which I’m using as my default programming program) to connect to it, but it seems like Jessie is to old to support it (I can SSH into it using the command line though). As an alternative I managed to mount the raspberry pi in my Linux WSL that I run on Windows so I can see and edit the code directly from there. The problem I’m currently facing with this approach is that VScode does not seem to recognize the Mycroft libraries and I haven’t been able to find a lot of documentation about it online, so I’m kind of in the dark about all the functionalities the Mycroft library provides.

To solve my problem I would like to tap into your knowledge and ask you the following questions:

  • Do you think this is the right approach for me, or is there another approach that I didn’t think of to achieve the quick programming/debugging/testing I would like to have?
  • If so, is there anyone out there who might be able to help me with correctly using the Mycroft libraries in VSCode (or point me to a place where I can find the complete documentation)?

Thanks in advance, looking forward to starting my project!

As an alternative to VSCode you can try the Theia-IDE skill

1 Like

Thank you for your reply, that looks great! Unfortunately the page states that Mark1 is no longer supported in that skill :frowning:

Sorry, its been a while that I used the skill on my Mark-I and didn’t notice this change.

Don’t know what resources you have available, but for Mycroft development I currently use a Ubuntu-18.04 VM running in VirtualBox (on MacOS) - maybe that is an option for you?

1 Like

I’m currently also using Ubuntu 18.04 on a VM. My main problem is that I’m having trouble accessing the code on my Mark1 for code-completion. This is not necessary for the execution itself since that still happens on the Mark1 but it does allow me to check how I should program it. An alternative would be to have proper documentation somewhere online but I wasn’t able to find that as well. An example of what I’m trying to do is to change the eye-color of my Mark1 when it goes into sleep-mode. For this I need to know how to set it (by using some functionality of mycroft.enclosure), however I can’t seem to find which function/property to use.

How do you do your development exactly? Do you have a program (like VSCode) that uses autocompletion or do you have another way to check how to call upon mycroft’s functionalities?

In my Ubuntu-VM I use VSCode with a local Mycroft instance (installed from the GitHub repo). This setup won’t work when developing specifically for the Mark-I enclosure of course.

As the Theia-IDE worked on Mark-I in a previous version you might want to check out an older commit of the repository. Maybe the author @andlo can help you out identifying the exact commit that will work?

1 Like

If it just some simple coding that you want to edit on your windows pc but execute on the Mark1, this is what I use;