 Hello everybody! I'm Kuan from Vietnam. So today I come here to talk about our project. How we use free and open source software and how we make it suitable with our condition, some challenge, some issues that we made and how we overcome it. Hãy tự dùm về mình. Tôi là Profile and Open Software until this year. Ngay trước, tôi tiến đổi bộ phim xc xy triệu với bộ phim xy triệu để bản thân bộ phim xy triệu trên PC. Tôi cũng bắt đầu bộ phim xy triệu For OgenWRT, it's an operating system for Wi-Fi router and I also develop software for my MO phone. It's discontinued already. I also work as a mentor for Google Summer of course. So now we and my friends, I and my friends start and start about agriculture. So what's the objective of our automatic system? We want a system to monitor the environment condition like temperature, humidity, dryness and carbon dioxide because we use this one to grow mushroom and mushroom is not a tree. So it produce carbon dioxide and it's getting in the oxygen. The system also has to be to allow remotely turn on turn on turn off the equipment like humidity, like aircon and fan to adjust the environment condition. And we also want it to be automatically do that without human intervention. To explain about our software, we need to have an overview about our hardware because our software needs to work in specific hardware. Our hardware system includes a gateway board with built-in billboard. It's an embedded computer similar to Raspberry Pi. From the gateway, we connect it with the sensor node. Each node will compile about three or four sensors to measure the humidity, the temperature. We also connect the gateway with the IP camera and we connect it with the activator like the humidity here, the pump, the valve. And to accept the system, we use the LAN network of internet and we can see how system work from the laptop or smartphone. So our system can be called IoT but it's a different from other IoT system because it doesn't have a server, the cloud server. The reason is because we lack of resources. We don't have enough money to buy a server. And also the network infrastructure at my farm is quite poor if they don't have a stable internet connection. So we cannot rely on the internet so no need to have a cloud server. Instead, this one will play the role of server itself. It's a mini computer but we make it strong enough to do the job of server. So this is an overview of our hardware system. The board that we command for is just more like that. This is the sensor node. So this is the board of the node and the sensor here and here. This is a mushroom. This mushroom is not found yet but later on I will show the picture of mushroom. This is the humidity fear. So it looks not professional because we don't have money to buy professional device. So when we turn on, we make some evaporate water and this is the light. We have an IP camera here. So you start to see the mushroom in the environment. Now about the software. The main software run in the gateway board and we build it with Python and Django. And this application is also a web app because it has many modules. I will talk about the module later. So the stack here is like the usual Python web app. As we are database the radius, the engine is web server. And in version 2 of the software, we add the interrupts db for time-series database. This time-series database is the data of the sensor. And we also have to make some configuration to integrate well to the operating system. We run on the gateway board. This is arm leaders. So here is about how we accept via internet. Oh no, I think I forget this one. So this is the three components of the software stack. The first one is control view. It provides web interface for us to see the sensor value. And also it provides interface for the farmer to set the value they want for the temperature, the humidity. The second module is collector. This one is to talk with the sensor node to collect data. The third one is control center. This module will control the equipment in automatic mode, also program mode. And this is some minor tool to do other things like database backup. And review the bot stress index to make it run faster. So this is the interface of the software. Later on if still have enough time, I will demo it by accept to the device in Vietnam to show you how it works. This is the chart. It makes the control interface. So we schedule the temperature, the humidity we want. For example, tomorrow we want how hot it is, how cold it is. And next day, next day, so on. And after we set it, the system will automatically control the device to maintain that. So I think how I just to remotely accept the internet before we use the VPN. The reason is that at that time the network infrastructure is not good. We don't have a wide connection to the main router. So we have to use the wireless connection. And also we cannot do forwarding on the router. Because that router belong to the university and we don't have permission to change it. We borrow room in university to do this project. Don't have enough money to rent out. This is also the reason why we don't rely on internet because of this. In Vietnam sometimes the internet go down. Or the shock. The shock is the sovereign cable. So this is the VPN solution that we use. This two-year VPN solution, one thing we need is that the gateway board has to have the internet connection. And this is, even this is unstable. But this is necessary because this board doesn't have the timer. So every time we turn it off and we turn it again, the clock will run. So it needs the internet connection to synchronize the time. And this is the two-year VPN solution we use. First we use Hamachi, but then we found many problems with it. And then we change to shock it again. This one we open shock developed by Japanese. Some challenges we face in our project. The hardware specific issue is because of the big board. So this one, to make it connect to the device like a humidity fan and pump, we had to use this feature of hardware. A GBIO pin, PWM and SBI pin. I think anyone study electronics in this room. Anyone? So I think you know about this. And one problem is that from the Linux view, this block, it needs root permission. It needs root permission to accept it to fly it. And it also provide under this directory. Normally other device like USB device is under depth. So we can change the permission easily. But for this thing, it is not under depth. So we need other way to change its permission for our software to run. And we use the system D. Anyone here know about system D? So is it the software to start own other software in Linux computer? Another thing is about the pin of the hardware. This one. This is one of the feature that only happen on Linux for ARM. For the Linux for laptop, we don't have this problem because of the main board of the laptop. So we set the BIOS, set UEFI. But the big board doesn't have that. So it brings another issue. It's related to device over life. So how about the issue? We find that it doesn't work under 97. But it doesn't work under 97. So when we upgrade some software, sometimes it doesn't work. This one I already set before. So one thing is the software start of the operating system. So because this board have graphic user interface but we remove it to have more RAM and CPU for our software. So to control network, we have to use this software from Intel to manage the network. But it's not too stable. And sometimes it track the ARM, Internet ARM feature. And how we show it will disable the feature of software. This link is linked to a tutorial in AskLinux Weekly. Now we have a database issue. This issue is when our software is in version 1. Now we already change to version 2. But it is still new so we haven't test it fully yet. So the problem is that our data is very high here. So we caught more than 80,000 backup every day. So he lost for the database. And we found that our database sometimes slow down the system with 100% CPU. And how we show it. Why do you need to collect data every 10 seconds? I can't understand. I'm not a fan of data. Because the differential is minimal. I imagine maybe I'm totally wrong. So it causes other problem which is more important to you. So if you collect data at a better interval and then it's more measurable. Yeah, about how often we should collect. We didn't have an exact criteria yet. So now we just test with this time and that time and other number. And we will regularly find out which is the best number. So we test with 10 seconds and recently we test with 30 seconds. But haven't found out which one is better yet. So how we show the issue with the database. We use this software of Postgres SQL to find out which theory is the survey. And then we use explained analysis of Postgres SQL to find out which operation is done and how long the effect. So we found which is the main bottleneck in the database operation. And we found some result like that. We found that Postgres SQL often has to spend all raw for some query. So to show it we build index. The problem is that we have many rows of database so we cannot build index for all the rows. It will be a huge waste of memory. So we just build index for the latest record. And after a while we remove that index and rebuild the new index. But it shows most of the issue with high CBU usage. But sometimes that issue still happen when we exporting data. Because our software had the feature to let the buildable export the old data from 1 month ago from 3 months ago. Now with version 2 we use the influx db to solve those data. But we have no result to compare it to Postgres SQL yet. And also this database is very new. So we still lack many tools and library. Ok so now my talk is already finished. You have any question? So the database you are talking about it sits on the beagle bone? Yes. We run the database server on the beagle bone on-site. And what memory is it using? I only know it is flash. I am not sure if it is none or not. Ok yeah flash but with flash we will definitely have this database issues and if database keeps writing to flash again and again and one day the flash stops working. Yeah. I also think about other solution. That we use microcomputer. It's called mini box small computer like this. This one will run normal CBU and we can use it for database. But now because our need is not too much. We haven't seen any problem with the beagle bone yet. So we haven't moved out to the normal PC. And even in the case we move to the normal PC we still need this beagle bone because of the feature to connect to other hardware to other device. The cost of weight. And also the room. I know the price in Vietnamese money but Singapore I have no idea. Ok I think around 140 million docks. This is the room only or everything? Yeah. Also to build a room also to buy the equipment. Around 9000. I want you. What is your question? The question is about the sensor and the actuator. So your sensor will work because the usage is very high. Yes. Because due to the way this thing is sending out signal with this high frequency and I believe this must be 24.7. So and also the way of actuator because I believe this is to help high growth in marshal. So this replacement and scale of VT you know what I mean? About how long the sensor can last. And also have you considered things like using LBBT you know stuff which may be able to do some work? LBBT? We have low energy at Bluetooth. Low energy Bluetooth. Actually about the sensor we use the RF radio frequency to transfer the data. So this one is cheaper than the Bluetooth. Yeah. A beacon is really cheap. Which one is cheap? Like beacon. You can buy by bow. Yeah. In Vietnam I think not easy to find that. Yeah. So the sensors like the sensors are directly connected to the beacon. Because depends on the different scale. I think you can find that. Yeah. I mean but in this case they don't need wireless connection at all. Oh yeah. Because of shock so I was sorry. Okay. Yeah. How many times and how much body weight you made of the mushrooms? This month we start the second crop of mushrooms. Yeah. And one crop how much the main mushroom? The room is 10 square meter. Yeah. It's just for experiment. So in this time we are just experiment to improve our system and also to find out the cultivation process. Because one problem about agriculture in Vietnam is that they doesn't have the detail of cultivation process. Is it like today with how much mushroom? What is the temperature it needs? How is the humidity it needs? How is the brightness it needs? They don't have the detail number yet. So we have to experiment and find out ourselves. Yeah. So your own project support from the some university or LSE? No. Our startup is new and only have four people. And we haven't found the fund yet. We haven't have fund yet. Start us. Yeah. Start us. Yeah. Are you looking for crop modules? Looking for. Crop modules. Because they do sell those now. Yeah. Crop modules. They can plug into your bigger bone and they can keep time. Your company is brand. You will sell your mushroom grow products or you sell the mushroom? About a week we can sell. I think it's the business issue that we haven't have a clearly vision yet. Because sometimes we think that if we sell the system, the hardware and software, we can sell it in the short term. But in the long term when other competitors appear, we cannot earn money much with it. And we think that maybe we grow the mushroom ourselves and sell the mushroom. But then we come to meet some business experts. They aspire that direction is not safe. Because we sell the software, the hardware for this customer. And then after that we sell the mushroom, we become the competitor of that customer. So the customer will not be just us. We will not buy the device from us. So it's the business issue that we haven't, we cannot show yet. Still think, still think. I understand. Thank you. Yeah. Thank you. And do we still have time? I have a question. Have you compared the effectiveness between using your system without your system? For other system, I haven't found other system in Vietnam yet. When you use your system, so how much you can earn from the mushroom and without your system? About that, we cannot give the correct answer because our system is still not complete. Sorry, we are running out of time. If you have more questions, you can ask him.