 We're here today to talk a little bit more about my craft. My name is Steve and joining me today is Chris Say hello Chris Yeah We are in different time zones if you couldn't tell I'm from North America and my compadre there is from down under So So the the purpose of this video is or these series of videos Hopefully is I I approached my craft as a project as a person who has not done any kind of development work for Anything related to AI and I looked at this and thought hey, this is really neat. I'd like to get involved in this and so I did what everybody did it does when they don't know anything and they go out and try and teach people I wrote some articles on open source comm and From that came a lot of questions about well, how do we how do we do these things? how do we get involved what do we do and a lot of people are looking for a more interactive way and Hopefully if we get enough feedback from this Chris and I will do a couple more of these videos and we get some feedback Well, we'll help shape What we kind of cover? So Chris, why don't you tell us a little bit about yourself? Yeah, so I'm Kers or Chris and I'm the Director of developer relations just have to remember my title don't really use it very often I do dev roll at at my craft and Presuming that everyone knows what my craft is if not go to my crop today. I But yeah, the my primary role is to Support the community to be involved in my craft in in all the many ways that that might involve But we're also a very small team. So I also do development and communication stuff and Anything else that needs to happen, you know So, yeah, that's that's me you wear many hats Many hats. Yeah So, what about you? You've got introduced yourself as well. So my name is Steve. I work for Red Hat Which has absolutely nothing to do with this but just I work as a consultant for Red Hat So I go on client site and I attempt to Solve problems that they have with with particularly Kubernetes open shift and containerization So that's kind of my background. I've done Python for years and while I don't consider myself a Python dev I've gotten fairly decent at being able to to create some competent code and I use that to kind of support my my workflow and so What I really liked about my craft is it's got a lot of Python and that is an easy on board for me right like that was something that was really easy for me to pick up and get into and so with With getting in touch with Chris. It has been a really Interesting journey getting Integrated into the mycroft community again. I'm not I'm not a developer There's there's a couple of guys out there like Jarvis who they're just producing volumes of skills All the time and that's not going to be me But what I can do is I tend to be the guy that ends up knowing people and making those connections so I hope to be able to connect Chris with parts of the community and and extend the reach and get some excitement around the project because I think it's a really important project to have a balance and And and an offering from the open source side of things to to an Alexa or a Google home And so yeah, they we're hoping to show you how to get up and running with with mycroft Particularly when you're talking about setting up virtual alms or Anything where you might need to target a specific version of Python or just generally onboarding into the development process Yeah, fantastic. I couldn't agree more and we'll get into the technical side in a second, but just to focus on What you were just saying around contributing to mycroft like I think a lot of people think of open source as Code in a github repository or in you know in a git repository of some kind But we really believe in open source as You know a movement of people who are all contributing to make this possible and that that includes developers it includes You know technical writers or you know people who can communicate in a technical way It includes people who have design skills. It includes testers includes people contributing Their data if they if they opt into the open data set, you know, there's just so many ways that People can contribute to mycroft in a really meaningful way and they are all as important as each other So just want to make that clear And that really kind of works out for me because one of the skills that I have is Being an information aggregator. I'm technical enough to be able to understand what I'm being told I may not be an expert implementation Specialist, but what I can do is I understand the information well enough that I can then Well, I can teach it to other people. I'm able to translate some of that more difficult language into an easy to understand on-road path And so my hope with this series is that working with Chris we can really make Onboarding into the project approachable, you know, like one of the things I found was very interesting about the community was Everybody says oh our community so open and and you know, we're welcoming everybody says that nobody says our our community is terrible We're full of grumps But with with mycroft, I found that it actually was true like I actually felt a part of the team From the from the near beginning like people were there ready to answer the questions He it's it's a small dedicated core of people even the volunteers, but man, are they passionate? Yeah, absolutely. We have we have a really amazing group of people and You know a lot of work's been put into that over a long time from from well before I joined the company But you know, I think it shows how much how much passion there is for an open-source solution in this space and particularly when You know, we're at a time right now where we are Missila's needing to scale back a lot of their work in the space and and that's left a really big hole and Yeah, I think It's really important for for projects like mycroft and and other open-source projects in this space to to really be open And approachable and to to work together wherever we can Because we are going up against the biggest kind of companies in history. So yeah So the purpose of what I hope to achieve here is we're going to walk through the kind of like the setup of Mycroft and how to onboard yourself into the common IoT and I think this is kind of important for us to capture because You know, you and I have had several conversations as a sidebars How do I get this thing running or whatever? And I I happen to be competent at Python But I'm not at all competent with get like I can do a clone and I could do a rebase but that's you know kind of Out of my wheelhouse And so I was thinking there's probably a lot of other people like me that that are competent on hacking on something But how is it that we get them to a place where they can do this on their own and actually feel Not lost especially with home assistant and open-hab really kind of taking off What I have here is I've got an Ubuntu 2004 because This is probably the most common target for development. I would think yeah So the only thing that I have done so far is installed get and all of the updates and then I rebooted it So we're completely fresh. So let's start with Right now So I want this to age well And so the idea is is we're probably going to be in this situation in the future where we're going to have to use virtual Oms from for a previous version of Python because of the support that you have to give to different Hardware products and stuff like that. So the idea here is How do I set up a virtual Oms and how do I get my craft core installed using that virtual Oms? Because by default it wants to use the the core Python in your system So the the the set-up scripts That my cross ships with it will do both of those things for you it'll create create the virtual environment and You can pass in an argument to say what version of Python you want to use. Okay, so Through that. So where do I get started here? Well, maybe we should open up the micro documentation just so that we kind of show people 100% You know where they go. So if we we have an browser and head to micro that AI slash documentation All right, so here we go. We are on the documentation the documentation page here cool, so we we want to get my crop to start with and then There's a range of ways that we can do we can use it, but we're probably Just interested in the micro for Linux So the the classic mechanism and that that most people Have used to date and that you know unless we say otherwise This is kind of a the way that that will install it is using a git clone process so if we scroll down to getting started and Yeah, we can see that there's there's four commands The first one obviously just changes you into your root directory and then the next one Ones the repository We'll do that. I normally like to have a git projects directory instead of putting things in the base of my home directory So I'm just creating that to help organize myself Totally and my crop shouldn't care where it lives on the system. There's a lot of like it will it will try and Put things in the places that it expects, but we're also adding support for things like the xdg standard so so that you know if uses a Setting their systems up to use that standard then then it will it will respect that I'm gonna go ahead and clone this All right So now we're now Yeah I'm gonna go in here. So all I'm doing here is just I'm just looking at these commands So I'm assuming I don't want to run the dev setup yet. Oh, we're like that Yeah, that's that's true. So and so we were talking you were mentioning before that we We might want to set a particular version of Python And so I think by default 2004 You've been to 2004 runs Python 3.8. Is that right? Apparently it doesn't have Doesn't have Python installed. Oh, it's Python 3.8.2 Well, what version is in the mark one because that's really what we're targeting here. We have to be the lowest common denominator Yeah, okay. Well, then let's go 3.7. That's that's what's in the mark one now. So Hey, we'll do this Ah dead dead snakes very nice So world moves forward at a rapid pace Yeah, yeah, it does It doesn't feel like 3.7 came out that long ago so while we're going through the the installation process mycroft requires the Python headers, which is inside of the dash dev Packages inside of the Debian base system. So you're going to want to install Python 3.7 Python 3.7 Virtual omb which is the V ENV package you can install the docs if you want to you can install bin utils and the the bin FMT support package the ones you really need are the Python 3.7 the Python 3.7 v omb and the Python 3.7 dev packages All right, so now we want to get back to that that dev setup shell script and So it's it's like a setup wizard, you know, it'll it'll ask you some questions Set things that anything up automatically that it can But for this one we want to pass in a flag dash P For Python and then we'll we'll pass in the Python 3.7 So it knows. Yeah, that's the that's the Version that we want to use and then it should use that to set up the virtual environment and Therefore everything else that that mycroft does will then be will be done within that environment. So Yeah, so we can run that Yes, we want to run the stable branch Sure, we'll have it automatically update build mimic Well, I was just gonna time-lapse it, but sure you want me to kill it again It will take a while All right, take two Yeah Maybe don't do auto updates for the moment. Okay Just for the purposes of this Just because we'll be manually, you know doing doing to get stuff make sense But yeah, I'd say no just for the purposes of this tutorial It's a good thing to go and grab a coffee on you know Yeah, let's add the helper commands. So just just adds the micro core flash bin directory to your path so that Just exposes some some helper commands to make things a little easier check for code style if I'm sure answer. Yes Yes, I Think that's a good one to do as well As long as you're happy to do it because it means if you are contributing any code to the project then You get a warning that something's wrong While you're trying to do the commit rather than pushing the pushing the code up and then having Microsoft's continuous integration services, you know post public messages telling people that you have, you know a Trailing white space or something stupid, you know So yeah, it just catches all that little stuff So are you using static analysis in like I mean usually stylistic things like PEP 8 are mostly For static analysis and that sort of stuff. Is that what's happening in the in the CI CD pipeline? We just use pilot Yeah, yeah, and that'll throw a lot of that'll throw a lot of errors. Yeah. Yeah, it throws a lot. Yeah. Yeah There's been talk about black as well, but that's a whole different discussion So this this is a good question that will often come up as well So basically there's a there's a package conflict And in the past it has caused some problems because you know with with the way that Linux handles dependencies, you know If we remove if we install a particular package and it conflicts with another package It won't it cannot allow both of those packages to exist. So it removes the other package and then it turns out that that package was a dependency of a dependency of a dependency and It it particularly caused problems with them with wine so Anyway, now we just have this this big warning there to say Please pay attention to what? the installer is Telling you it's gonna remove So if we hit enter it will then show us what it's going to install and What's suggested and What will be removed? So in this case The only thing being removed is that the jack. Yeah So that's not going to cause any problems Well, it's very unlikely to cause problems. The problem would be if it, you know people are having, you know wine and a range of other packages that were relying on that live jack being removed and you know caused a whole lot of It's unlikely fortune. We just have that warning It's unlikely that unless you're installing this on a professional audio system You're probably not using live jack because jack takes a lot of extra setup to to work through so yeah Yeah, so dev setup will also run anytime. There's a doesn't a significant update to the microcorp Software You know if you just change change a few lines of code then it won't need to run But you know any any actual update of the the microcorp version It will rerun dev setup to make sure that everything's still You know that all the dependencies are up to date and all that kind of stuff So this brings up a question that I thought I've been asked this quite a bit after writing those articles and so people have been wondering Can you use mycroft completely offline? Because right now it automatically proxies out to Google for a lot of its stuff And so the questions have been like can you use this offline and my yeah, I'm not really sure basic answer is yes, but You can use mycroft completely offline the biggest Issue is that speech-to-text so the speech recognition this there isn't a great open source solution for that yet so Calde is a long-running project that was Excellent when it first got released But you know, it's it's pretty old now and they're still doing updates But it's based on some pretty old technology and deep speech from Mozilla is the other player here But it disregarding the changes that are very recently happened at Mozilla even even before that You know, they didn't feel it was up to to the standard required either so they're Firefox Voice project, I believe also used Google's STT service So, you know, it's I know we're working towards but at the moment, it's not a simple task. So you can do it there is a Personal back-end which can replace the What's called Salini our home dot mycroft.ai back-end And one of our community members Java Jarvis has Of course, it's him. No, it's of course. It's him. Oh, yeah, yeah, he does everything he's he's got a skill that actually Mocks out a back-end so it is even simpler than the personal back-end and so that's something that People can use as well. Obviously Things that aren't in the mycroft marketplace There's always the disclaimer that if it's not in the mycroft marketplace, then we haven't reviewed it so People should be reviewing any code that's putting on their devices and you could you could even choose to use mycroft and still use Cloud services, you know, take mycroft's back-end out of the equation isn't is another option. I guess that the value that you get by using mycroft's back-end is that all the requests to things like STT services are then propped through mycroft's servers and sent anonymously to the third-party services. So Google can't tell that They can't profile individual users and say, okay, this person was from this IP address was asking about this and then they were asking about, you know this medical problem and then they were asking about the opening time of this thing and and all that sort of stuff. So they can't tell if it's one user asking 10,000 queries or 10,000 users asking it one query each And we wherever possible we send flags to opt out of any data collection by default. Yeah, we try and handle all that for you and and that's yeah, I guess one of the one of the values of using using our services Now that we are now that we've got mycroft installed We should in theory have a virtual on for kicking around here. That will be for Python 37 Yeah, to activate the virtual environment for us. So we can we can just bash that Oh, sorry, so what's it? Now where we should be if I just type Python we've got Python 379 Excellent. Yeah And just for people that aren't familiar with Python virtual environments, we can see at the start of the At the prompt and we've got a then in prices Which tells us that we're inside that virtual environment and that's basically It's kind of like a precursor to snaps where it took all it takes all of your dependencies and puts it in a local directory and then Takes that at the front of your path for lack of a better way of putting it so that anything in the local directory then Like anything any pip stuff that you install the Python binary is also kicking around in here So all of these things are put locally for you Yeah, and if you if you then Want to remove my croft and all of the dependencies that it's installed you remove the Well, you can remove the entire microp core directory or you can just remove the microp core slash dot V and V and that will blow away that virtual environment So now that we've got my croft Installed it probably hasn't been started yet So is our next step then to start my croft So I think let's do you start my croft with debug argument so the debug argument is going to start all the services and And watch the command line interface as well Because you'll see some some messages about precise in green Because this is you know more of a development environment it doesn't come pretty shipped with them With precise so it falls back to a pocket Sphinx Wakeward spotter until it finishes grabbing that So you'll probably notice that it's not as good at detecting your hay microps at first and then Once it's finished installing that it'll it'll get better. So I'm gonna take this registration Offline I'm not actually gonna show that part, but I'm gonna do that here in the background right, so We've got my croft up and running and one of the things that we were discussing in our little break was that We initially ran with the debug. So we did a start my croft dot s with the debug option here But what I inadvertently learned was that if you leave the command line shell by doing this control C It also stops all of the services because of the way that debug instantiates itself so What we were talking about was perhaps it's better to run the start all and Then afterwards launch the my croft CLI client so that if you need to drop back out of the Out of the client here for any reason you're not actually taking my croft out with you Yeah, so I mean in some ways it is It can be benefits to both like if you're just wanting to run my croft quickly And then when you control C, you've you've quit it and you can walk away You know, that's nice and quick if you do Start all services and then launch the CLI Then you need to make sure that if you don't want my croft running that you stop my croft services as well That makes sense So where do we go from here now that we've got a basic my croft instance up and running? Yeah, so now what we're interested in is installing the well, so we want to we want to get home assistant Running as an example skill That's using but can use the common IoT framework So because the the framework is is currently included in my croft core But it's not it's not publicly available So there's a there is a another piece of the puzzle that we need to add in as well, which is the common IoT control skill Because we're in the virtual environment, we can just use MSM But even if you're not in the if you're not in the virtual environment Then you can use I think as you were about to do is use the The the the my croft dash MSM commands that's in the bin directory of my core Yeah, so so MSM we want to install a skill and We can just use the the URL of any skill that we want to install so For the common IoT we'll probably want to go to github That is a very smart way of doing it So is this the one we want the skill IoT control? that's the one and so we'll just grab that URL and Slam it in there. That's it. And that's all we need to do And so MSM will as it said it'll it'll clone that skill into your slash op slash my croft slash skills directory Which is similar to from from skills within my core That's the one and it also installs any dependencies That the skill has defined Yeah, that's that's all we need for the common IoT control skill and so now we want to go and grab the home assistant skill Which? Great, so that's that's in schools in skills and But by default so the version of home assistant in the marketplace is not using the common IoT framework at the moment and so what we want to do is change into the directory for that skill and We're gonna Switch to the branch of that skill where the development for common IoT has been happening Yeah, so to switch over we're gonna just do check out. That's it feature slash common IoT Will that work or do I need to Give it a try This will create some mild Issues, so if you if you used to get check out And truncate to feature. That's it That should be better because that will then track from the remote branch And so now anytime you reference feature slash common IoT It's gonna know that you're referencing the that the branch of that that is on the origin becomes more important when you when you start adding in different Different repositories, so when we fork the project into our own GitHub account because we want to make some changes and do our own development on it And then we want to contribute those changes back up to the parent project We're then gonna end up with two remotes one that is in microaf AI's And one that's in our own GitHub account and that's where we'll get into a bit more of that That's switched over to the new branch we can see there and Should we have a look at what the what the requirements are Just to make sure just to see if they've changed. So maybe do cat cat requirements. Okay There's a read me. There's no Sorry, it manifests It's using the newer manifest. Yeah, I'm So we need Python requests and there's your IO skill IOT control Yeah, that one's actually something I missed so this new manifest.yaml way of defining Requirements means that you can define you can actually define three types of requirements So one is system packages One is Python dependencies that you can see there with requests and then you can actually require that another skill exists For your skill to run and so those skills they have to be in the in the micro marketplace You know for it to Work so it can't just go and grab Stuff off in GitHub. Yeah Yeah, exactly. Yeah, so for those people who might be interested in Learning a little bit more about how to develop a skill We'll leave a link to a series of articles on open source comm about how to go through the process of starting your first skill kind of walking through so we talk a little more about Dependency handling and the different ways that are out there and and things like that So if that's your speed take a look for the link in the description and follow kind of from start I know nothing about Microsoft development to all the way building your first skill Okay, so it looks like we have got Microsoft set up. So that's probably a good place to leave the first video Today we covered a few tips Forget when when we first pull down the when we first clone the repo just to avoid some issues later on down the track we looked at some Arguments that you can use while installing Microsoft such as setting a particular version of Python We looked at the difference between some of the arguments when when running Microsoft. So looking at, you know, Microsoft's start all versus start debug and why We might use One or not the other some of us on this call I think that you should never use a particular argument Debug And and yeah, particularly if it's not clear about why why they are or what they're gonna do Can be a bit confusing So we definitely need to update the documentation for that as well and make that a bit clearer but but anyway we covered that and We also looked at how to install skills from outside of the marketplace using the the Microsoft skills manager In this case specifically to install the the IOT control skills so that we can we can get into that With home assistant, hopefully What what do we got up next? Yeah, so Next time I think what we're gonna try and do is have a home assistant Instance where we have a device or two attached to it and we're going to Then work with connecting mycroft to that home assistant instance And so I'll look to see if I have say An LED strip or something that's easy for me to show on camera so that yeah, yeah, my LED strips behind me We won't be using those those are my child indicator lights so at night I Have a motion sensor in the hallway outside of the room and it triggers this light behind me When someone has wandered away into either the bathroom or out in the hallway So that's an example of how you can use home assistant to Help you maintain your house and what we we ultimately want to do with with this project is Integrate mycroft with that because That is this these lights here are time sensitive They won't trigger during the day But there might be a case where we want to have extra light around our table out there And so it would be very helpful me for me to be able to say hey mycroft turn on the tables the table lights and So our next step is to set up the VM that will host Home assistant and then make that connection from mycroft into home assistant and So with that this kind of wraps up our current Our current video and we'll move on to the next one But we really want to hear from people because as much as I love to hear Chris talk It's it's much easier. It's a lot less work for me if we don't record our conversations and I have to edit them So we really we're making these videos to try and be helpful to the community And so we're open to suggestions of what you'd like to hear What kind of topics you'd like us to cover if we if we should bring on guests if we can get them to come on? And so ultimately we we're here to try and serve the community, right? I want to see This project blossom because while I may not have all the technical skills to make it awesome Maybe I can reach somebody and excite you into You making the awesome commit that's just something that I absolutely needed to have inside of mycroft, so we really want to hear from you and You can reach out on so I'm on Twitter. That's probably the easiest way to get me so you can tweet at Lin ux ovens oven s at Linux ovens and that will be down in the description You can find me writing on open source calm There's plenty of ways to get ahold of us you can come in into the chat for mycroft and ping either one of us We we both lurk in there Pretty much unless my browser crashes. I'm in there all day every day So Yeah, Chris, how can people get ahold of you? Yeah, I mean mycroft chat, you know, I live in there So chat that mycroft.ai is a good place. I am on Twitter at Chris Gessling Chris with a K I'm the only one in the world. So if you can't find me then You're not searching well Yeah, and yeah, absolutely we want to hear from people we want to know, you know What are what are the areas that that you want to hear us? Talk in more detail about you know, where are the where are the bits that that would help you to to contribute to mycroft So you mentioned being the only one in the world with with that name have a little Little story to end on so there is apparently a gentleman in Australia of all places that shares my exact name who has some level of authority in his company and I for several months was getting his email and I would reply back that they they're sending this to the wrong email So my email address had a period in it and his did not and they were putting the period in the email address So I was getting his email and I was getting emails like, you know, we really need to dismiss this person or you know Yeah, it was it was pretty crazy. And so when I was picking my Twitter handle I I was aware of the fact that this guy has a bigger social media presence than I do and I'm like I don't want any kind of you know conflict here. So I Kind of picked my last name and the thing that I I'm most passionate about and I put them together I'm like, man, I sure hope I don't get this guy stuff again. So that's just a little funny story to end on And with that I think we'll catch you next time and we look forward to hearing from you And please do contact us because we really want to make this useful to you Definitely awesome. Thanks everyone. Yeah until next time Ciao