 So, good evening, everyone. Welcome to the latest and one of the safest, if not the safest presentation this evening. So I'll just make sure I'm putting the device here. Let's close it a bit so that we get a nice fit away. And if I was long enough, I can probably put it on the wall also. But I'll just put it here. The talk will be about this device. It's a device with open source software, hardware done from a software engineer that has no idea about hardware. And it will be more information about my journey, the tools that I used, mistakes that I made, and hopefully you can learn from this. So please don't smoke in that direction. Yeah, most of the times for your convenience, I put also QR codes so we can just scan it or on the Foslum website you can see also the slides. And you can see the same contenders here. Okay, so what are we talking about this? I'll be talking about our dream, what we wanted to achieve, how we actually started with this idea. Usually a dream has some motivation. Then I'll be talking about the team. I'll be talking about the creation of the device itself and then I'll open the door for more people to join and more things to improve. One of the things when you start working with open source projects, be it software or hardware, it's a never ending task. You can always improve some small thing here and there. You can always do something better and there is always somebody that will tell you this and hopefully will help you to do this. Okay, so it's a long story but I'll try to make it a bit short and my family has a vacation home which is not quite often used and we thought, would it be possible? We have two neighbors but they are a bit far away to have a device that can inform us via Wi-Fi if there is a smoke. If this thing starts to burn, we have to inform somebody. The neighbors are away but we can, if we receive some information, we can just call them and hopefully save further troubles. Also the fire brigade will come and all will be good and we started talking with my niece and the other parts of the family but what about when the cleaning lady comes, would it be nice if we have some information, if somebody entered and then what about when we are not here, would it be nice to, if somebody entered the house without permission, just to have an alarm so that the neighbors can hear this and probably check what's happening in there and things like that. And we started discussing a lot of situations. For example, now we're here with the kids and we don't want all this beeping and sending information via Wi-Fi to somewhere. Can we have just this mode that we hear in some of the small shops, the ones that are almost gone, where you enter and you see beep, beep, beep, beep, beep, and all the kids are here or somebody just entered and you can still walk and so on. We have this device is having motion detection. It's having also smoke detection. It's having some other parts that I'll be talking about and it wants it to create such a device. And so we know that at that time such devices existed but for a price range that was not quite good. For example, as the price of this one at the moment. And as a software engineer and a person who is a big fan of open source, I started to think, can we make something like this? Can I make with a team something like this? But so first I want to improve the security of my house but I want to be, I at that time knew that I will not be really able to do all parts. So I wanted to use the open source development way and to give the freedom for somebody else to improve it, to add another functionality. Maybe you already have an idea what functionality this can be. And in addition to allow us to legally, to an extent, to modify this and use it for our needs. And last but not least, so I knew that it's possible to create a device, just bunch of wires, plug it. But we wanted something, like finished product. We wanted to have box, we wanted to have all things covered, easy to assemble, disassemble, just put it there and use it. And so I was quite open for all the ideas and I thought, why not? Why not give it a try? Maybe we will succeed and do something. So I'll present to the team, that's the initial team. There are also other contributors, small and big one. Let me present myself. I'm the software engineer over there. I'm the person who knows how software works, computer languages. I'm quite skewed in some and it's relatively not easy but straight forward to switch to another language. I know that I need some short time span to switch to another language, let's say two months, maybe six months to become good, a year or two to become really good and a lot of years to be expert. After that, we have a hardware guy. So I don't do hardware. I saw the wrong pins. So the hardware guy is a really skewed and patient guy and for him, really assembly is a higher level language. So he is looking at the bytes, he can measure the batteries by their weight. So we are talking about some other reality for me. I didn't know that such people exist. Then we have a designer who is actually a really, really famous good designer. If you know this red dot award, he has four of them. I'm sure that this is like the Oscars of the design industry and he has four of them. Accidentally, he goes also to the mountains and we met there. And also there is a fourth guy who is the mechanical guy who makes all the nice graphs and so on. And some of you may ask yourself, why four guys? Can you just make this thing yourself? I thought the same, I thought the same. Why really? Maybe I'll not do something like a good design but something acceptable. So no design is needed. Mechanical designer, I used to change the first example from Blender. That should be enough also to make mechanical design. And then for the hardware, I had a brilliant plan, one week expert in hardware. I asked my good friends and they told me, you have to buy the art of electronics if I'm not mistaken from Horowitz. Read it, get these components and see how it goes. If you burn all of them, then it's not good. And I started really for a week to solder and so on. I got distracted, burned my first component. Then I think even before the end of the week, I knew that if I want to be expert in this, if I want to be good in this, it will take at least two and a half years full time. And I had only two hours a day free time, even less. So at some point I knew, I hope quite soon that things will not go with one person. If one of you here is a genius and I saw some geniuses, then definitely can do it yourself. But when we create something, we need to be experts in different areas. So if I started as a kid, probably also to do 3D design and hardware, maybe I could do it. Unfortunately, I started with software. And also there is a communication, there is understanding about some properties, there are requirements that I have never, ever knew. For example, that the plastics, depending on the plastics, it can and depending on the technology, you have to put additional spacing. Otherwise the machine can not exactly up to the millimeter do whatever you want and things like this. And if I was doing this probably after 25 years or when I retire, I'll have enough time to finish it. But for me that was not quite good. But let's go to the requirements. Now I thought, okay, we have a team, I have very good requirements. So it needs to have this motion and small detector. That's fine. In the beginning, because I met some people and I said, hey, I made a motion detection and another person who said, I made a very low efficient smoke detection. Okay, let's try to use it. One of them said I am perfectly fine to be open source. The other one was not quite interesting. So we wanted to have a nice and polished look. We didn't want to look like something that is already in the market. Okay, here is the star designer. He can help us with this to work on batteries. So this thing, because we're not that often the neighbors there, not also that often, should last for a year. Hopefully for a year we'll go there, we'll be able to change the batteries if something goes wrong and so on. To be remotely upgradable. Why? Well, there is security problems every day. The Wi-Fi stack problem. So you update the version. Some other problem. You want new functionality, not just problem. So you constantly want to be upgradable and to be open source. Now, when I say open source here, I wanted to, so I was the one responsible for the software so it will be open source software. But we wanted to build open source hardware so you can really produce this device just having the specifications, the PCBs, the old schematics and everything up to the last component plus the link from the website where you can buy the component. And I just wanted somebody else to help and to improve it and hopefully to come with good ideas. As normal open source software works. So I had initially also an idea to create all of this using open source tools but I made a resistance from all the people because they were skewed in this tool and they didn't want to try another one or it will hinder their creativity. So most of the people are quite creative. So I made a compromise that, okay, let's make it like this. Do whatever you want, use whatever you want to but then again, the final result should be viewable, modifiable from open source tools and I'll try to take care to find the tools. So now we're coming to this device. This is the UKit device and as you can see it has this look. You can put some batteries here. It works with the same batteries like the famous cigars, e-cigarettes and so on. And it has different modes. We decided to go only for four of them so we can detect smoke, that's the initial mode and then you trigger an alarm. There are also modes where you can detect smoke and detection, be informed over the internet, don't be informed over the internet or just turn the silence, the buzzer, sorry it doesn't sound the alarm. And there was also another requirement. The people, if somebody enters in your house it's probably quite skilled guy. So this device had to wake up for one second, second and a half maximum to wake up to send an NKTT message to somewhere over SSL. That's what I thought in the beginning and finish. I talked with the hardware guy and he told me, well, good thinking but the way you want it is not possible. First, I said let's use ESP, I know this. It's quite nice, easy to program, very fun thing. And the device, most of the places you see it's low consumption and so on. For one year, it will not last problem a week. So we, the hardware guy informed me that we need a second microcontroller and this is a Tini 1634, really ultra low power consumption, you can see some of the hardware specifications here. So we ended up with actually three controllers, microcontrollers, ESP 8266 for the Wi-Fi, a Tini 1634 where the main logic is going on and we ended up with a Legro microcontroller which is for the processing of the smoke but this one doesn't need to be programmed. The device looks like this. Now, the source code is, and the repository is divided into different subparts and if you go to this URL, you see all the needed things in order to print this, in order to print the PCB, all the needed components to solder them, of course you have to buy them and to create the device but what we achieved is a form factor that is easy to assemble, not exactly small as a device. I was thinking about a really small device but then you end up in a station where you cannot buy this commodity components for cheap so that's what we have here and we use a couple of tools. Now, the hardware designer was very, again, very patient guy and actually quite interested in learning new things so we started using Cat-Cat, most of you know it, quite a good tool, multiple problems that we had. For example, I'm working on Linux and he was working on Windows and constantly we had to do something with the pads. After that, some things were missing and so on. Those of you that work with Cat-Cat and worked only on one platform, let's say Windows, they were probably quite fine but we discovered some things that we didn't know and were difficult to explain. After that, we used other tools. For example, when I say, can you move this whole five centimeters in that direction and he says, I did it, here is the file. I'd like to see visual difference. I'm a software engineer, I'm used to, you know, different tools that compare text and in text you can quite easily see this but here when we're talking about PCBs, it's a bit different. So what we used is this tool, the second one from the top and this one can give you quite nice differences. You can see with red where the new change things and you can integrate all the things. We have also other tools listed, for example, for the difference in the schematics and so on so that a person like me, a software engineer, can understand what's happening and if you go to this address, the last address, you'll be able to see all the tools that we used and this helped me really a lot because when I say to the designer, can you, oh no, hardware guy, can you do this? He makes it, after that he comes to me, he says, I did it, that's it, happy? Yeah, quite happy. So after that, for the enclosure, so the mechanical designer and the designer, they use their own tools but we ended up with step files or some easy to open from free cat files and we used free cat daily, the latest and greatest versions in order to be able really to work and to understand what's happening. Now, when I received the first design, I was so excited that I started doing prototyping with this stereo form and then I presented it to the designer, he looked quite suspicious with me and he said, are you going to produce this with an axe and a hammer? I said, why, why? Because this needs to be millimeter exact, this needs to be absolutely exact, you cannot just have two or three millimeters, you don't have too much room to do this and then after a bit of research, we found the cat cat step up tool which is an add-on for free cat, it allows us to get the PCB as it is directly, put it in the free cat and see how it looks like. So we didn't put all the components because at that time, cat cat didn't have all the components, we just put the most bulky ones or we created some of the bulky ones that we have an idea about the measurements. Here things are quite close to each other and then we used also another tool which is this exploded assembly. The exploded assembly is nothing really that helps you to develop faster but it gives some nice pictures and impressions for the people that want to see what the device is doing and how to open it. So I have here a video, I don't know if this will work, probably not, but yeah, there is a link. So when you open the video, you'll see that this starts to open up in all directions, looks pretty nice and you get a good idea and this is something that the commercial tools also can do and suddenly open source tool is allowing you to really see this and understand how the things are working. So I was quite happy with the tools that are available for creating the plastic enclosure. Okay, now about the software. The software, the hardware and the enclosure, there were no, so there were problems with the tools and so on, but it was relatively straightforward and hardware doesn't move so fast like software. In software, especially open source software, it has one big advantage and one big disadvantage. The open source software is moving quite fast and changes quite often in break things. That's the advantage. And do you know what's the disadvantage? The same thing. The same thing, it can turn against you when you use it. So I started working on the software and on the bottom you can see that there are two things that were crossed out. So we wanted to put not only the firmware, but to create a mobile app based on some tool that can create multiple versions for iOS, Android phones and so on, make the web API and so on. I started with Angular 1. At some point they moved to Angular 2 and then Ionic decided to use TypeScript and oh, hell, hell on earth. This is unsupportable at the Node.js. They sort of don't move that fast, but still, let's say I used version four to create the web API and then suddenly version eight and then nine and 10 and simple small things, I want just to make a call to receive it, why you have to constantly change the API and so on. So that was a big pain point for us and we gave up with this. If somebody is interested in working with this and quite skilled, then he can help us. But we concentrated on the software for the two microcontrollers. Since I started from the bottom, I'll continue from the bottom, the Atini software. And this microcontroller, you don't have much space. There is a tiny space in there. To achieve this one second response, sending it over the internet using SSL, connecting to the point and so on, you have to optimize on every level. And the hardware guy said, well, you use assembler. We can fit in this space and so on. And he not only fit in this space, but he was leaving even some additional space and I thought, hmm, I can put the bootloader there because I want not only to update the ESP, I want to update the Atini. So we ended up with a slightly modified version of tiny save bootloader and it worked quite nicely. For the ESP part, we used a swing framework and I suddenly ended up as the release manager and contributor of the swing framework. So what I needed is, I was needing something I thought, quite simple. I need MQTT, protocol simple. If nobody created it, I'll create a client for this, plus SSL connection to this thing, plus a bit of fingerprinting so that suddenly I don't send to somebody else. And it took quite some years to reach this 1.5 seconds execution. You can, I started using, for example, on Arduino and I thought, that will work. They have everything. After five, six, 10 seconds, you may, may succeed. Not exactly what they want. I want this to succeed always. Plus, the second component that had the big component, probably I'll go to a more detailed chart on. That's not here. We had Jerascript. Jerascript is there. It's a JavaScript language. And what I had there is, if somebody, we have all these events, smoke, movement and so on. If somebody wants, why not give him the chance to program additional rules directly on this device? Why it has to go to a service somewhere in the world, in the states or somewhere in Europe, then do something and come back to me? I find this not exactly optimal. So, Jerascript was the tool that we used to help us to implement this additional logic. Now, I'm coming also to the closing, so I hope I have one or two minutes for questions. I wanted to answer this question. Is it possible to create open source hardware and smoke detector and make it really also modifiable with open source tools and so on? For me, the answer was yes. Yes. Was it easy? No. Now, if you start working with open source tools, you have to understand this. They change. And you learn something, it breaks. You end up modifying so many things that at some point you have to stop and say, hey, I cannot now fix AngularJS. This is too much. But it was fun. It was great fun. I learned a lot. And I think we spent most of the difficult years of developing or the difficult times of developing a hardware project. And they're behind us. So now we can only upgrade it and make it better. Are we done yet? That's what my kids usually ask me when I start putting them in the car and after five minutes, are we there? Are we done yet? 80%, 80%, I can flash it and then configure it and manually and it will work perfectly fine for even two years. But we need the 20% to attract more normal people. So no flashing and so on. So we have actually a lot of work. A lot of work. If somebody is now having a lot of free time wants to join us, please join us. We have documentation that needs to be finished. I'm not giving this to you. I know that most of the software and hardware people don't want to. But we need to improve here and there something. We hope that we can decrease the size, the form size and so on. And yeah, such projects, they develop constantly and they need your help. So, if you want to help, there is a URL. And usually I'm asked this, are you ready for mass production? May we have an axe and a chisel? We can do it. I actually went to Portugal, especially to ask the European maker of plastic enclosure producers. They had a price, very good one. Double the Chinese, but still a good one. Plus, they said the weather is good. You can enjoy the weather. Now, I hope I have some time for questions. Two minutes for questions. Okay. So the question was, is it possible to print this on a 3D printer with FDM technology? Yes, it is possible. Because we started actually printing it on such printers and we were always getting some problems from the printing houses. And they said finally, okay, make this a bit bigger, make this a bit smaller, you can print it. And we have also, yeah. So, if you're standing, please sit at the moment. This thing costs around 250. This is unique. Do you want? Euros, we're in Europe. So Turkish lyrics before, now. Of course, the plastic enclosure is the one that is costing 210 maybe. All the rest is the components and the manual configuring and so on. Actually, if we start mass producing, we can go to a price below 40, even 40 Euros. Which is sort of competitive price. For me, 25 would be the best, but yeah. Other questions? Yeah, I just had one over here. Can I actually use that in my house as a smoke detector? Is that certified? Very good question. No, that's not certified. It's not certified, it's a companion that you can use. For certification, we need to invest. So first, when you certify something, you have to be sure that the enclosure is final and the software is more or less final. Right, well the new standards for smoke detectors because I'm perfectly involved in that industry is 10 years on a single battery. 10 years. 10 years. Wow. And you need to discriminate. You need to be able to discriminate nuisance alarms versus real smoke. If a hamburger is starting to burn, your alarm cannot go off. So yes, yes. So as a hardware guy, that last 20% takes 80% of the time. I'm an absolute software guy, I can tell you that it's the same. It's absolutely the same as a software guy. Okay, another question? Yeah, over there. How do you take a look at other projects in a similar space? I think of one from Stuttgart, dealing with fine dust detection. The project was called Luftdaten or Errohr in German. And so maybe you could learn how they did things and how they approached the things. So we started quite a long time ago, maybe four, five years ago. I have only two and a half hours and two hours I need to feed the kids and then 15 minutes for mine. I'm living actually close to Stuttgart for, at the time when we started, of course, we researched that there is another project. We couldn't find such a project that we wanted, so we decided to do it ourselves. Typical for software, for open source, you know? Typical. But I would love to connect with the people and probably we can exchange some ideas. Probably they'll give me hints. I only can give heads for software. Okay, so I think we'll run out of time. So thank you for our last speaker. Thank you. One of the safest presentations. You were safe here. So unfortunately the time has come and that was the last presentation in the embedded dev room in this year. Hi.