EW S4E13b EPISODE 13b [INTRO] [00:00:03] JE: Welcome to Elixir Wizards, a podcast brought to you by SmartLogic, a custom web and mobile development shop based in Baltimore. My name is Justus Eapen and I’ll be your host today, joined by my co-host, Eric Oestrich. Today, we're jumping back into part two of our very special partnership with ElixirConf Japan, the Elixir Wizards Dojo. For this first collaboration, we are focusing on nerves. In today's episode, you'll hear a conversation with Connor Rigby from the core team and Todd Resudek, who you know, as a special host on the show and frequent contributor to the Elixir community. Hope you enjoy this part two of the Elixir Wizards Dojo. [CONVERSATION WITH CONNOR and TODD] [00:00:45] JE: So glad to have you both on. Connor, this is not your first time on the show, because you've been on one of the conference episodes, isn't that right? [00:00:52] CR: I think I’ve been on the show a handful of times now. I can't remember. It might be two or three now. I know I was on one of the conference ones. [00:01:01] JE: Lonestar, right? [00:01:02] CR: Yeah. I think I've been on as an actual guest of the show once or twice as well. I can't remember. [00:01:08] JE: We'll need to have you on again soon. The show is like, it's just ongoing. It's going on forever. This — this podcast will just go on forever, because it's great. As long as the Elixir community continues to grow and explode the way it has been, we'll be here. And Todd is a regular. [00:01:24] TR: Yes, sir. [00:01:25] CR: He’s even got his own wizard now. [00:01:28] JE: He’s got his own wizard. [00:01:29] TR: Yeah, I saw that. I showed that to my daughter and said, “Hey, what do you think this is?” She said, “Oh, that's you and Taco,” because it's got my cat on it. I should explain. It's got my cat, Taco, on it. [00:01:41] JE: Well, we're really glad to have you on. We wanted to just check in, see how life has been going. I’ve got a terrible pun here that I’ve been wondering if it's just that bad, but the question is has Elixir been your quaran-tini? [00:01:57] TR: Oh, that is horrible. I don't drink. [00:01:59] CR: That is pretty awful. [00:02:01] TR: I don't know, man. [00:02:02] JE: I don't even drink it so bad. [00:02:04] TR: I also don't drink. [00:02:05] JE: Oh, my gosh. I love when a pun completely falls flat. [00:02:08] TR: It falls flat. [00:02:09] JE: That's good. What about — [00:02:14] TR: — I’ve got some bad news, what happened to me recently is I’ve got this sit-stand desk. And it was ambitious, because it was always in sit mode before and I was like, “I’ll stand,” but then I never did. Then one day I was leaning back on my office chair and I broke the weld on my office chair. I took that as an indictment on my body. Now I asked my brother what chair should I buy to replace it? He said, “Why don't you just stand at your desk? That's what most people do now.” And so I’ve been standing at my desk. [00:02:46] JE: You know what, Todd? I will stand in solidarity with you. [00:02:48] TR: All right. The trick to standing at your standing desk is just to not have a chair in the room. You pretty much just have to stand. That's how my quarantine has been going. [00:02:59] CR: I need to figure out a standing desk situation. Mine is statically in sit position. I must admit that the weld on my chair is also broken. It makes a loud creaking noise if I sit in it just right. Maybe that is a sign. It's time for me to get a standing desk as well. [00:03:15] JE: Hey, maybe it’ll make an appearance on the show today. [00:03:18] TR: Either get a standing desk, or get a treadmill. Not a treadmill desk, but a treadmill so you can lose weight, so you don't break your chair like I did. I think for me, it's easier to spend the money on the standing desk than it is to get into shape. [00:03:33] CR: Spending money is always the easiest way to solve problems. [00:03:36] TR: Yes, sir. [00:03:37] JE: Eric's got a question here that I just — I don't really understand, so I’m going to let him ask it. [00:03:43] EO: Yeah. We announced the episode on Twitter and then Todd had a very specific question that he wanted to make sure that we asked. What is your favorite subgenre of metal and why is it, whatever, Rhapsody of Fire? [00:03:58] TR: This is a great question, Eric. To all of our Swedish, Norwegian, Danish, German listeners, you already know the answer to this question, because you are metalheads by birth. Rhapsody of Fire is a power metal band, which is actually one of my favorite sub-genres. Whoever wrote that was exactly on point. That was you? Okay. Yeah, I love power metal. I don't know if you do, Connor. One easy way to tell power metal is it's fantasy-based. If the cover art looks like a Dungeons and Dragons book, or they're singing about knights, or flames, or swords in any way, there's a really good chance that's power metal. The OG example would be Dio, if you've ever heard any Dio albums. No? Okay. [00:04:46] CR: Never really would have considered Dio power metal, but now that you make the connection, I agree. Definitely. [00:04:51] TR: Yeah. I mean, it's early. It's moved into the extreme metal and black metal genres a little bit now, but I think Dio is the OG of fantasy of the fantasy genre. Check out DragonForce if you like power metal. [00:05:05] CR: That was going to be my suggestion is DragonForce, if you ever played Guitar Hero 3. The hardest song on that one was probably my intro to power metal. [00:05:13] JE: Oh, this is something I’ve actually heard of. Connor, what's your favorite subgenre? [00:05:17] CR: Subgenre of metal. Oh, man. I don't know. I don't listen to much power metal, say as much maybe Todd does, but I do listen to a lot of punk metal and post-hardcore stuff. [00:05:28] EO: That's good. That’s good enough — [00:05:30] JE: I have no idea what any of this means. [00:05:31] EO: Oh, man. [00:05:32] JE: Maybe you could just define metal for people like me, who just only listens to — [00:05:36] TR: Let's turn this into a metal podcast. [00:05:37] JE: Things like violins. Can you tell me what metal is? [00:05:41] TR: Connor, can I take this and then you can fill in the gaps? All right. I think metal was founded with Black Sabbath, I think 1970 is considered the genesis, just like in Unix timestamps. 1970 was — [00:05:55] JE: — Beginning of time. [00:05:56] TR: It also marks the beginning of time. The epoch for metal. That was Black Sabbath and then there was — that first-wave, which was Sabbath and Deep Purple, I think is considered a first-wave metal band. Then you get into NWOBHM, which is the New Wave of British Heavy Metal. That's when it got really big. That's Iron Maiden, Judas Priest, that sort of thing. [00:06:18] JE: Okay. I’ve heard of this two. Yeah, okay. [00:06:20] TR: That's the New Wave of British Heavy Metal. Then it just splintered off. Most of the really good genres and subgenres come out of Northern Europe for some reason. [00:06:30] JE: Wait. You said heavy metal and then what was the other one that you mentioned? [00:06:33] TR: Oh, NWOBHM. Yeah. [00:06:35] JE: What makes them different? I know Black Sabbath. [00:06:41] TR: It’s like the Second-wave. It just came later. It came in I think ’79 or ’80 was Iron Maiden's first album. [00:06:48] CR: Your attention to detail is amazing. [00:06:51] TR: Oh, I’m really into this stuff. If anybody else is really into this, Sam Dunn is a documentary filmmaker who makes a lot of documentaries about metal. [00:07:00] JE: Okay. Ryan Holiday talks a lot about Iron Maiden, so I’ve listened to them a little bit as well. Are the subgenres divided qualitatively, or chronologically? [00:07:09] TR: A little bit of both, I think. But mostly, yeah. Mostly it is splintered into qualitatively. You've got extreme metal, black metal, Norwegian black metal, power metal, Viking metal is a weird one. [00:07:22] CR: Yeah, there's a lot of different versions of European metal as well. [00:07:26] EO: We have a question from the chat about – so this is a Dutch composer, I think is the — so It's Arjun Lukasen, the Arion Project. Have either of you two listened to? — So I’ve listened to that before. He writes an opera, essentially, and then gets other heavy metal people to join it. And for that album, or whatever. It's a very interesting take. [00:07:52] CR: That is an interesting take. Metallica has done a couple albums with the San Francisco Symphony, which is an amazing work of art in my opinion. I’m not really that into Metallica anymore, but for some reason when you introduce a symphony to a metal band, it just creates this weird juxtaposition almost. [00:08:11] JE: Oh, I’m going to listen to this. S&M. [00:08:14] CR: Yes. [00:08:14] JE: Metallica and the San Francisco Symphony. Yeah, we're looking at that. I’m listening to that. That's exciting. [00:08:21] EO: We can move on from the metal. That might be a good segue. [00:08:25] TR: We should get back to — [00:08:26] EO: — Oh, I thought this was just a metal podcast. [00:08:28] JE: Elixir stuff? Right, right. We're the Elixir Wizards. We talked a lot on the last segment about applications and different things that you could potentially use Nerves for, which if you guys — actually, I want to hear from Todd on this one, just because you've had some pretty novel ones. Recently, I really like the one that you posted on Twitter within the last, was it few days? Or weeks? [00:08:55] TR: Yeah. I think just within the last week. [00:08:57] JE: Can you talk about what it is, what it does and where I can get one? [00:09:00] TR: Sure. I’ve got it on my desk right now, because I’m rewiring the basement, so I took it down. I call it Bolt. It's a network monitor. If you're watching this, that's what it looks like. It pings — it's a little Raspberry Pi Zero running Nerves and it uses fping, which I use the FW up to add to my Nerves base. It uses F ping to ping Google's DNS server every 90 seconds, and it checks for the — just the speed, the internet connection speed, as well as packet loss. It will monitor the performance of the network. If the network is degraded, it has a green, yellow and red light on it on his head. And so it'll show you what the network status is. Then if he goes into red, then he shuts down. There's a relay in there, so my modem/router is plugged into it. It will shut down the router for 15 seconds and turn it back on if we've gone into [00:09:56] JE: Is there something like this on the market? No? Literally, you made something totally new. [00:10:00] TR: I don't think so. I’ve never heard of it. Somebody said that there was a feature built into their router where it would restart. Oh, I didn't talk about that feature. I added a feature too, so it restarts at 4 a.m. every day, anyway. It'll, every 24 hours, it cycles the power, because you have to do that with your router after a while. Somebody told me their router had that built in, but I haven't heard of anything like this. [00:10:22] CR: My router has some custom Linux firmware thing on it, like DD-WRT or something like that and it has just full-blown CRON on it, so you can just throw a script on there and I did that for a while. Just every night, I made it reboot itself because that's easier than trying to ask Charter why my internet goes out all the time. [00:10:42] TR: Yeah. Yeah, so that seems to be a well-recognized problem. I guess this adds to the quality. Plus then, I can get cool graphs out of it and chart my quality and try to figure out what times of day I have the worst Internet. [00:10:55] EO: Yeah. I have ubiquity stuff and you could set it up, so every hour it did a speed test. I’m pretty sure, just all of a sudden, one month I was using a terabyte of data. Then I turned off the speed test and it went back to normal. Just make sure your speed test isn't — [00:11:14] TR: Yeah. Yeah, this is just a ping. This is just fping. Yeah, we're not going to go that crazy with it. [00:11:21] EO: You should make it test the Internet by downloading some torrent. Download the entire Wikipedia, every hour. [00:11:29] TR: Yeah. Keep an Arch Linux ISO up to date. [00:11:33] JE: What about you, Connor? You have any interesting projects that you've worked on recently that you could tell us about that would illustrate the power of Nerves? [00:11:41] CR: Oh, recently I haven't been doing a ton of real exciting stuff with Nerves. Frank and I have been working on getting Flutter, which is a 2D graphics library up and running. We've been — as something you could use, instead of a kiosk, like the full web-browser engine. That's the screen that it'll go on. Or I mean, it'll work on any screen if you're watching. It's an interesting way to build user interfaces that's maybe a little bit more mature than scenic and a little bit less heavy-handed than a full web browser instance on your device. We're still working on getting that up and running, but I think that's going to be a really useful thing for people. [00:12:21] TR: Is this Google's Flutter? [00:12:23] CR: Correct. Yeah. Yeah, with Dart and I don't actually know a whole lot about Flutter, other than you write Dart to make it work. [00:12:31] TR: Yeah. I’m still amazed that Dart is still a thing. [00:12:34] JE: Maybe let's jump into that a little bit. We're talking about GUIs. I mean, first of all, if you don't know what Flutter and dart are, do you want to give a quick introduction of that? [00:12:43] CR: I still don't really know what Flutter and Dart are. I know, I’ve just been working on — [00:12:49] EO: We used them at simple bet, so maybe I know a little bit about it. [00:12:52] CR: Yeah. Go for it then. [00:12:53] EO: I mean, it's basically what you explained. It's a framework. Flutter is the framework and Dart is the language and Dart's a — it looks just like modern JavaScript to me, essentially. It will compile into essentially, just think of it like React Native. You write it in JavaScript and then it compiles into native apps and web apps. [00:13:13] CR: The consensus that I’ve got from the people that are using it is it's React Native, but it doesn't suck. I’ve never used React Native, so I don't know if it sucks or not, but I’ve heard that from more than two or three people, so I’m going to repeat it. [00:13:26] JE: Well, at SmartLogic, we love React Native. If you have a React Native project we could help you with, please come and talk to us and we will help you with your React Native projects. Do you have any, maybe tips on best practices developing? I’m going to move on from Flutter and everything, because nobody in our audience cares. Let's be real. Do you have any best practices for developing apps, like GUI apps? [00:13:48] TR: I like using Phoenix. I know there's a lot of people that prefer to use Scenic and probably — [00:13:52] JE: Phoenix on Nerves? [00:13:54] TR: Phoenix as a poncho app. [00:13:56] JE: What's a poncho app? [00:13:57] TR: Oh, poncho app. It's like an umbrella app, but better, but a little less dictatorial. [00:14:02] JE: Stick here. [00:14:04] TR: Yeah. It's like maybe a mono-repo, I guess, where basically your firmware lives alongside your web application. They can be totally separate apps, but that's what I’ve normally used if I need a UI. I’ll build a Phoenix app and then the data store is usually where I need to get things from is usually agnostic from Nerves anyway. Usually, Nerves uploads sensor data to the cloud and then the web app reads to and from the cloud. [00:14:30] CR: Yeah, that's how I try to do it as well. Having a native UI on a device itself is a neat party trick, but it doesn't seem as useful to me in 2020, where no one wants to tinker around with a thing. They just want to control it from their web browser. Connect it to the cloud and control it via a web browser and make everyone happy. [00:14:54] TR: Yeah. I should say if you look at the Drizzle 2000, I do have some actual toggle switches on there. I do like to have physical switches if there's something that I need to be able to access from the device. As far as having a really complicated GUI or something, I don't know, my brain doesn't work that way. [00:15:11] JE: What is the Drizzle 2000, Todd? [00:15:13] TR: Oh, no. It's the future of lawn sprinklers, Justus. That's why it's 2000. It just started out as a challenge to myself. I needed to get a new sprinkler controller system that can handle more zones. [00:15:32] CR: When you say needed. [00:15:33] TR: Oh, well. I needed to put grass in my backyard and I needed to water it. [00:15:38] EO: This is the thing that Justin was saying, where engineers will buy something and then spend twice as much to do it themselves. [00:15:45] TR: Oh, yeah. I would say, I spent a lot less money. If you were to calculate the number of hours that I spent working on it, I’d probably break even at around, I don't know, 15 cents an hour, versus buying something off the shelf. It was as much a learning experience for me to prove to myself — “Is this something that I am smart enough to do and then is this something that Nerves is good for?” [00:16:10] JE: You didn't happen to install your own sprinkler hardware did you? [00:16:13] TR: Yeah. Why? What do you mean? [00:16:15] JE: In the ground? [00:16:16] TR: Oh, in the ground. Yeah. That's really easy. [00:16:19] JE: It is easy. Okay, so I’m thinking about doing this. This is just a purely selfish question. [00:16:24] TR: Okay. Get yourself one of those ditch cutters. It's called a ditch witch, I think. It's a gas-powered, looks like a — yeah, like a trencher. It looks like a chainsaw that goes into the ground. [00:16:35] JE: Don’t those cost, like, $300 a day? [00:16:37] TR: No, no, no. I think it is like $80. [00:16:39] JE: Oh, man. I’m going to get a trencher and tear my yard up. You built this sprinkler, like the zone coordination, the hardware, right? That's more and then timing and everything, Right? Now other people are using this. [00:16:53] TR: Allegedly. [00:16:55] EO: We had one question/comment that said that they were a user of the Drizzle 2000, so there are at least two users out there. [00:17:04] TR: Okay. Yes. There was a guy, I think in Michigan. I don't remember his name now, but he asked me a few details of it and sent me a picture that he was actually running. That's good. I know John Carstens is currently working on his. I should say that Drizzle has now been moved to a Drizzle org and there's a gentleman by the name of Elias, who's co-maintaining it with me and John Carstens from the Nerves core team. Trying to do upgrades like, give it a touch screen and stuff like that. [00:17:35] JE: We didn't really do proper introductions. Connor, you are one of the major contributors on the Nerves core team. I do want to ask a little bit about your section of the code. Todd I think is one of the biggest evangelizers for Nerves, because you come to all the conferences with Drizzle 2000 and your projects. [00:17:52] CR: Todd has the most complete hobby projects I’ve ever seen, to the point of completion to where it's almost, like, MVP. [00:17:59] JE: It is MVP. I mean, that's what I’m saying. You should definitely — I can introduce you to some people at venture capital firms that do hardware and you could probably take that network monitor and sell that. [00:18:10] TR: I’d love to. Let’s start the bidding at 5 million. [00:18:14] CR: Straight shooter. Very nice. [00:18:18] JE: Oh, that's great. Yeah. No, so Connor, maybe you could dive into that a little bit. What part of Nerves are you responsible for and maybe dive into it a little bit, so that people get an idea of the different internals of the Nerves system. [00:18:33] CR: In terms of responsibility, I don't know that we've ever divvied it up, but I do do a lot of the new networking library called Vintage Net. I do do a lot of work on that. I’ve been working on adding Wi-Fi mesh networking support to that for a few weeks now. That's going to be a really fun project. Yeah, I guess if you were to divide it out, I would probably have — if you were to look at my commit-graph on GitHub, most of my commits would probably be to the networking libraries. [00:18:57] JE: We actually have a question specifically about Vintage Net, which was how do you connect other devices using node connect and Vintage Net after a device boot? [00:19:06] CR: I think there's actually an example of that in the Nerves pack repository. Once you're connected to the internet, it's the same way as you would do any other node.connect. You've got a cookie, you've got a network. As long as you can access the other nodes on the network via their short names, or if you have configured long names, it's just node.connect and it automatically works. You just plop it in your code, wherever. I think there are some tools to automate this as well. I haven't tried them out in quite a while, but I mean, the cool thing about Nerves is after it's booted, it's just a regular Elixir app. Anything you can do in regular Elixir, you can do in Nerves. It's maybe the opposite of Phoenix, where they have a lot of hand-holding and a lot of automatically doing things behind the scenes for you. With Nerves, it's just the bare minimum viable to get you up and running on Elixir. Once you're there, use all the standard Elixir tooling. [00:19:58] JE: I’m just reading some of these questions here. One that occurs to me is maybe interesting is about kiosk terminals, because I’m not exactly sure. First of all, I don't know what a kiosk terminal even is, so maybe you could define that for us. How would you go about internationalizing one of these? [00:20:15] TR: I can explain what I know about it. I don't know how much of kiosk you've gotten involved with, Connor. I think this was a project that came out of Le Tote. It was something that was born of a need that they had in their warehouse. A kiosk, the way I think about it is it's essentially just running a web app. It just sets up your Raspberry Pi to boot into a web app without seeing all the Raspberry Pi garbage at the beginning and launching into full-screen Chromium, etc. So, which is stuff you can do, but there's a lot of steps to it and a lot of little config files to get into. Internationalizing it would be the same as internationalizing a website, because that's what it is. It's just a website. [00:20:54] CR: Right. So the name kiosk came from Chromium — has a kiosk mode, where you can boot it in kiosk mode and basically, it just makes it full-screen and captures the entire screen and hides the URL bar and whatnot. I mean, it's almost a precursor to say, Electron maybe, which Electron is more or less just Chromium in kiosk mode with some magic behind the scenes to hook it up to OS events. Yeah, like Todd said, any way that you can internationalize a web app, you can do it that way. I know, Elixir, we have gettext, which is what Phoenix uses. That would be my suggestion to anyone undertaking this. [00:21:32] JE: It almost seems like we haven't made it too easy. It'll never be too easy, but I mean, just bouncing off that conversation we had earlier about being able to just put everything in a poncho app. Then if you're running something like a kiosk, I mean, it's just all in one place. It's all the same technologies you use every day. I don't know how much simpler it could be, which is actually a good question. We ended the last segment on this question, but I’m curious about; where is the future going of hardware development, specifically with Nerves? What do you see is the ideal state? Maybe, unattainable ideal state, the utopian Nerves project? [00:22:06] CR: For me, when I’m building Nerves features, it's basically stuff that I need to make me forget that I’m on Nerves. If there's something I can do to make it not have to worry about random little hardware things, then I’m going to do that. In Vintage Net, Frank's been working on adding power management to the networking library. If you have an LTE modem, one of the things in the spec sheets is if the module just goes out to lunch, which it does, just turn it off and back on again. Rather than having to do that in your code, we're adding the support to Vintage Net, so it can just automatically do that for you. For me, I just don't want to have to worry about the minutiae of working with random little bits of hardware. Get the bare minimum viable to get to Elixir and then do everything in Elixir. [00:22:52] TR: Yeah. If there is a very complicated program that you're running, trying to get that to work in C — if you're a C programmer, forget I said this, but it's very hard to do multiple threads, or use all the cores on the machine and keep track of that on C and manage all the memory, and everything else. With Drizzle 2000, Elixir is a really good fit because it's managing state for every zone, and there — it is managing its schedule, it's managing the weather forecast and sensor data all simultaneously and they're interacting. To me, that's a good use case for using Nerves and Erlang. As far as the future goes, I’ve talked to Matt Ludwigs from SmartRent about a project. Well, we weren't going to do a training. We submitted to do a training at NervesConf this year, but obviously the schedule fell apart on that one. Our goal would be to have one touchscreen device, like a Google Home — what's the Google thing called with the touch screen? It's a Google Home Max or something. Yeah. That's built in there — [00:23:55] JE: I feel you’ll never have in your houses if — [00:23:58] TR: I’ve got a Google Home, because I use Gmail and I decided that I would rather Google have a 100% of my data than Google have 75% and Amazon have another 75%. Then I only have to— [00:24:13] CR: I’ll just send it all to Google, then — [00:24:16] TR: Then I just have to worry about my allegiances to Google. [00:24:19] JE: See, that's how I try to treat Apple. I’m like “Apple can have everything and nobody else can have anything.” [00:24:24] TR: You're probably smart, except for Siri is dumb. [00:24:27] JE: Yeah. No, Siri is dumb, which — she's dumb because they don't abuse your data to make her smart. [00:24:32] TR: Yeah. That's probably why Alexa works so well. All right, so yeah. The goal would be — my goal in like, all the hard work that John and Connor are doing on networking, especially this mesh networking, so my goal would be to — you would build a network device, like the Bolt for instance, the network monitor. As soon as you plug it in, basically, it knows that it's on the network. The hub knows that there's a new Nerves device on the network and then you would start getting essentially, what is telemetry from it. You would have one hub where you can see all your devices. [00:25:07] JE: That sounds realistic. [00:25:09] TR: It does, because of all the hard work that everybody else is putting in on this mesh networking especially. Yeah, it was going to be like Justin was saying, conference-driven development. That was going to be like, oh, God. if they pick us to do this training at ElixirConf, we're going to have six months to actually make this thing live. [00:25:26] JE: Yeah. I used to do conference-driven development and then I just thought, I’ll just be the MC instead. It takes way less prep. Speaking of, a quick plug for ElixirConf, it is still happening this year digitally and we're working out right now how we're going to be involved. If you're watching right now, please get a ticket to Online ElixirConf. I think the CFP ends on Saturday, so we'll edit this part out of the recorded episode. Yeah, ElixirConf is ground zero for the community. We'd love for everybody to be there and it's online now. It's really much more accessible. [00:26:02] TR: Shout out to Sophie. I know she's doing a training this year. Shout out. If you've got the time and the money and the interest, check out Sophie's training at ElixirConf. [00:26:13] JE: I think there is a ton of financial aid available this year as well. I’ve got a question here about — let's do the easy one first. Case studies that compare Nerves to other IoT solutions and where to find them and if you know the results top of mind. [00:26:30] CR: I don't know of any comparisons, because I don't personally know of any solutions that are as comprehensive as Nerves. Not to — [00:26:37] JE: Humblebrag, much? [00:26:39] CR: Yeah. Not to humblebrag, but I’m just unaware of anything that is even remotely competitive. There are other smaller — I can't think of the names of any of them, but I know there's a couple of them that try to hit this mark. It's just not quite there in terms of the amount of conceptual overhead and the amount of production readiness you get out of the box. Build root is the tool that Nerves is based upon and you could spin your own from there, but you still have to build all the tooling that Nerves has already made. It's made, it's proven and it's already out there. Your solution is just we've all rolled our own solution for stuff that there's existing examples of and it never turns out as well as if you just bit the bullet and got the original thing. There have been some case studies. I participated in a case study, where Erlang solutions went into FarmBot, my previous company’s work with Nerves. I don't remember where that ended up. I’m sure it's on their blog somewhere. [00:27:40] JE: Oh, you were at FarmBot. [00:27:42] CR: I was at FarmBot. Yeah, I was the Nerves guy at FarmBot. [00:27:45] JE: How much time and money would it take me to just get that spun up on my own? [00:27:50] CR: At FarmBot, you can buy one for — I don't remember what they cost, but I made it really easy for you. You just give them money and they ship you a robot and you type in your Wi-Fi password and then it grows things for you. [00:28:03] JE: It's really expensive if you buy it complete. [00:28:05] CR: I don't know. Define really expensive. [00:28:07] TR: It's in the thousands order of magnitude. [00:28:10] CR: The new one that I think it's in production I left before, it was officially for sale, but the new version called the FarmBot Express, I think is on the order of $1,100 or something to that effect. [00:28:22] EO: It looks like they have Genesis. [00:28:25] CR: Yeah. Genesis is the original model and that's all the bells and whistles. I think that one comes — I can't remember what the price of it comes to at the end, but I want to guess two grand, if I had to guess, maybe three. [00:28:38] TR: The big one that does 54 square meters was five and a half grand. [00:28:43] CR: Yeah, the XL model is absolutely huge. If you have to question if you need the XL model, you almost certainly do not need the XL module. It is ginormous. [00:28:53] JE: Three by six meters. Yeah. Most people don't have space for that. [00:28:57] CR: We had room for exactly one of them and we had to shuffle around a lot of — we basically took up the entire parking lot at the office to build the XL version. It's absolutely huge. [00:29:09] TR: The FarmBot Express Max is $2,000 less, so that's $3,200. Then there's a XL. Yeah, there's a 2000 and then the express is $1,500. [00:29:23] JE: I’m buying one of these. [00:29:24] CR: Justin Schneck has one. [00:29:25] JE: I’m definitely. I got to. This is so cool. I just think it's the best thing ever. Is it just the watering? What else does it do outside of watering the plants? [00:29:33] CR: Okay. The Genesis one has this really, really cool tool system, where there's a magnetic tool head and it can go and pick up any tool. I know there are a lot of user-created tools, because the shape is pretty simple and you can print it on a 3D printer. There's a soil sensor, there's a vacuum pump on there, so it can pick up and place seeds and then there's the watering nozzle with a few various attachments on it to use different spray patterns. [00:30:01] TR: If I remember it, I thought the coolest feature was the weeding where it has some head that just machinates the weeds. [00:30:08] CR: Yeah, there's a little clip on the front page. I don't know if it's still there, but it's probably the most shared clip is where the head of the FarmBot — it’s got this really pointy, angry-looking attachment and it just completely demolishes a plant. It shoves it directly under the soil and just gets rid of it entirely. [00:30:26] JE: The motor is powerful enough to really penetrate the ground. [00:30:29] CR: Oh, the motors on those things, well, I mean, it goes through a set of gears. It's belt driven. The motors on those things, I used them for a previous project and I actually knocked a greenhouse over with it, or the arm of a greenhouse. They're absolutely insane how much torque they have. [00:30:42] JE: That's lit. Okay. I’m sorry, that was a little bit of a digression. I live out on a farm. I don't do any farming, but I would love to do the lightest-weight possible version of farm. I just don't have to go outside very often, you know what I’m saying? FarmBot seems like it might be a solution. I want to go outside, smoke cigars, and drink whiskey and sit there reading old books. I don't want to go —. [00:31:04] CR: — Watch your farm in your retro future. [00:31:06] JE: Exactly. That's exactly what I want. Yeah, yeah. What I’ll do is I’ll live stream it using Nerves. Talk about how one might go about live streaming video with Nerves. [00:31:16] CR: There's a camera on the FarmBot as well. Also, shout out — I don't know that we said this before but FarmBot is fully open-source. If you want to just start hacking up features on it, go for it. [00:31:25] EO: Yeah. You've been working on some camera upgrades over at Binary Noggin now and again, right Connor? [00:31:30] CR: Yeah. I don't know how much I’m really allowed to talk about it, but I’ll spoil a couple things. I’ve been working with Membrane a lot, which is another framework that I don't think it's nearly as much love as it should. It's very cool. They do multimedia processing. It's a framework for doing that. It's been announced a couple times at a couple Elixir conferences. I think it's super exciting. Anyway, so we have these networked cameras that we're using Membrane to process them — all of the video data on it. That project isn't specifically using Nerves, but I think it would be a good fit for nerves if someone wanted to do that. Since Nerves is just Elixir, it would just work. [00:32:08] JE: It's just almost plug and play. I mean, how would you do the streaming part of it, though? [00:32:12] CR: I mean, I guess it depends on how you're getting your video data. In my particular case, there’re network cameras, which use — I won't say all of them use, but there're a couple pretty standard formats that they use. H264 media encoding is — it's basically a network protocol built just for streaming video data. It's what Twitch uses and probably what the stream we're on uses. There's a — Membrane built all of the hard work for encoding and decoding those packets. You just feed it video data and then do whatever you want with it, stream it over HTTP using, say MJPEG, or something. The quality on that is not super amazing. But with a little bit more work, you can do H264 streaming via RDP or RTESP is the other one. [00:32:59] TR: Greg and I did a training using the Raspberry Pi camera last year at ElixirConf. If anybody's interested in the code that does that, it is on Greg's GitHub repo and it's called Omni-eye. That will give you the Elixir build, plus all the code that you'd need to hook up the Raspberry Pi camera and stream. [00:33:21] CR: Yeah. The Raspberry Pi camera is a really good way to get started. It spits out raw JPEG frames, which are pretty heavy if you're going to be streaming them. I mean, I guess it depends on the resolution. You won't get 30 frames a second from that camera streaming the raw JPEG frames. It's just not built to— JPEG as a file format isn't really made to do that. You can do MJPEG is something that all modern web browsers support and it's basically just continuously does an HTTP get as fast as it can, which you can get pretty good results out of that, like 15, 20 frames a second if you're local to the device. [00:33:56] JE: I think I just have become obsessed with agricultural technology in the last few minutes now. Because you have a note here about a company called Bowery using Nerves. [00:34:08] CR: Yeah. We don't know a ton about Bowery. They pop in every once in a while and flex on us. Like, “Hey, we use Nerves to do this.” Then we're like, “That's really cool.” Then they disappear again. [00:34:17] JE: Okay. We're calling them. This is us calling out Bowery to — [00:34:21] CR: Yeah, get them on the show. I want to know more about Bowery. [00:34:24] JE: We want to know how you're using Nerves. I’m looking at your site right now. You've got a location in Nottingham, Maryland, which is not far from where I am and New Jersey. [00:34:33] CR: Yeah, they're really cool. I’ve chatted with them every once in a while when they pop in on the Nerves Slack, then they disappear again and into the void of the Internet. Then I still check up on them. They seem to be doing good. As far as I know, they're still using Nerves and I hope they continue to. [00:34:49] JE: Maybe they will reach out. Maybe I will creep on them a while longer and try to find out who we can talk to over there. We've got a question here about IoT and agriculture in the United States. Do you know any other uses either of Nerves, or just more broadly agricultural hardware tech in America? [00:35:10] TR: I think there's tons of it right now. I know. A guy from our local scene did a bunch of contracting work for John Deere, for all their ag. tech. It seems like they have a huge department for that. [00:35:21] JE: They’re using Nerves? [00:35:22] TR: No, they're not using Nerves. Not as far as I know, they aren't. Just in general, I think there's a lot of money in agriculture technology. It seems like a huge industry. [00:35:33] CR: I think agriculture tech is going to be the next huge boom of say, IoT stuff. I don't usually like throwing around the term IoT very much, because I find it vague. I think specifically in agriculture that's going to be the next huge boom that we see in terms of Internet connected things. [00:35:50] TR: My father-in-law was interested in this. He's growing hops in his backyard, so he wanted to do some soil monitor and all that stuff. He was like, “This is where it's the next billion dollar industry or whatever.” [00:36:04] CR: Right. I mean, everyone either wants it, or knows someone that wants it. Every one of those people know someone that has a lot of money to throw at that problem. It just seems like it's going to be the next big thing to me. The last five or so years, I’ve been doing Nerves in agriculture and just — it seems like it's right on the cusp of becoming this huge thing that once we solve the — there's a lot of problems that need to be solved in terms of identifying and even learning about plants. I think I’m not really that super into the AI side of tech, but I think that's what they're really working on is trying to make that the solved problem, so then all of us nerds can focus on the mechanical and software side of it. [00:36:46] JE: Where do you live, Connor? Or about? [00:36:49] CR: I live in California on the central coast in a little tiny town called Morro Bay. It's right off PCH. [00:36:56] JE: Have you gotten to work with your hands on the FarmBot type stuff? Or is it — [00:36:59] CR: No. That's why I work for FarmBot, so I wouldn't have to work with my hands. Or do you mean building the bot itself? [00:37:05] JE: Yeah. Well, building a bot itself. Yeah. [00:37:07] CR: Yeah. I didn't help design it or anything, but I’ve assembled a couple of them. It takes, I don't know, a couple days depending on your mechanical inclining. [00:37:14] JE: Got it. Got it. [00:37:16] TR: The website says that it only takes an hour. [00:37:18] CR: The new one, the FarmBot Express, I’ve not put one together personally, but I’ve seen one put together. The manufacturing partner in China, they made it really, really easy. They ship you three major components and a set of screwdrivers and you screw it into the ground. It doesn't even have to be level, the new one. The way they built the motor drivers, it will auto — I won't say auto-level itself, but it's just very tolerant to unlevel ground, just the way that the motor and the tracking system works. You don't need any precision tools. You don't need any black magic hoodoo to do it. You just screw it into the ground and screw a couple major components together and it's ready. It's very cool. [00:37:58] JE: Okay, you guys. We have got to wrap it up here. I want to give you the remaining time to ask the audience, make any requests of the audience, plug anything you want, shameless self-promotion. The time is yours. [00:38:11] EO: Also, give us one album to listen to. [00:38:15] TR: Oh, wow. Okay, I’m going to start with the album to listen to. If you are like Connor and you like punk music and you're not sure about metal yet, listen to Iron Maiden's first album from 1980. Self-titled. It's very punk sounding. You would barely know that it's metal. Listen to that. Shameless self-promotions, find me online @sprsmpl with no vowels. I think that's it. [00:38:39] CR: For my album to listen to, right after you finish Iron Maiden's first album, why don't you just listen to Metallica's first album, because it's similar in vain and you'll just be in the mood to just really get stuff done for some reason. You're just really going to have a good time after that. Shameless self-promotion, I’m going to shamelessly self-promote Flutter, even though it's not ready yet, because I think that's going to be a really fun project for people. It's still being built. Me and Frank are still — we're only a week or so into it, but I think that's going to be a really fun project. I posted a little spoiler alert tweet on Twitter a couple weeks ago and it got a ton of — people are very interested in it, so I think that's going to be a really interesting tool for people to use. [00:39:21] TR: Let me shout out the company I work for as well, Simplebet. Simplebet.io. We're getting ready to launch, now that sports are starting back up in the United States. We're working on some very, very cool stuff. If you are a compulsive gambler, or you just enjoy sports betting, check it out. [00:39:38] CR: Yeah. I guess, I’ll plug Binary Noggin while I’m here as well. We do software consulting. If you need a Nerves device made to have yours truly help you work on it. [00:39:47] JE: Terrific. It's been really an honor and a pleasure to have you on, Todd Resudek, front of the show. Glad to have you on again, Todd, and I’m sure that we'll see you on the show again soon. Connor Rigby, glad to have you back on and we'll have to do another interview soon. Thank you very much. [00:40:03] CR: Cool guys. [00:40:04] JE: To our audience, thank you so much for joining us for the Elixir Wizards Dojo. Many thanks to our guests from the Nerves team, the organizers at ElixirConf in Japan and all the community members who shared questions with us. Thank you again to our guests, Frank Hundleth, Justin Schneck, Todd Resudek and Connor Rigby and also to Eric, my wonderful co-host. Thank you, Eric, for dealing with me on the show for all of these months. Elixir Wizards is a SmartLogic podcast. SmartLogic is always looking to take on new projects, building web applications and Elixir, Rails, React, infrastructure projects using Kubernetes and mobile apps using React Native. We'd love to hear from you if you have a project we can help you with. Don't forget to subscribe on Twitch, if that's where you're listening. If you're listening on the podcast, please leave us a review and subscribe there as well. Share us on all your favorite platforms and join us again next week on Elixir Wizards for more discussions on Elixir and the Elixir ecosystem. [00:41:00] Announcer: [Inaudible 00:41:01]. [END] © 2020 Elixir Wizards