About this talk
In this talk, Kyle Ranken discusses his journey into home automation and his unique use case of automating his cabin in the woods. Initially skeptical about home automation, he found inspiration in his remote cabin, where convenience and security became essential. The speaker explains how he set up his home automation system using Home Assistant, prioritizing simple, off-the-shelf components while ensuring local control without relying on cloud services. He details the various devices implemented, including video doorbells, security cameras, and environmental monitors, as well as the balance he strikes between technology and a retreat from the digital world. The session also covers his current setup and includes a live demonstration of Home Assistant's interface and capabilities.
Full transcript
Hello. Hello. Hello. Uh, can everybody in the back hear me okay with the where the mic is and everything? Thumbs up if so. Um, say what if you can't hear me. >> Yeah. Thank you. Thank you. Um, so my name is Kyle Ranken. Uh actually I realized that this is my 15th scale uh that I've been to and spoken at. So which is kind of weird when
you I've see a lot of friendly familiar faces here. Um so yeah, it's great to be here. So um my background is I sort of started off as like a system administrator back when that's what we called ourselves. Kind of pivoted over into security. Um since then in between I've written a number of books about Linux and wrote a column for a long time for Linux Journal
magazine. Um, but today we're going to talk about my smart cabin in the woods. So, as a brief introduction, I'm sorry, but I was never really that into home automation. I'm sure there's probably a couple of people in here that are really hardcore into home automation and you want to like walk into your house and be like movie mode and then all the, you know, disco time
and like the disco light comes out, all that stuff. I was never really into that. I'm fine with light switches, frankly. Um, and so most of the I didn't really have a use case that I found compelling. When I was talking to a lot of my friends who were really really hardcore into home automation, they would tell me all the things that they were doing like I
guess I don't know. Um, but and and also I should I should also preface this by saying if you are super hardcore into like Home Assistant and and you were hoping to have a talk that does a deep dive into like really hardcore tweaks and tuning or like configuring ESP232 chips to like custom do this isn't that talk. This is like a general purpose anybody never touched
home assistant or never touched anything before. This is a general purpose audience kind of thing. We're not going to get really into the into the woods here. All right. So um I wasn't in the home automation then I got a cabin in the woods um actually and it sort of changed my perspective because I finally had a use case that I found home automation in particular something
like home assistant could really help with but it's a unique use case when I talked to a lot of my other friends that were in the home automation stuff about that like oh yeah that's weird I that's not really the use case I was thinking of uh for home assistant that's not what I use it for exactly. Um, here's the other thing is I don't go to
my cabin to cisadmin. I go to my cabin to relax. So, my goal was to have a place where I again I have a use case which I'm going to get into, but the goal wasn't to turn this log cabin into some sort of crazy technological thing. Um, and for me to spend all of my time tweaking and tuning it and getting it just like I wanted
things to be very offtheshelf, very simple to use because I go up there to not work. Um, at least allegedly. So I wanted easy upkeep, but the other thing is I wanted local control uh when I was setting up some sort of home automation. I wanted to be able to manage everything myself there. So it's like this weird balance of it not being too difficult to use
and too difficult to maintain but also locally controllable. This thing started as a security system actually uh which maybe makes sense. That's sort of the my primary use case but then it expanded from there. And if those of you who have started getting into something like Home Assistant, you can probably attest to things tend to snowball once you have it initially set up um because you start
realizing all these other use cases that you didn't realize you needed. So this talk what I'm going to talk about is just sort of introduce you to the cabin um and sort of the problems I faced. I'm going to give you my use case in particular for home automation in a cabin. Uh why I picked Home Assistant. There's a lot of different options out there for home
automation. uh but we're all at a Linux conference so you know by itself just the fact it's a it's a open source uh software is a enough of a reason really but uh other reasons as well um I'm going to talk a bit about my security system that I set up there uh then go into some of the remote monitoring systems I set up at the cabin
uh and then all the other things that I ended up kind of getting into a rabbit hole about uh because I had it all set up so why not do all these other uh fancy things I guess um and then I'm I'll talk a little bit about the current setup and then I'm actually going to do a live demo uh which I almost never do in talks
u with a couple exceptions and usually I definitely don't do live demos that rely on the internet. So uh but we're going to break all those rules today. So stay tuned for that and we'll see how that goes. All right, so welcome to my cabin. Um wow, the image is giant and the text is going to be small. This is going to be fun. Okay, so I
have a log cabin in a redwood forest. Uh it's pretty sweet. Um, it is remote. Uh, but it does have electricity. So, this isn't like a full off-grid thing. I have electricity. I have running water. I have flush toilet. All the things that you So, this isn't like super hard like hardcore camping out there. Um, like I said, I have the internet. Uh, but only through satellite.
There's no other option out there. And also, even satellite's kind of weird because you're surrounded by these tall redwood trees. Um, and it's not ideal uh for modern satellite internet. Uh, but there's a little spot where you can put it just right and mostly it works. Um, so I use this as a weekend getaway. Uh, I work in tech all day long. Uh, I again I go
up there to not work on tech for the most part if I can help it. Uh, so this is supposed to be a getaway from all of that stuff. But I do do a lot of what I call work laxing. Uh, so this is a kind of a fixer upper cabin. And so at least for the first the first year or so I've had it, uh I
go up there and start doing all of the chores and things that we need to do to to renovate it and you know like doing some plumbing, doing some you know ripping out this, putting in that all that sort of stuff until I get tired then I go and relax and read a book and out in the woods. Um so yeah I call that So my home
automation use case is kind of interesting. I didn't actually want act I didn't want real like what you think of as automation. I didn't want to really automate the home. Exactly. I didn't want to be like, you know, automatically turn on lights and turn off lights and do all of that stuff. That wasn't really what I wanted. Um because I wanted to unplug. If you're up there,
you don't ne if you're in a log cabin, you don't necessarily want to be surrounded by technology. You you kind of want to not be surrounded by technology if you can. So, I had to strike this balance. I was I wanted there's some features I wanted but I also didn't want to be surrounded by technology when I was there to unplug. Um so it required this very
careful balance between a digital and analog life. Uh so a lot of it meant like a lot of the digital stuff is sort of hidden behind the scenes somewhere. Maybe you couldn't see that this was set up um but it was there if I needed it. My main use case for doing this was is the security use case. This is a place that I don't I don't
live full-time. um and I'm not there all the time and so I wanted to keep an eye on things when I'm not there because it's it's somewhat Uh my secondary use case that I didn't start out with but I ended up catch uh adding is monitoring just it's sort of like the first use case is is the place safe but also um what's going on there when
I'm not there. There's a lot of different interesting monitoring use cases when to just check on a place when you're not there that I wanted to set up and like in general just a lot of different a lot of different things that when you're not someplace that's like an hour or two away uh that you'd want to know about that kind of stuff is is really my
use case. So, for example, did someone come by when we weren't there? You know, that would kind of be interesting to know. uh like to know that uh especially if they went got inside. Uh what's the weather like up there? So this is a you know this this place is over an hour from where I live. Um and because of where it's located, the weather there is
different than the weather at my house. So in particular, it's it's a little bit closer to the coast. Um and so it might the temperature variation might be like 10 15 degrees. And it would be kind of useful if there's a heat wave in the summer at my house to look and say, "Hey, I looks like it's pretty nice up there. Maybe we should go up there
uh and escape the heat." The other thing is um when you leave a place that you don't go to every but every so often, like there's a lot of things you end up wondering whether you did. Uh like did I actually lock the doors uh before I left? Uh all of that kind of stuff. I wanted to be able to answer those sorts of questions. Uh because
if I uh didn't and what's worse is you remembered, oh, I didn't lock the door, but now I'm an hour away. I guess I get to turn around and go lock the door, which is kind of a bummer. So, I had some constraints. Uh there's a lot of uh proprietary automation systems available out there uh to choose from. uh you can get all-inclusive, you know, like many
different bigname providers provide you like all these different systems under their brand and they have their own little hub that does stuff. of course, all those things assume that you're going to just be streaming to the cloud all the time, for instance. And I have the internet that I do have is metered. Um, I don't have like unlimited internet up there. It's metered. Uh, because again, I'm
not there all the time. I don't need a lot of internet bandwidth uh in in a like a I'm not downloading a whole bunch of stuff up there, but I have I do it a little bit. So, I don't want a system that's constantly streaming all of my camera feed up to the cloud, for instance. That would be a a problem. It would suck up all my
internet. Um so, I wanted local control. I most home automation systems, uh except for the ones I'm talking about here, many of them at least want to phone home. Uh that's like one of the first things they want is set up an account with us and start streaming all of your information to us and we'll we'll share we'll give you an account you can we'll share it
with you u but it's kind of like our information and we'll we'll give you access to it. Um I didn't want any of that. I wanted to control everything locally. I wanted to avoid vendor lockin. Um it doesn't take a whole lot of searching on the internet to find cases where someone bought some sort of cloud enabled internet of things device and then the company folds and
then their thing is a brick. uh unless some friendly open source community unbricks it or comes up with some sort of alternative firmware or something. I wanted to avoid all of that in the get-go and just and not be feel like I had to buy all of my devices from one vendor. Um that's just like a general philosophy, but it definitely applies here. I also wanted to
protect my privacy as much as possible. Um I feel strongly about protecting privacy. It's a sort of a fundamental thing with me. Uh but in particular when you're talking about things in your home uh and doing things like setting up cameras or other things like that, it's even more important to think about the privacy use case and who has access to these like streams of of video
coming from a place that you go in and out of and all that stuff. Um so in particular, home automation use cases I think are even stronger uh argument for privacy than some other some other technology. I also wanted something easy to set up and manage. Again, I didn't want to spend all my time up there tweaking and tuning this stuff. Uh, I wanted to go up
there and it just work and not have to set stuff up. I wanted to be easy to set up, too. I didn't want to spend all this time doing all the setup um whenever I wanted to do something new either. I wanted to be very easy. Uh, and I also wanted maximum support for devices. I didn't want this is part of the vendor locket, but not just
that. Sometimes there's an ecosystem of of devices and I didn't want to be forced to have to pick certain things. uh if I didn't have to and then be not exactly locked into them. It just typically those ecosystems the things are more expensive because they know they you kind of have to use their products and so I wanted to have cho uh like have a competitive marketplace
for you know what temperature sensor I use. So I chose Home Assistant. Uh this is a free and open source software home automation tool. It's been under development for many years. It's been around for a long time. um which is great for a project like this because at this point it's very mature. Um it has a a large community supporting it and over the years each of
these community members who are really into home automation would say well I got this home automation device and I actually want to start using it with home assistant but it doesn't work yet and then they would work together as a community to get this device working. Then repeat for another device a new device comes on the market people would figure out how to get it to work
and set it up for home assistant. As a result, now it has this incredibly wide range of hardware support and much of it really kind of works out of the box. In fact, if you now I messed messed up a Okay. Um, many smart devices actually advertise if you were go to like say Amazon or something and look for smart devices, you can add the word home
assistant in the search and many devices will will now advertise their compatibility with Home Assistant. Don't like take that as gospel when you see that. Uh, I would in general I would confirm by going to like home assistance forums or go to their site and kind of just do a little bit of research on, yeah, it's compatible, but what does it mean to actually get it to
work before you pull the trigger and buy something, but all the same, the fact that you have a lot of devices that are advertising that they work with Home Assistant is like a good sign. Um, the UI itself is pretty polished as as far as these things go, especially as far as like open source software goes. Uh, and it's pretty easy to use. Uh especially these days,
I'm sure if there's folks here that used it a long time ago, you're like, "Yeah, it's really easy to use. You just open up a it can automatically detect a lot of devices. In in fact, in many cases, if you have a compatible device, it may even in when I first set it up, it found things that I didn't know were compatible with Home Assistant because it
just shows you all these here's a bunch of devices we found that we haven't configured yet. Would you like to set them up? And like, oh, I didn't even know that you could do that. Sure. Yeah, let's add that. Um, the emphasis also in the home assistant community is local control. In general, they want to provide an ecosystem where you can control all of this home automation
devices locally and you don't have to depend on some sort of external service. Again, there's cases where that's not true. There's plenty of things you can use in home assistant that do, you know, use the cloud and you have to connect to a cloud account. But there's also in general the default assumption is ideally everything is local. Um, also it can run on Raspberry Pi and you
don't even necessarily, depending on what you're using it for, have to have like the latest and greatest Raspberry Pi. If you're like me, and I know I am, uh, you probably have a bunch of different Raspberry Pies lying around because you upgraded. You used one a couple years ago and like, well, now I need a new one to do this other thing, and now you have like
a stack of these old ones you're not sure what to do with. Um, use one of those for Home Assistant. if it's new enough to support Bluetooth, for instance, it's probably a decent a decent choice. And that's what I did. So, here's my security system. Um, so here's an example of one of the camera feeds looking out one of the windows. Uh, so like I said, my
initial focus is on security. Uh, I started with a Raspberry Pi. I'm still using a Raspberry Pi. It's it's working fine for me so far as the main uh computer driving all of this. Uh I once I set it up, I connected it uh with my home network just VPN between the two so that when I'm at home I can what I didn't want to do is
expose Home Assistant to the public internet and just sort of connect to it and hope that everything's fine. That's a bad idea. Don't do that. Um but I did connect it to my VPN at home. So when I'm at home I can and you'll see in the demo I connect the cabin and I go to my cabin. Um so the first thing I did was I added
a real link PoE doorbell. Um, so this is sort of the first device that got me into Home Assistant, solving the problem of we would like to have a a doorbell. Um, and ideally a video doorbell. There are a lot of um proprietary video doorbells out there that you can buy. Um, some of them have uh some questionable practices about who they share your video feeds with
and under what circumstances they share those video feeds. And I didn't even want to deal with any of that. I wanted can I have a I I like the idea of a video doorbell. It's kind of nice. Someone hits the door, you doorbell, you see a picture and otherwise you have a a security camera aiming toward the front of your door. That seems cool. Um, but I
wanted it to be local. So, um, Riolink provides a PoE door. So, PoE means power over Ethernet. So, when you're setting up doorbells, for instance, you're going to find there's a couple of different systems. Some are powered by u uh they they assume there's like wiring for your old school doorbell. Um, and then in that case, you have to worry about, well, okay, uh, well, how do
I get the feed from the front door somewhere else? You could use wireless, which some I like hardwired security cameras. Personally, I'm not a big fan of a bunch of wireless uh, cameras uh, because it's easier for people to potentially listen in on that stuff. Uh, so I like wired. Also, um, power over Ethernet means if I run a single cable, an Ethernet cable to this thing,
it both powers the device and provides a nice little network link. Um, and I've been I'm a, like I said, I'm a systemman. I've been crimping Cat 5 for decades now. Um, I still remember orange, white, orange, green, white, blue, blue, white, green, brown, white, brown. Um, and so crimping that, you don't have to crimp a cable. You can buy one, but yeah, just set of cables.
You plug them in and it and it's powered. Um, this one in particular has really good uh, home assistant support. Um, and there's a lot of nice features about the Real Link ecosystem in general. So, I added a doorbell. And then in general, there's a bunch of outdoor cameras as well that they sell that are compatible with Home Assistant that once they're on your network, Home Assistant
just sort of sort of sees them. Um, and I didn't get this. There's probably fancy ones that have motors and they move around. I just got sort of the fixed place ones that that just sit there. But again, these devices um uh you can run completely locally. It doesn't rely on it doesn't depend on you signing up with some sort of cloud service somewhere that it streams
all of your your video streams to. Um that said, the real link by device does like by default does like the phone home uh which I'm not crazy about. Uh so I just blocked its internet access um and it still works. So all you in particular, so I'm using satellite internet and everything sort of flows through that. it has the option to pick per device and just
sort of turn off internet per device. So, I have a standard practice now if I add like a real link device or a some sort of home automation device that's on my network. Um, I know it's going to probably want to phone home at some point. So, the moment it comes up, I see it on on my router and say, "Yep, get disable internet for that thing."
And it's fine. Um, because it just needs to talk locally to Home Assistant. Um, so I have camera coverage on each side covering every entryway. Uh, which is useful. And um, yeah, you can't see that that because the I had to scroll down my images there. The image is too big. But basically, I it's auto detected in Home Assistant, which is really nice. Um, let's see if
I can make this a little bit. Yeah, perfect. Um, it's auto detected in Home Assistant. So the moment it's on your network, it shows up as a device that can be configured. It knows exactly what type of device it is. it knows what its capabilities are out of the box, which is really nice. Um, and once you have it set up, you can monitor the live feed
remotely. So, that means I can just connect to it and and click on the the camera image and start seeing a live stream, including audio. Um, with the doorbell, it has some other fun features where you can like send an alarm or you can press a button on your home assistant to be like, I'm not there right now, but or you know, leave the box at the
door. There's stuff like that you can do. Um, which I don't ever do, but you could maybe you like that. Um, so once I have cameras now, I can remotely just kind of have eyes o over the cabin when I'm not there. But I also, it would be nice to have some notifications uh about when certain things happen. And uh it turns out that the these real
link cameras have very basic, it's not like super sophisticated, but very basic person detection, animal detection, and motion detection that's built into the camera. So this isn't like some sort of add-on thing. plenty of uh support for you can do add-on devices where you like send some of the stuff to AI who's like, "Yeah, that looks like a dog or whatever." I'm not doing any of that
stuff. Again, I'm not trying to get super fancy here. Out of the box, these real link devices um support basic detection. Like I said, it's not perfect, but it doesn't need to be. Um these are represented when these things happen. They are events that home assistant notices. Uh front door camera sees a dog or whatever, sees an animal. Um, and you can do then you can then
do things based on those events happening. Um, and they call them automations in Home Assistant. And basically you can have an event that then triggers an automation and you set up circumstances when you're configuring this to do something. Tell Home Assistant to do something when this thing happens. Um, it's pretty straightforward for just about any the easiest notification to set up is when this thing happens, notify
me via a phone app. So, Home Assistant has an Android and iOS phone app that you can install. Um, and and you configure it with your device and when you launch it, you can see the same thing you would see from its web interface. Um, but also once you have that set up, it will send you configure to send you phone notifications. So, it'll be like, yeah,
this event happened. Um, and whatever you and you can can tell it what what to say to you like person at the front door or whatever. Um, I also added email notifications because the thing about Home Assistant um, notifications on the phone is they're kind of ephemeral. Like you'll see them like, "Oh, I want to see that." And then sometimes you have to like dig into an
event log or something to see the history. And I kind of just wanted some sort of permanent like I get an email that that has the picture that it took when it detected a person at the door or whatever. So, um, I set up email as as well. What I typically do for camera notifications is I first thing I do is take a picture because that's fast.
I want to capture the immediate moment that the thing triggered. Um, so I capture a picture and then I take about 40 seconds of video. And you can configure Home Assistant to actually start with 10 seconds before the event happened because it has this like ongoing stream from the camera. And so it says, "Oh, I detected a person." and home assistant will say I will say home
assistant take the previous 10 seconds before you detected the person and then the next 30 seconds after record that um and and save it basically. So then I can go see that because I'm not I'm not saving live camera feed 247. I don't need that. But if it finds something I kind of like it to save that and then I can review it later. Um so for
example notify me if someone presses the doorbell when I'm not there. That'd be kind of nice to know. a neighbor came by to drop something off. I wasn't there. Yeah, this cabin is not like super remote. Like this little cold little like neighborhood. There's some really cool neighbors there. Um but if someone drops by, it' be like nice to know. Um notify me if a person is
detected and I'm not there. Again, a thing I'd like to know if someone's like walking around my property. Um notify me if an animal's detected. This is really cool if you have something in the woods. Um because there's there's a lot of animals uh that you may not realize are like roaming around your property. Uh especially because the other thing is these real link cameras and a
lot of these security cameras have great night vision now. And so like amazing in many cases night vision and so you see a lot of really cool stuff. Um so for example, here's a here's what this might look like. Um, here's what the interface looks like if you're trying to configure a basic notification to notify me if someone's detected at the cabin front door when I'm not
there. Now, how does it know I'm not there? I have the app on a phone and when I have the app on the phone, you can set up a trigger. It knows that I have an app. I I have its app on my phone and you can set triggers based on the fact that um I'm in the zone of the cabin, which means I am in the
area around the cabin. And so it knows that because I have the app. But again, this isn't like going to a cloud or anything. This is my phone app talking to my home assistant only. This isn't like it's phoning to some magic home assistant service in the cloud or something always logging my information. It's not doing that. So when front door camera person turned on, uh, which
is what I called it, uh, well maybe that's what the event is. It doesn't matter. There's a front door camera. I called it the front door camera because that's what it is. uh if it detects a person, the way it it describes that is person turned on. Uh which is weird. Uh but it that's what it does. Um and if that's true, uh and and you can
do other if statements. So and and if something either if something else does happen or in this case does not happen, does not match. So and if I'm not in the cabin zone, then you can add other conditions. In this condition, it's like send a notification and I have like a send a notification, send me an email and it kind of drills down. You can configure what
those things do. But again, it's not that tricky. It's like add a add a trigger, add a condition, add an event. And it's pretty easy to set these things up, especially once you get the first one going. You'll find yourself just referring to that one and building on it as you do other ones. Um, this has led to pretty interesting notifications and it's led to ultimately what
I call Fox News. Um, which let's Yeah, here we go. Um, so I get a lot of animal notifications and and just about every day, um, maybe every other day, um, I'll get a notification that animal detected with a little screenshot. Then I'll go and download the video and then share it with my family as the daily Fox News. Um, because we have a family of foxes
that live, uh, around the property and they start roaming around and like I said, especially now it's the spring, so they're getting very excited. Uh, and so they're like every other day more or less I get some sort of new notification about I can keep up to date with what the foxes are up to. Um, mostly during the evening and and night, but sometimes during the morning
um as well. Uh, there's now a neighborhood cat that kind of like walks around. Um, and skunks and all the sorts of things you'd imagine in the woods. Um, deer don't get so close to the camera it picks them up. They kind of stay a little bit further away. Uh, squirrels of course, but foxes, the fox news is the most interesting to me. so cameras are cool.
It's nice to have cameras when you're monitoring a cabin, but there's, you know, plenty of other use cases I found like in particular remote monitoring. So, what I mean by that is like, uh, after that, some other sensors. Uh, so I have cameras, but I'd like to add some other sensors to my cabin. Um, most of the sensors that you use for this sort of thing typically
are using Bluetooth or ZigGB or Z-Wave to communicate. So, what I mean by that is many of these things are little tiny devices and they don't necessarily want to add all of the overhead of adding like a chip to support Wi-Fi and all this stuff. Chips that support ZigGB or Z-Wave or Bluetooth are typically cheaper and they're smaller and lower power and stuff like that. And that's
actually better anyway because if you have a choice, it's better to not have like 5,000 devices on your these devices on your local network if you can help it. Um, if they're on Bluetooth only or ZigGB or something, they're they're not talking to there's no you don't have to worry about them talking to the internet directly. Uh, so and most of these devices that's the case. They're
using one of these protocols. Um, the Raspberry Pi typically uh supports these days all supports Bluetooth. So you get that out of the box, but you don't get ZigGB or Z-Wave. Um, the folks behind Home Assistant actually sell like their own standalone Home Assistant box you can get that has all of the stuff built in. Um, since I was using a Raspberry Pi, I got what's called
a ZStick 10 Pro. Um, not a ZStick 10 amateur, but a ZStick 10 Pro uh because I'm a professional and plugged it into the Raspberry Pi and that gave me uh both ZigGB and Z-Wave support. Uh, next thing I got was a GOI branded Bluetooth thermometer hydrometer. Again, this is a go to Amazon, search for I want a thermometer that supports Home Assistant. Go. And then you'll
see a bunch of stuff and like, oh yeah, everyone likes this one. And I go to Home Assistant site and they like, "Yeah, this is super easy. It's detected out of the box. You don't have to add anything." Like, perfect. Buy it. Um, and so what I do with this is I monitor the indoor and outdoor temperature and fridge and freezer. By the way, even outside of
like a cabin in the woods, the fridge and freezer temperature is like a core use case. If you're going to set up home assistant and you're going to do nothing else, get a couple of these thermometers, put one in your fridge and one in your freezer because inevitably you're going to leave the door open a jar just a little bit. Um either the fridge or freezer and
the temperature is going to rise at some point and you won't know. Uh it might do it overnight. I might do it for a day or two. Then you go, "Wow, it feels kind of warm in my fridge. That's kind of strange." Or the freezer. Why is there water dripping out of the bottom of my freezer? Um this you can set up these these probes and then
tell home assistant when my fridge gets above a certain temperature for more than 30 minutes let me know and like oh yep someone left the door open a little bit doesn't even have to be a big you know just like a little a jar is enough to like start raising the temperature killer use case um the other use case I use it for here and if you
look very closely you can see that this graph has outdoor south temperature and outdoor north temperature which is interesting because um we're in the northern hemisphere and so they get different temperatures There's different sides of the house. I kind of want to monitor both. And then the hallway temperature. So, I just have a single probe inside right now. I want to kind of know what it's like
inside. If you were to look closely at this graph, you would be able to tell me when I was there. Um I I went during this period of time twice. Um and you can and if you look closely, you can tell when. Uh because the rest of the time the temperature kind of flows along uh with the rest the outside temperature. But that's useful. I use it
in particular for that case of like, oh, it's hot here or cold here. Is it any better up there? Uh, and I can go check that out. The other thing I added was a third reality Ziggby door sensor. So, this is like a traditional kind of like a a hall effect kind of gate. Uh, you'd see them like sliding glass doors or windows or any of the
traditional kind of alarms there. This one uses Ziggby and you basically just set it up at a threshold. you put one side on one side of the door threshold and one side on the other. When they're together, it the doors closed and when they are separated, it knows that it's opened in some way. So, I set that up at a sliding glass door I had. Um, and
that allows me to set up an alert like when that door is opened and I'm not there, let me know. It's pretty nice. Um, because especially with sliding glass doors, it's kind of, you know, it's weird. Um, so that's nice. I also added, and this is another key thing, um, is a water leak sensor. These are relatively inexpensive and they're basically look like a little they look
like a a little bit larger Air Tag basically. Um, and you set them up, you get them linked with Home Assistant and then you put them under all of your sinks and anywhere where water might leak that you'd like to know that you don't obviously can see directly all the time. Um, just peace of mind. uh especially if it's someplace you're not all the time, it'd be
kind of nice to know that there's a couple of gallons of water that are leaking out of a burst pipe when I'm an hour away and and won't notice for a while. So, set up those. Pretty nice peace of mind. Um I also installed a So, I'm not a smart lock guy, okay? Um I like doing lock lockpicking and all that stuff and so I'm like, "Yeah,
whatever. I don't I'm not into like all of those sorts of things." That's not that's not me. However, um this particular smart lock is not a smart lock the way that you would traditionally think of it. Well, now I have a big keypad or some other thing and I take my phone and do all this stuff. Um it goes inside the deadbolt that you already have. So
from the from all you look from the outside, it's it's your it's the same door lock you had before. It's just the internal deadbolt mechanism gets replaced with this. Um and what that allows you to do is if the battery dies in it, it can't talk to the network or whatever. It doesn't matter. you can use your key and unlock and lock whatever. But what it allows
you to do when the battery isn't dead and it is connected um is monitor the state of the lock and change the state of that lock um in remotely. So this solves my problem is did I actually remember the lock of the door? Uh I can now check and see whether that deadbolt is in the lock state or the unlock state. And if it's in the unlock
state and I'm not there and I forgot to lock it, then I can press the button and and lock the door. pretty handy uh little Um, of course that's not it. There's plenty of other expansions. Uh, so uh things tend to snowball uh with home automation once you get started. Uh yeah, uh it's just it just happens. You you add one thing, you're like, "Wow, that was
really cool. Imagine all the stuff I could do now that they have water sensors everywhere." Then you're like, "Oh, but you know, it'd be really cool if I could remotely figure out like if I if I left like the oven on. That would be pretty sweet." Um, how would I do that? So, uh, there's this device called an Emporia V3 home energy monitor. Um, this goes inside
your breaker box and it has little clamps and big clamps that go around all of your circuits in your in your breaker box. All right. And what this allows you to do is to monitor the power usage for each breaker. And when you're setting this thing up, and this is actually quite a bit of setup. This is if you're here for like the beginner guide to home
assistant, don't do this. uh this is involved. Um besides the fact you're dealing with electricity and all of that stuff. Um like if you looked at that like that's scary, then don't do this. Uh because it is a little scary. But you clip you clamp these clamps on every circuit and you label them and you label them in the in the device itself and then it knows
what all of the circuits are for and it tells and it now measures how much current's flowing through each of those circuits. So it's kind of handy. Um, even handier, most people that get a system like this also have some sort of solar setup and what they want to kind of know is what usage is going out and what usage is going in. And this is part
of a larger ecosystem. And in fact, these devices support solar. Um, this is the one device where I broke the rule about phoning home. This one, um, supports not phoning home. Uh, but you have to reflash the firmware with like an open source firmware which I'm again it was already involved getting the set up. I wasn't quite ready to do that and like and it's not just
like oh you have to log in and then like change the like install software. It's like you have to open the box and then like do a hardware flash and you have to clamp stuff on. Like I've done that stuff. It's like I'm here to relax guys. I'm not here to like flash ESP32 firmware um on this device yet. But maybe maybe talk next year. Maybe we
will do that. Um yeah, this is so I I said that I didn't really want to do any of that home automation stuff. Uh and uh and mostly that's true. Uh but they make these really cool smart curtains. And what they do is they clamp on your existing curtain infrastructure and they they allow you to automatically open and close your curtains. and and it was just too
sweet to pass up once everything else was all set up. And you're like, "What else could I do?" You know, it would be kind of No, one of the things I noticed is every time I come in the cabin, I unlock the door and I open the curtains, uh, let some light in, and every time I leave, I close all the curtains and I lock the door.
It' be be I'm already can automatically lock and unlock the door when I leave. it'd be kind of cool to have a checklist of all the things I do when I leave the cabin and as many of those as possible it automatically does for me. That'd be kind of cool. So, that's how I convinced myself uh that this was a really important thing to to buy. Um
in addition to that, I also I typically don't use a lot of smart plugs. This cost smart plug is one that does work well with Home Assistant. I had one use case where I had I wanted to set up some string lights, you know, some decoration, make it look nice and the plug that go over an archway and the plug that it went to was in this
hardto-reach spot actually behind all of my firewood. Um, and so to that meant every time we wanted to turn the lights on, you'd have to like remove some logs, unplug it, and like I didn't want to do that. So I now I have a smart plug um for that particular light. Um, so now I can turn it on and off when I want to. So yeah, so
I did I did end up setting up a leave cabin button um that closes the curtains, turns off the light uh that one light and locks the doors uh for me now. So I did I did uh break down and do a little bit of home automation in that way. Um so yeah, what does that look like? Um it's like you're going to like a play or
a movie theater or something, right? Yeah. Um, yeah. So, so I ended up the curtain next to it. I also set it up for that, too. So, now there's a whole thing. They both go. It doesn't play any sounds or anything. Doesn't play any like dramatic music. It just open yet. Um, it just opens the curtains. Yeah. Um, all right. So, what's my current setup look like?
Let's do a live demo. All right. So, let's see if I can shrink this a little bit because Yeah. Here we go. So, this is the interface. Well, that's actually probably too small for you folks, isn't it? So, looks good for me, but all right. Um, so the thing about Home Assistant is when you add devices, uh, you can assign them to zones. A zone zone in
the home assistant. In Home Assistant, you might think of like as a room in your house or some section of your property or something like that. What it's basically a bucket uh that describes where this thing is or what this thing is is involved in. So, I use it mostly for inside. I define the rooms in the cabin and if I have a device in that room,
then when I add it to home assistant, I say, "Yeah, it's in the front door zone." For instance, the front door zone is all the things that are in the front door. What's in the front door? Um, like my camera, my PoE camera, which you can see here. This is this is a live feed. So, there's no one robbing my cabin right now, which is good. Um,
and you can see all of these uh you can see my mouse. You can see all these uh little notifications here, right? These are all the things that you can trigger. You can do motion triggers. Don't necessarily recommend that unless you have a place where you know you're not going to get a lot of motion. Um but the cool thing is you can click on each of
these things. So like for example, would it be a good idea for me to to trigger some sort of motion thing? You can see an act you can click on it and see the history of how often this thing would would alert you if you did set a notification based on it, right? Um and all these things like it has a a pet they call it the
pet um notification. I think it's actually more of like an well the other one they call it an animal but the same sort of thing they a dog or cat-shaped object. Um and yeah locking mechanism I can lock or unlock things. Um outside I have the camera and I have a thermometer that tells me the humidity and temperature. That's nice to know. Um and again cameras in
all the different places in the hallway. That's where I keep track of both my temperature. And once I set up that circuit monitor, then if I have a circuit that I know is specific to a particular room or area, then I assigned it when I added it to Home Assistant to that zone. So now I can say how much power is this room drawing uh overall. And
that's kind of handy. Sometimes it's actually really handy if you try to if you want to figure out what outlet a circuit what outlet belongs to what circuit. you can plug in something big and then look at your app and be like, "Oh, yeah. It looks like this circuit's now drawing like an extra 20 watts or whatever." So, it's pretty handy. Uh yeah, and the living room.
So, yeah. So, um I do have curtains. You can remotely handle uh control the curtains. I don't have a camera in I don't really want to set a camera up inside. That feels kind of weird. Um so, I'm not going to like do a cool demo where you see the camera live opening and closing or anything like that. Um, but yeah, I could I can remotely open
and close this if I forgot. Um, and that's these are those lights that I thought were cool. Um, and yeah, I set up a couple of hot switch buttons here. So, these are just a couple of like quick actions. So, I it makes it relatively easy to script actions. You basically it's semi easy the way that this is one area in the home assistant right now that
even if you if you use the UI, it's a little convoluted. You have to like set up a couple of stages of things to set up a script. It's a little annoying. Um, and it's not entirely intuitive, uh, but it's still not too bad. And then at the end, you have a button you can press that does the thing. Um, oh yeah, and it monitors my energy
distribution and stuff. And so this is the default dashboard. If you set up Home Assistant, you will get one of these for free. And whenever you I by free, I mean you don't have to do any any additional setup other than say this device belongs to this zone and create zones for your place, your house based on what you want to see. and it automatically will organize
everything. Um, so but and then they also have a you can set up a graphs one. This is one I set up by hand uh where basically I just said these it knows which items provide graphable data and so when you say I want to set up a graph it's like well here's some things you could choose from like yeah I want all of those thermometers and
graph the temperatures they get. And again, here's a different example where you can see you can tell me uh the twice the two or three times uh we were there. Well, actually just the two times that we visited the cabin recently because of the spike in the internal temperature. Um and also energy consumption. And you can see that the little fridge that's there is not that great.
Um it can't really maintain 40. It's like one of those like dorm not not the dorm ones, but like that tall dorm ones, you know, and so it's they're not great, you know, but it's a cabin. Come on. Uh it's it's fine. Uh so it's pretty much empty, so it doesn't really matter. Um the other thing I did set up was a security uh window here. And
so I added a couple things. Notice this. I want to highlight this. The one downside to to doing in particular Bluetooth uh things with Home Assistant is that sometimes uh reception could be an issue. Now, this isn't a giant cabin. there's not a it's not that far away and for the most part it works but every now and then there's enough interruption where it loses the connection
which is kind of annoying. Uh, but see the back door's locked, front door I know is locked, but recently it it dropped off the network and it'll have it'll reconnect at some point. And I so I decided to set like a security dashboard where just all the security related things, all my locks and doors and then camera like a like I'm pretending like I'm a security guard
with all the camera feeds kind of going off at once. All right. Um, one final thing I will show just briefly. I'm not going to get in the weeds of this, but I think it'd be useful for you to see the settings a little bit. Um, if you're So, here's the settings window. There's a lot of settings things you can do. One thing that's nice is it
lets you know when there's an update to perform. So, you do this, you can update Home Assistant and all the software that you use from the UI. You don't have to like now open a terminal and none of that nonsense. You just go to the UI and do it. Um, but devices and services is what I want to point out here. See this discover thing? um this
whenever you add a whenever a new device appears that you have not configured yet, it shows up there. So you go to this page and you're like, "Oh, there's all these devices I can support." And down here you can see the c all the categories of devices that this supports. So I have a Bluetooth device. Um I have a this this is those those temperature probes I
was talking about. Um this is that uh circuit breaker thing I was talking about. And there's all kinds of other Yeah. Um this is the the curtains. Uh and there's all so any device would would sort of show up here. There's all these extra stuff. Oh, the sun is another interesting one. So there's a sun device which is outside. Um it's not inside. Uh and and it
has events daily and so you can monitor that here. Um and there's nothing. This is built in because it what it does is it finds out it home assistant knows you tell it where you are and so it knows sunrise and sunset and that allows you to do things like if you decided to get some smart curtains. Uh you could tell it that you know about 30
minutes before sunrise it'd be like official sunrise like official sunrise and when it's actually starting to be light outside it's a little bit different. um at least at this where I this particular place is. And so like 30 minutesish before sunrise, it'd be kind of cool to open this one curtain that kind of gets you a view of the sunrise. That'd be kind of kind of nice.
So then when you wake up and you have your coffee and you it if I'm there, that's the other thing is like don't do it when I'm not there. But but when I'm there, it'd be kind of nice to just open like look at the sunrise and enjoy the the peace and quiet. Yeah. So you could do all those things because you can monitor the sun. You
can also be like if you wanted to when it's dark and it's nighttime, close everything if you wanted to. Um, all right. So, that's enough of that. Let's go back to the slides. All right. Future plans. I mean, honestly, he says it's mostly set up how I want. Um, I don't really I don't really need and now it's going to be recorded on camera. I don't really
need anything extra. I'm just talking to the camera right now. Um, but uh it would be kind of cool to have some more smart curtains. Uh, they're real they really are sweet. Um, and there are a couple of more curtains that they It's expensive though. But but there are a couple more curtains in the house that that would be kind of nice to automate. It'd be kind
of cool to set that up. So, I kind of would like some more of those. Um, I could improve image detection. I was telling you I rely on the Real Link built-in image detection. There's one camera in particular that got so many false positives for what it thought was a person that and I think it just has to do with the light flowing through shadows uh through
the trees and stuff. It would trigger it all the time. I no I have I have video. It's definitely not Bigfoot um as far as I know. But uh yeah, so I could improve it. Um, there are extra add-on devices you can add that basically add some sort of offboarded AI image detection kinds of stuff that you could use. If I can get one that's local, I
might set that up. Maybe that'd be kind of nice. I might add some more window sensors. It'd be kind of cool to set I have door sensors. It'd be kind of cool to know if like I leave a window open uh when we're not there. That'd be kind of nice. Uh maybe some motion sensors. I do not want cameras inside, but it might be kind of nice
to have like a basic motion sensor because it really shouldn't trigger unless like I don't know mouse gets in or something, but which it shouldn't, but that would be good to know too uh if that happens. Um and finally, so this is on wellwater, and it'd be kind of cool to have a water flow monitor. Uh they sell these. These are also somewhat expensive, but you put
them in line and they will let you know um how much water you're using. And in theory, if I'm not there, I really shouldn't be using any water. And if I start using a lot of water, that's a problem and it should really let me know. Um, all right. Uh, so thank you. Here's all the res all the devices and things. These are direct links if you
would like to buy them uh for your own home assistant thing if you want to set up everything like this. Of course, the talk is there. Uh, thank you so much for coming and now I can open it up to any questions anyone might have. Oh, thank you. [applause] but I was wondering how do you balance the security frame between that trigger now? >> Sure. Yeah, it's
a great question. So, a a comment. So, this I think everyone heard because it's it was amplified, right? So, but ba b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b basically like how do you deal with the fact
that it's a smart lock and you could remotely unlock your house? Um that is that is true. However, um any the the threat model for that is someone who's still physically at your house. Um unlocking my house when over the internet when you're not nearby doesn't really help you as an attacker. Uh, and anyone who is a hardcore hacker who can't pick that schlage lock on the
cabin, um, I just I shake my head at you. Uh, you should be able to pick that lock in like, you know, 30 seconds, you know, 60 seconds. Um, and get in. Um, otherwise it's like a coordinated. So, I'm not that worried about it because I actually think the threshold to break into the cabin is through the smart lock is harder uh, in this case. Uh, because
also this isn't like cloud infrastructure. This means breaking into my home infrastructure and compromising my home network, which is a whole other thing that I do things to make hard. Thank you. Yeah, other questions. Just a quick question. Um, since a lot of home automation stuff out there tends to just assume that you're the only person in the house, how does it how does Home Assistant deal
with having multiple people and giving them delegating to them like, "Hey, let them lock the door, open the curtains or >> Yeah. Yeah. So, the way that Home Assistant handles that is you essentially add users. Um, and you you to allow other people to interact with this, you add a user, they install the app in particular on their phone, but by setting up the account, they can
also just open up a laptop or access like the web URL as well. And once they do that, then they can access all the same things. There's probably fine grain access controls. If I don't do any of that, I'm not I'm not this isn't work. Uh this is this is my cabin. So I'm not going to do like ales on my cabin's network, but um but yeah,
so you set up an account and then they can do whatever. Uh and yeah, other questions. >> There's a Oh, sorry. We have the mic. >> Well, but but the the recording can't the recording. So we have one over here, then we'll get you next. >> Two questions. One is uh one is how do you uh detect I'm not there? So, do you have any automations where
you can just leave the doors unlocked, the curtains left, and you leave the cabin and some of these automatically kick in or trigger? Yeah. So, so what happens? So, how's it Well, first, how does it know I'm not there? So, the way that it knows I'm not there is I have the app installed on my phone. Now, the again, I want to underscore this app does not
talk to some sort of Home Assistant cloud service somewhere or whatever and report my location. It talks only to the app itself or only to my home assistant server itself. that's in my local network. So, it knows where I am the because it's a phone app and I gave it access to my location and it knows when I'm within the cabin zone which is like an area
a circle kind of drawn around that general area and so it knows that because of those connections. Um, I have chosen not I mostly use that feature to avoid noise in my notifications. There's a lot of things when I'm physically there. Yeah, there's going to be a person outside the back door sometimes, you know. So, I I turn all that stuff off when I'm physically. I don't
turn off the animal monitors, though, because it's pretty sweet. I've been inside at like the dinner table and get a notification that there's a fox outside. Now, I didn't see it because it was dark, but it was like like five feet over that way. Um, which is still kind of cool to know that they were like running by. Uh, but yeah, so I mostly use it to
silence notifications. I don't do anything like when Kyle's not there automatically do all this stuff because I probably lock myself out of the house or something, you know? I mean, realistically, but then I can pick it. I I told you how easy it is to pick my locks. So, um >> one quick question. Uh >> in the uh Home Assistant uh dashboard or the UI, is there
any coding that you had to do or is everything plugandplay, click through and set up? Yeah. So, so mo the stuff that I selected here is largely plugandplay that I intentionally selected things because I don't feel like opening up a terminal and doing like a lot of like config file stuff. There was one or two cases where I think there was one case where one particular device
I set up I had to go into um like a config mode and paste in something I found from a guide on the internet or whatever. But that's the extent I think they did that once for the most part. almost everything else is entirely like either you have to set some initial setup on the device like if it's a Bluetooth thing press down the button for a
certain number of seconds so it's in pairing mode or stuff like that but once it's available to be discovered home assistant generally like discovers it and then you say yeah add it to home assistant it's all through the UI yeah so we had a we had a question up here yeah oh I answered it okay oh okay >> hi I'm curious with all of these uh sensors
how many batteries do you go through and how often do you have to go around just replacing batteries and >> It's a great question. So, for the most part, these sorts of things because they know that they're being they are sitting alone in a house for a long time, they're designed to be very lowowered. Um, so for example, the curtains, uh, right? Um, they have a battery
pack that claims about eight months of battery life. And so that means, you know, twice a year, uh, next time you're up there, you go and you maybe charge them. Um, and there's battery notifications. Most of these devices also share battery notifications. So far, I don't think I've I mean, I've only set this stuff up for the last like six monthsish, and I haven't really I haven't
changed any batteries yet. Most of these things are pretty low power. I would imagine I imagine like probably some of them annually I would have to go through and start like looking at. Uh, yeah, there there's one back there. Um, I was just kind of curious being rather old school. Um, when it comes to the automation, like for example, I I caught when you said you had
the deadbolt that you could still put a key in there and turn it. Can you jump up off your couch and yank your curtains open or do you have to reach for your cell phone and press curtains open? I mean, how much of the stuff is now tied solely to the automated system versus manual? >> It's a great question. I intentionally select things that that don't require
it other than like that. Whoa. Let's wake you up. Um, other than uh that smart power outlet, you know, because it's hidden away anyway. Um, other than that, I don't do that. Uh, so the curtains, for example, when you um when you tug on them a little bit, it senses that someone tugged on them and rolled them in a direction. It's like, okay, I'm opening now. And
the same when you close them. When you tug on them the opposite direction, it's like, oh, I'm going to close now. So, I guess you could really, you know, you could probably like hardcore like force it, but you don't typically have to. Um, so it has a not that one has a notion of not requiring like electronics to open or close. You can just like start pulling
on it and then it'll still automatically kind of open or close. >> I have a question. So, what does your VPN infrastructure look like? >> Yeah. Um, super old school. Uh, I climbed the OpenVPN learning curve like forever ago. Uh, so same reason I use Screen instead of T-Max. I was like, "Dude, T-Max is so easy to use." It's like those screen key bindings are so burned
into my brain. I don't even think about it anymore. Just stuff happens. And instead of like OpenVPN, I already have it set up. Uh, and I've had it set up for like 20 years or so, like 15 years at least. So, so it's just an OpenVPN connection between my home. My home is sort of like the home base and then there's a VPN connection. the cabin connects
to that. Um, and I have a system there that just sort of forwards. The home assistant itself doesn't. That's something important to notice. Like you can get Home Assistant where you can get shell stuff on it that has a VPN plugin you can use. So, you can do it directly there. I happen to have another like standalone little laptop up there that does just general purpose stuff
for me. Um, that's always running that I do like a port forwarding thing, but and that does the VPN. Yeah. But it also means like from here I can VPN into my home and then show everyone my cabin. As long as I'm on my home network I can see that's the other thing is that this is not none of this is public to the internet. All of
this stuff is on my home network only. So once you're on my home network yeah you can see some stuff but from the public internet you can't see anything. >> Hi. Um do you have a similar system or setup at at your regular home? And if it's not why? >> Yeah great question. So, do I have a regular system like this at my home? I have a
very minimal system. I do have a system like this in my home, but it's it's actually not nearly as sophisticated because that my use case there actually started because my main home didn't have a doorbell and was like be kind of nice if people didn't have to like manually knock on the door. They at least had the option to press a doorbell and it' be and sure
it's cool now to have a video thing. So, let's set that up. And so that's just sort of that was like the gateway drug that got home assistant in my in my real home, my regular home. Um, since then I really haven't added much other than some temperature sensors in my fridge and stuff like that. I really am not that interested in like lights doing all this
stuff. Um, I just wanted a little bit of monitoring. So I think I did a couple of water leak sensors and stuff like that, but nothing like I don't have like smart locks there or anything like that because I'm there, you know, so I don't have the use case is different. But a great question. Yeah, I think we're Do we have time? Um, >> we have time.
>> Sweet. All right. >> What are you doing for uh battery backup for all your devices? And like if the power goes out, that means everything turns off as far as your home assistant server. So, how do you have that set up so it comes back on and you can get access to everything? >> Yeah. So, for I don't have any power redundancy there. I haven't set
up like a data center or anything yet. Um, yeah. >> yet. Uh I have I have plans. Uh but they Yeah. So that's something I haven't done yet. Uh the main what I would call a server. Like I said, I have a I have one machine that's always running that's a laptop, like an old laptop. By the way, old laptops are the best home servers you could
ever get because they have like a built-in 8 hour UPS. Um if you've ever priced an 8 hour UPS, uh they're incredibly heavy and expensive. Uh but a laptop has one builtin. And so I just use the laptops for all my home servers now. Uh and it's always running and it has a built-in UPS. So if there's a blip, it probably didn't even go down. Um if
it uh but otherwise like when I've had the power go out and when everything comes back up because I have PoE cameras, they just fire right back up when they get power. Home Assistant fires right back up and everything resumes. So I've had power outages up there for sure. Uh because I'm in California and power it's just a reality of life in California. PG >> I'm a
PG& customer. Yeah. So like power outages all the time. So but anyway and things just come back up. Power's restored and things come back up. Um it hasn't been a big deal. But it's true. Yeah. I don't have coverage when I'm not there. But because I've selected those things if I went there during a power outage, turn the key, open the door, put some wood in the
in the wood burning stove and and we're good. Any other question? Also, I'm going to be in the hallway, too. You know, we can always chat chat there, too. Um, but any sort of final question so I can clear the room for the next speaker. >> My question is like, what's the storage solution on uh your cameras? >> Sorry, I didn't I didn't catch that. >> How
much storage is your cameras using? >> Oh, yeah. Camera storage. So, each of these cameras do support micro SD cards, so you can put those in. I don't use it. I don't use that, though. Home Assistant itself um also supports uh you know, Whoa, I did it again. I guess it doesn't matter. We're going to unplug this, but um Home Assistant supports uh you know, storing local
storage. So, you could put like just an extra big SD card. It depends on how much you want to retain. In my case, I happen to have So, one of the other things I use my cabin for is off-site backup. Um not over the internet, but like the old school like carry a hard drive with you, right? Because if my house burns down, it'd be cool to
have a copy of my stuff somewhere. So, like when I go to the cabin, one of my chores is bring a bring the hard drive from home up up there with me and plug it in and then take the hard drive that's there and take it back home so it can get synced back up. Um, so I have like a big hard drive there that I'm already
using just to have like an off-site uh backup. And so I I Home Assistant, it's very easy to say to connect to like you could either plug it directly into Home Assistant if you wanted to do it that way or like if you had like NFS or a server, SMB server or something, it can mount like an a network drive too. Um if you're going to do
a lot of video recording, I would recommend that. But otherwise, on the local SD card, you can at least get a probably a depending on how many events you have, uh you could probably get like at least, you know, weeks or months worth depending on how big your SD card is for Home Assistant. Uh I have a question. Yeah. Have you ever considered getting into like embedded
systems software such as like uh motors and stuff to automate uh certain tasks even? >> Yeah. So I have not yet uh I have I haven't I mean not for this project. Um, two talks ago, two scales ago, I gave a talk about my um automated my um uh knitting machine clock that I made uh that knits a scarf uh every year. Um, and that's kind of
like that although I cheated and used a Raspberry Pi uh but um but there's stepper motors and stuff and so uh and and I use Python and but for the I'm not there yet with this. I think a lot of people that want to do that with home assistant, they do it because you can get these like ESP32 chips really cheap. Um, and they're very configurable. There's
all kinds of guides online how you get this chip and do a couple of other minor electrical engineering kind of things and you have a nice cheap sensor or a cheap some of these things that you buy off of Amazon for like 10 bucks you can make for like three bucks or something. If you make it yourself, >> you can get like uh five for 10 on
off of Amazon right now. >> Yeah. So, so it's a if you want to save money doing this or and you're willing to invest some time into learning the skills for sure, but I'm my use case wasn't for that because I'm like I don't want to I intentionally did not want to tinker with like soldering uh for this particular project. That's for my other ones. Yeah. >>
Uh the time is technically up, but there is a 15-minute break. So, if you guys want to continue the Q&A for a bit, >> I'll just [clears throat] do the hallway con thing and so I'll be hanging out. People can Thank you. [applause] >> No, no, no. I just switched it on. >> Check. >> I'll just clip it. >> Okay. >> Okay. You have the cards to
show that. I'll be letting you know when you get a 10 minute one minute and five minute. >> Hopefully we don't need this. So >> um quite literally >> we don't know it >> because there's like a 15inut break. Hello everyone. I'm Pri. You can just call me Pri. So this is Oops. I self-hosted everything. Um yeah, we're going to be looking at many of the things.
So I just have a lot to talk about. So we'll get started. So okay, what are we going to discuss today? Okay, what does it actually mean? How I started out my old laptop. We'll talk about my new PC. We'll be looking at my portfolio, how that actually started with that. We'll see the growth. We'll see how networking and how Dumbai was. The next thing is we're
going to see three different things that I actually did with it. uh as a sample. So um yeah, Instagram to image, that's one thing. Shut to storage, home to home assistant, and then we're going to see how wonderful my backups are. And we'll see the future. Okay, do I really need a second note or not? right. I'm going to make my public service announcement one more time
before I get started, which is I'll have pictures of the stuff I'm demoing, but if you want to see stuff actually happening, some of these things are pretty small, so if you want to sit up front so you can see, great. Awesome. You're probably not going to see from the front row over there, but um I only bite a little bit. We've already established this. I I
will not bite unless you ask. Um but yeah, if you want to see things actually happening, you're you're probably going to want to sit kind of in this area, but I'll still have pictures. >> All right. Oh, >> no. >> See what I can do. I haven't started yet. I don't know if Well, let's get started. So, I am Ronald McCllum. Uh, I am a developer advocate
at Graphfana Labs and this is Prometheus for Pets. And I want to say first of all, I really appreciate the audience that came into this dark dungeon to hear this talk today because I looked at all the the talks that are going on and it's like improve database performance and scalability or use AI to build the next generation of applications and and everybody in here was like,
nah, I want to go hear about how to learn if my doggy goes pee pee. So, thank you for being here. Really appreciate it. Um, yeah, let's get get into it. I hope this will be fun for everybody. Uh, I know what everybody is thinking when you're looking at this slide. You got a question. Is this your dog? And the answer is no. Absolutely not. Uh, first
thing, this is a cartoon. It's not a real dog. Think before you ask a question. Um, but also no. I would never actually turn my dog into a Borg. Uh, this is my dog. This is Rugles. Uh, the closest I have come to turning him into a Borg is to put my glasses on him. And I got such a withering look of disapproval that I never tried
replacing his paws with lasers. So the world has lost a little bit, but Rugles is happy. He usually spends most of his time napping on the couch, not actually a Okay, so what is this talk actually about? I always want to have kind of a problem statement, something that we're trying to figure out as we go through a talk. And so what it could be is really
what it said on the uh the the conference schedule, right? It's about keeping tabs on your pet, seeing water consumption, outdoor times, um monitoring your furry little friend. But it's not actually about that. It's really about having a fun project to experiment with IoT devices and data analytics uh and get to do all these things in a cool way. Like whenever I'm trying to learn something, I
really don't engage with it unless I have a fun project to do. So, I'm hoping that this will be a fun project to inspire some people in here to do things they haven't tried yet. And I I do want to start with a disclaimer. I hope this is obvious, but I'm not a veterinarian. None of this is medical advice. I am begging you, please do not automate
your pet out of your life. We're going to look at things uh that can help you track what your pet is doing, but don't rely on devices, particularly homemade devices, as your only source of truth about your pet. Too many things could go wrong. You could lose power. You could lose uh wireless connectivity. Your pet wants to love you. It wants to be around you. Don't automate
it out of your life. Please don't blame me if you do, and your pet hates you. Okay? All right. That's all the the boring disclaimer stuff out of the way. I'm going to get right into what we're doing. And before I talk about what's on the slide, I I want to say one thing is that this is going to involve both hardware and software. And the fun
thing about giving a talk like this is that in this room, probably everybody in here knows more about one side of that or the other than I do. Uh but it's very frequent that people don't do both. A lot of times people get tracked onto one and they kind of ignore the other side of things. And I did the same thing. Uh, I got a computer science
degree years ago. Uh, you know, I I knew how to push ones and zeros around. I could write software. Uh, but hardware was always really scary to me. There were all these like little bits and bobs and kind of black things with strings sticking out and there's electricity in there and it can hurt you. So, like I never really experimented with hardware for like decades. And then
for some reason that I still can't explain, I decided to go work for an internet of things startup. And the first thing they did when I got into the office was they handed me a box of parts and said, "Hey, go build something cool with this." So I had to learn. And I found out it's not actually as scary to cross over to the other side as
as I thought it was. Um, and in fact, now years later, I can successfully pick up a soldering iron nine times out of 10 without burning myself. So if I can do it, I think everybody in here can. So, all of that is kind of background and preface to say there's going to probably be terms that I'm going through on this slide that you're not familiar with.
That's okay. I just want to throw the words out there so you've heard them. When we get into actually using these things, I'll explain what they are. So, we're going to use hardware and software. On the hardware side, we're going to use some IoT dev boards that are based on the ESP32 microcontroller. I already throwing out the crazy words. Uh, we're going to use some simple off-the-shelf
sensors that are cheap and easy to get. We're going to use again some cheap and easy output devices like LEDs and speakers. And we're going to use a computer. I'm doing all of this on my laptop. Um, but you could do this on a Raspberry Pi. It can be an old server that you've got sitting in your basement. It really doesn't matter. All of these things are
are very lightweight and will run just about anywhere. And on the software side, uh, all of this is open source. So everything I'm talking about is open and freely available as free software. Uh we're going to use Prometheus to uh collect our metrics and and um be able to query those metrics. We're going to use a message queuing system called MQTT. Specifically, we're going to use the
Mosquito implementation of MQTT and we're going to use Graphana to visualize all of this. And a couple of programming languages will use Python and C++ as we get into working with the hardware. So, I'm going to start with the hardware side, mostly because that was the newer one to me, so I get more excited about it. Um, I I talked earlier, we're going to use ESP32 microcontrollers.
What the heck is that? These are microcontroller dev boards. So, these are development boards that have a microcontroller on them and then just kind of input and output broken out to make it easy to use. So, what's a microcontroller? It's like the microprocessor in your laptop or your phone, but it's smaller and cheaper. And and when I say cheap, the quarter up there is not actually because
they only cost a quarter. The quarter is just to give you some scale as to how big these things are, but they are fairly cheap. These are a couple of dollars, usually one, two, $3 when you're buying them one at a time. They actually get cheaper the more you buy. So, they're fun to experiment with because even if you do manage to screw something up completely and
break the board, eh, you can probably find two more dollars and buy another one. Uh, I think the most expensive board that we're going to use in this was about $18 or $20. And that's only because it has a bunch of other stuff built into it already. So, these boards have a microcontroller. And I said before that the microcontrollers are cheap and small or less powerful. That
doesn't mean they're not powerful. So, like I I went to school for computer science 25 years ago. I had a a desktop computer with a single CPU. I think it had two gig of RAM maybe uh and like a 500 gig hard drive. These controllers that you're paying two or three bucks for have multiple processors running at usually hundreds of megahertz uh each, but they also have
uh built-in storage, like gigabytes of storage. They have hundreds of kilobytes of RAM, which doesn't sound like a lot today, but they're not going to run an operating system. They're just doing small things. That's plenty. And they have things like Wi-Fi and Bluetooth and USB builtin. Like for $3, you get something that actually is better in many ways than the computer I took to school to get
a computer science degree with. So these things are super cool and super cheap, and they're small enough that you can put them in projects like this. And if you think about how you structure your projects a little bit, we're not going to get into this in this talk, but you can actually run these things for weeks or months off of a battery. So you can do a
ton with these things very cheaply. All right, let's talk about the software side. Uh, we've got a few things. We've got Prometheus, which is a uh time series database and metric collector. So, what's a time series database? Well, I think everybody probably knows what a database is. It's a place you're you're going to keep data. And time series data is just any data that has a date
and time associated with it. So, think about the weather report. You look at the weather report in the morning. It says it's going to be cool in the morning and it gets warm until the afternoon and it gets cool in the evening. That's time series data. We're looking at data over time and it makes a trend. Or the stock market. Stock price goes up, stock price goes
down. They've all got a date and a time associated with them. And you make these pretty little jagged lines. That's time series data. So time series data comes up over and over anywhere you look. Like even if you think about your own life, you were a a baby and you were really small and then over time you got bigger and then at a certain point you stopped
growing. That's still time series data. You could put that on a graph and put your height on that graph and have time series data. Prometheus specifically is probably the most popular time series database in the world. I'm throwing that out with no evidence, but it's the one I see everywhere. It has kind of eaten all time series databases in the world. Um, this is the thing that
if you do any kind of cloud engineering, you're an S sur, you use Prometheus every single day of your life. It's everywhere there. Every piece of software basically has some kind of connection to Prometheus at this point. So, it makes it a good choice for this kind of project. It's easy to get. It's widely accessible and and there's a ton of documentation about it out there. All
right. We're also going to use a package called or a protocol called MQTT. And I have to put the uh the expansion for that on the slide because I can never remember. It's message queuing telemetry transport. Uh and it's just a way of passing messages between services or devices. We'll talk more about that in a little bit. And finally, Graphfana is the kind of Swiss Army chainsaw
for visualization. It can show data no matter what type of data you have, wherever that data exists, and give you a lot of power in how you look at that data, how you work with it, how you produce alerts on it, things like that. We'll look more at Graphana as we go too. All right. And the last thing here is I just want to say like nothing
up my sleeve. I'm not even wearing sleeves. I'm running all of this on my laptop. So when I say you can do this with, you know, computers that you have, even a Raspberry Pi, you can do this yourself. By the way, all of this is up on my GitHub. I'll have a link to my GitHub at the end. So, all of the project files, the Docker file,
the Docker Compose file. So, anybody who wants this, you don't don't feel like you need to take a picture of this. Um, you'll have it available. So, in fact, I'm just going to go ahead and start my Docker Compose stack and let that run in the background while we go. Nothing up my sleeves. All right, let's talk a little bit about Prometheus before we get into the
meat of things. So, I I've given the kind of background on Prometheus. The title of the talk is Prometheus for pets. I really have to to go into it. So, Prometheus gives us four things that are going to be more or less useful for this project. One of which is it is a database. Prometheus is going to store all the data that we collect about our pet.
So, super useful there. It also has a query engine. So, it stores the data. It lets us get the data back out. And Prometheus has a ton of kind of deep analytical function that you can use to break that data down to do statistical analyses to do all kinds of cool data science stuff to your data. And we're not going to use any of it. We're just
really going to say, "Hey, give me the data that I collected over the last 24 hours or 15 minutes or whatever. So we it's there. We're just not going to go deep into it." Prometheus also has a UI. It's a simple web UI. It's good for running quick queries, seeing what your data looks like. To be perfectly honest, 99 times out of 100, if you're using Prometheus
and you want to look at your data, you're probably going to use Graphana, but we'll take a look at the UI just so you can see what it does. And finally, Prometheus has a wide array of of collectors for getting data into Prometheus. Mostly, this is useful for things like um cloud environments or you want to collect data from servers that you're running. So, we're not going
to really use a whole lot of this, but I did want to point out one big difference between how Prometheus collects data and many other time series databases or databases in general collect data, which is by default, Prometheus wants to reach out and grab your data. It wants to ask for data and pull it back to itself. U there's a whole bunch of reasons why this is
a good thing. There's a whole bunch of reasons why it's a bad thing. Holy wars have been fought about whether push or pull is the right answer. I'm not going to take a stance right now. Um, but I did just kind of want to point out uh when we talk about scraping, you hear somebody talk about Prometheus scraping data, it just means Prometheus is saying, "Hey, give
me your data. I want to collect it every minute, 30 seconds, 5 seconds, whatever you configure." That's what Prometheus kind of does out of the box. All right. Oh, sorry. No, one more last thing. I thought we were out of the background. We got one more bit of background. I said Prometheus is wildly popular. it's kind of eaten every other uh time series database. And there are
a lot of reasons for that, but one big one is this. This is what the Prometheus data format looks like. When when Prometheus scrapes data from from anywhere that has data, it's looking at this and this is just a text file, right? Everything in Prometheus is a text file. Every single line is a metric. So a metric has a name. It has some optional labels which are
key value pairs that just describe the data. And it has a value. It has a 64bit uh floatingoint value. That's it. Every Prometheus metric looks like this. Uh I talk about the labels. So you know you have a name of a metric like CPU usage. Maybe you've got multiple CPUs. So the label says this is CPU 0, this is CPU 1, this is CPU 2. So you
can use the same metric name but still track multiple different values. But this is part of why it's so popular. It's really, really, really easy to build a system that emits metrics in this format. I've literally done it in a bash script. So you can create Prometheus metrics super easily in your own applications. All right, so now we finally got through the background stuff. Let's get into
building a project. So the first thing I want to do is build a sensor for a pet door. Just how know how often the dog is going in and out of or a cat is going in and out of the pet flap. So we're going to start with a microcontroller. And in this case, I'm using I know nobody can see this. This is a uh Adafruit QTPI
microcontroller. So I'm using microcontrollers from different companies, different brands just to show that these things all work the same way. Um and this is called a QT PI because it runs Python. Yeah, even though this thing is only a couple of bucks, it's powerful enough to run a Python interpreter and run Python code for you. So this makes it really, really easy to quickly develop applications for
this kind of device. You can you literally plug it into your computer. It shows up as a USB stick. You drop your Python code on it and it just starts running. So super cool, super fast for development. And then we're going to connect a sensor to this. And the sensor we're going to use is hopefully still on the table, an accelerometer. It's about the same size as
the dev board. It's about the same size as the the end of my thumb. Uh and what an accelerometer measures is acceleration. That is to say how fast the change in velocity is. How fast you are changing speed. Now you probably start to think at this point that sounds like there's going to be a lot of math involved. He's going to keep track of how fast the
door is swinging and then subtract it from the last time it swung and see did it move fast and like yeah I could do that stuff. Um but I'm actually using an accelerometer because I'm cheating. This is really really easy way to tell the orientation that something is sitting at. uh and the reason is because gravity is acceleration right like I stand here right now I'm experiencing
9.8 m/s per second in this direction of acceleration so what I can do is I can take this accelerometer which measure measures acceleration in all three axes and I can say if this thing's just hanging there this axis is not experiencing acceleration it's not really being affected by gravity so its acceleration is zero if I flip it this way its acceleration is 9.8 8 m/s squared. It's
being pulled down this way. And if I flip it the other way, it's positive 9.8 m/s squared. So, I can just tell just by reading one value whether this thing is flipped this direction, this direction, or hanging up and down. So, accelerometers are super useful anytime you find yourself wanting to know like where an object is in space. So, what I did is I got a pet
door. I've got the uh uh microprocessor microcontroller um velcroed to the top. Uh one thing I didn't mention is every project in this I I specifically chose boards and sensors that you do not need to solder. So all of this can be done just by connecting wires together. And I've got parts lists on GitHub as well. So I'm just going to connect the wire up to the
microcontroller. And again, I just velcroed the thing onto the pet door. So it's just kind of hanging there ready to sense. So there's the hardware. Um the final bit is the software. We're going to use Prometheus to grab data from this pet door and find out whether it's open or closed. So Prometheus in this case is going to scrape data. I've got a Prometheus environment running on
my laptop. It's going to reach out to this thing and ask it every I think 5 seconds, are you open or closed? Actually, it's going to ask how many times have you opened or closed? And this is what the code looks like. The code fits in two slides. We don't have to go through it line by line. Again, it's all on GitHub. But I just want you
to see how how little code is necessary to build something like this. So, because this is Python, it's really easy um to set up things like a web server. So, Python has a built-in web server. So, the first three lines up there are just create a web server and connect it to Wi-Fi. And then after that, I'm going to set up the data that I'm going to
send to Prometheus. So, every time Prometheus asks for data, it's going to look on this slashmetrics path for data. Uh, I'm going to send it back a count of all the times that this door has opened or opened entry or exit. And I harped earlier about how simple that Prometheus data format is because of this right here. Like this is Python. I could have gone and downloaded
a Prometheus library. They exist. I could put that on there. But all I'm counting is just two little counters. And the format is so simple. So all I'm doing is just saying like spit out that Prometheus format as text whenever whenever Prometheus asks for the data. So this whole chunk down here is just literally the lines of text that look like those lines of text that I
I showed you when I was talking about how Prometheus formatting looks. And then the rest of the code is just going to be measuring the values. So while true. So we run forever. We want this thing to just keep running infinitely do its job. We're going to grab the acceleration from the accelerometer. We get X, Y, and Z axes, unless you're Canadian, in which case you get
X, Y, and zed. And if Z is greater than four, we say that the we add one to the entry. Y greater than four. Um, no real reason. It was kind of a good value. Remember, gravity is 9.8 m/s squared, so about 10. And I said, yeah, I could, you know, somewhere between four and five is probably about this angle. And I'm going to assume the door
is open. Like I don't want to actually measure it if the door just twitches a little bit, but I don't want to expect the the dog to have to raise the door all the way up. So my purely scientific method of picking a number out of thin air seems to work. Um likewise, if we get a a negative four value, then the dog's gone through the door
the other direction, so we'll add one to the exits. Uh and otherwise, we just assume the door's closed. And so we just do this over and over and over. And that server.phpole just says if Prometheus has asked for the data, go ahead and send it. So just respond to Prometheus if it's asked and then we sleep for a quarter of a second. Um there's no need to
run this in a super tight loop. Uh it it uses up a lot more power on the battery that I'm going to plug into this. Uh and it also gives us kind of a cheap debounce. Like if the if the door is right on the margin and it's kind of bouncing there a little bit. You know, if we give it a quarter of a second, it's probably
moved. So we don't get multiple counts of an entry or an All right. So the moment of truth. Let's see if the demo works. I'm always nervous right up to this point because I'm not 100% sure uh that all of my wireless networking is working. So, I've got a little cell phone battery here or cell phone battery charger. I'm just going to turn that on. You may
be able to see a little blinking light on the top of the microcontroller. Uh as it boots up and connects to Wi-Fi. So, this is Prometheus. Uh I told you before Prometheus has a very simple UI. This is the Prometheus UI. So I've configured Prometheus to scrape I think every 5 seconds and ask for the values from this door. So one thing we can do is look
and see uh Prometheus always gives you a default uh a default uh metric called up. So is the thing responding at all? And yeah, awesome. Here's our door flap and we've got a value of one, meaning it's up and and responding. So, let's just pretend I'm a dog and I'm going to go out the door and I'll come back in the door. And I'll go back out
again. And maybe I come in the front door because I just wanted to follow my human. And I'll go out. And I actually do that a couple of times because it's fun to annoy a human. Uh, and also because it'll give us a few different values to look at. So, we should we've we've generated some data just by looking at the accelerometer. Hopefully I've talked long enough
that Prometheus has had the five seconds to look at that. And now if we look, I called the metric door use counter total. Yeah. Awesome. Let's zoom in on this so everybody can see. Uh we've got four entries and one exit, which if anybody was keeping count, I think that's how many times I I did that. So this is great. This is all we had to do
to start getting data about what the dog is doing. It's not super useful data yet, but it at least it is data. And we could do things like look at this in Prometheus and let's let's look at instead of the last like six hours, which I think it defaults to, uh, let's just look at the last couple of minutes. So, yeah, there's kind of a graph of
what we got. Now, remember, we're looking at a counter. I'm not actually sending an event every time the door opens or closes because I'm not sending events from this. I'm just letting it keep count of entries and exits. So that's why you see these lines always go up. We can do some cool things in Prometheus to uh adjust this so that we actually do get events instead
of a constantly climbing counter. But that gets into the analytics in Prometheus. We're not going to get into that too much right now. I'm just kind of pointing out you see this climbing line. It's because there's a counter and it's always climbing. If I do it a couple of more times uh and then wait 5 seconds. Yeah, we get an even steeper line here. Okay. So that's
our that's our door flap. We're keeping track of the dog going in and out. It's a good start. What else can we do? We can see how much water the dog is drinking. So, to do this, I'm going to use a different brand of microcontroller. This is one called the It's a a company called M5, and this is the M5 Stick C++. Uh, it's got a nice
little LCD display on the front of it. So, anybody who's sitting up front is going to get to see that. Anybody else has to take my word for it that that thing is updating. Now, the previous one, the previous microcontroller, we were running Python, which again, really easy to prototype things in. In this case, we're going to program this in C++ using a framework called Arduino. And
if you've ever tinkered with IoT devices, you'll have heard of Arduino. They've been around for decades at this point, uh, and have established a really kind of large following. Now, why would I want to do C++ when I just said I can run Python on one of these devices? Like, I could run Python on this device if I wanted, but why would I ever want to switch
to C C++? There's a couple of reasons. One, uh the Python interpreter actually does have a lot of overhead. So, these are still small devices. Even though they're very powerful compared to my computer 25 years ago, they're still limited. And the Python interpreter does take up a lot of memory and a certain number of processor cycles on the device. So for simple things like tracking a door
opening and closing, that's not a big impact. But if I start to do really major work on these devices, I want every cycle and every bit of RAM that I can get. So that Python interpreter just might have too much overhead for me. It's probably not in this case, but it can in many cases. The other reason that I might want to use Arduino though is because
it has been around for like 20 years or possibly more at this point. They have a vast amount of libraries and documentation that exists that you can just pick up and use. So if you can think of it, there's probably an Arduino library for it already. You want to do weird trigonometric math on a device that doesn't have a floatingoint unit, there's an Arduino library for it.
you have some weird sensor that you just learned about yesterday. If you Google Uh anything you can think of, output devices, sensors, everything, there's an Arduino library for it already. So, it just means you have less code to write because somebody else has already written it. You can just kind of snap it together like Legos. Speaking of which, uh the the uh sensor we are going to
use is a scale. It's just a digital scale also from M5. Uh, I think it can measure up to 50 or 5 kilograms or something, but it does it at less than one gram uh resolution. Really, really cool. And again, like 10 bucks. Plugs directly into this board. Um, and we're going to use Prometheus again, but this time just to prove that Prometheus can do it, we're
going to send data from the device to Prometheus. So, instead of Prometheus scraping the data from the device, the device will send data to Prometheus. It's going to work about the same. And this time, we're going to add Graphfana into it. uh to give some more interesting visualizations. And now you guys know why I have the Legos from my 1980s childhood that were in my closet sitting
out here. It's because that M5 stack, one of the cool things about a lot of the M5 products is that they are Lego compatible. So if you're prototyping physical devices, you can actually like the scale that I'm going to use is under this box that I built out of Lego. Uh, I I'll show people after the fact if you want. It's a little fiddly to clip back
on, and I don't want this to spill anything. So, it's it's under there, but this is what it looks like attached to the base of my Legos. Uh, the Lego spaceman is keeping an eye on it to make sure that nothing falls. All right, same as before. Let's look a quick look at the code, two screens, and then we'll get into it. So, this time, because I'm
using Arduino, I did decide, let's use some libraries. I grabbed a Prometheus library and one of the things that provides me is this time series definition. It's saying I'm going to create a series of metrics and I'm going to feed them to Prometheus. This is all encapsulated in a class and I'm just declaring a variable for to hold that time series. And then Arduino gives you two
magic functions that run every time you run on ardu an Arduino framework on hardware. The first of those is called setup and that thing runs one time when the board is booted. So this is how you set everything up for your program to run. And so I just kind of do a bunch of boilerplate. C++ is a little more verbose than Python for these things. So I
left a few things out, but you get the idea. Uh there's a nice function that M5 provides for their board called begin that just sets up all the hardware. I set up the LCD and fill it with black. I set up the scale and tell it, hey, use all your default uh settings. I set up Wi-Fi. So I've kind of predefined an SSID and password, and it's
going to connect to that. I set up the Prometheus client. So I give it a URL where it's going to send data. And then finally at the very end I say that time series that I defined earlier. This is what you're going to send to Prometheus every time it every time you send data. Now I said there were two magic functions. One is setup that runs when
the board boots. The other is called loop which just runs forever. Once the thing is up and running, you just want this board to run until you tell it to stop till you pull the plug. So every time this thing loops, what we're going to do is get the current time. We we want to associate a time stamp with our metric. And then we're going to get
the weight from the scale. So just grab those two things and hold on to them. And then there's a little bit of things where I'm I'm using the LCD on this. It's it's got a nice display. I want to use it. So I'm going to display the weight of the water in grams. And I am going to do a couple of things that say, hey, if it's
less than about a third full, I'm going to say empty on the display. Otherwise, good or full. So really just an excuse to use After that, we're just going to grab that weight and time and push them into the Prometheus variable that we defined earlier and send it up to Prometheus. Now, there's kind of a cool thing that happens because I'm using this Prometheus library uh is
that it will track whether those metrics were successfully received. So if Wi-Fi goes out for 10 or 15 seconds and I'm looking at this every 5 seconds, like my Python code is just going to drop metrics on the floor. doesn't keep track of whether it was successful. Um, this is a little more advanced. So, it's going to say, "Hey, when the the network comes back up, send
all the data that you had cached. So, I'm not going to lose things if I have a network blip or something." So, so there are times that using a Prometheus library instead of rolling your own can be helpful. All right. And then the very last thing at the bottom, we're going to just wait 5 seconds. So, we're going to send a value every 5 seconds and otherwise
just let the board sleep. All right. So, let's do the demo. I had I was talking about this with a colleague and he pointed out to me that this looks an awful lot like science and that if I'm going to do science I need to look like a scientist. So fortunately my partner used to work in a biology lab many years ago uh sequencing DNA and one
of the animals that she was sequencing was the dog. The first full DNA sequence of a dog. Um so I borrowed one of her lab coats. It's a a valid real lab coat. It even has actual science stains on them. I have no idea what those are, but I'm going to assume that they are known to the state of California to cause cancer. Um, but yeah, how
cool is it that she was actually doing the the first sequence of a dog, and now I'm seeing if my dog goes pee. All right, so I'm going to put a bowl in here on the scale. And now, because I have these science connections and I spend a lot of time on the dark web, I was able to procure the mystical substance that shows up in paper
towel commercials. So, you know, they're always sitting there at a table with a a a glass of this stuff for some reason. Somebody comes along and knocks it off over and our hero sweeps in with a paper towel. Nobody knew till I found out what this stuff is. It's dog Gatorade. So, we're going to give it to a dog. nobody can see it back there, but the
display is just showing that it is connecting to Wi-Fi. Uh once it connects, it should start showing a value on there. Does it show a weight yet? >> 1.1 grams. Yeah, it does tear to zero when it starts, which is why I put the bowl in there, but it's there's a little bit of uh of >> it's Yeah, not not a lot happen. It'll kind of balance
out at probably 10 or 15 grams. Okay, so let's do this. I have to zoom this out a bit so I can see what I'm doing. Okay, thank you, Chrome. So, we now should have Yep, we've got a weight grams metric. Um, which should start returning data in a little bit. Uh, while we wait for that, let's go to Graphana. Please don't try to guess my password.
It is definitely not admin. It is definitely admin. Um, so this is Graphfana running on my laptop. And I'm going to do one thing, which is change this to light mode because I know it's very hard to see dark mode when uh I'm projecting on a screen. Okay, so I've got Graphana. Graphana is already configured to talk to Prometheus. Um there's just a data source defined in
here. If anybody wants to see it, it just looks like this. So it's pointing to 127.0 or 17.0.1, which is my Docker container. Nothing up my sleeve. uh and collecting data. So what we can do is create a dashboard. So graphana is really geared around just visualizing data wherever that data exists. In this case, this data is in Prometheus. So I'm going to say point to And
because I looked at my code, I know that the uh the metric that we are looking at is called weight in grams. So really quickly, I just plugged that in. I've now got a nice dashboard with a single graph that is tracking the weight measurement. We're going to tell this to reset uh refresh every 5 seconds. And uh let's look at this. Instead of the last six
hours, let's look at the last five minutes. So now we can kind of see, yeah, this is where it turned on. It's kind of balancing out. Um we can now use this. So we can say add some of this dog Gatorade. I'm going to really hope this doesn't doesn't fall as I pour it. Ah, beautiful. And now if we wait five seconds or possibly 10 depending on
how badly I judge things. Oh, yeah. Perfect. We can see that weight go up. Um, we can do the same thing the other direction. If a dog comes along and drinks some of this water, right? Uh, everybody know what this is? It's right. It's a dog. Good dog. Good dog. So, it comes along. Oh, I'm so thirsty. I'm going to drink some of this water. Uh, and
because it's dog, it immediately goes outside and pees. and then we should see that reflect on the dashboard. I'm going to put this on my paper towels uh in about 5 seconds as soon as this refreshes. So, again, cool stuff. Yeah, there we go. Dog drank a little bit of the water. the the graph trends down. So, cool stuff. We've got some interesting things going on here.
But there's way more that we can do with this. There's way more interesting things we can do with this data, which is make it actionable. Now, I'm in the paper towel commercial. There's irony for you. Um, we're going to add one more component to this, and this is MQTT. I mentioned this earlier. I kind of glossed over it. Now, we're going to get into what it does.
So this is a message transport protocol which basically means it it passes messages from the people or services or or devices that send messages to the ones that want to receive it. So, what this looks like is you've got an MQTT service, this very lightweight service, uh, that just brokers messages and then everyone who wants to send a message through to anyone else sends it to this
MQTT server and MQTT calls them a publisher. So, I publish a message, I send it to the MQTT server. I'm kind of done. What happens then is we have subscribers. Subscribers tell MQTT, I want to receive messages. And it's totally valid. You could have the same thing be a publisher and a subscriber. You might have one device be both things at different times. That's okay. Now, why
would I do this? Why put this extra layer in here? Why wouldn't I just say, hey, I've got a a sensor that has data and I've got somewhere over here that I want to receive the data. Just have the sensor send the data directly. It's easy. It's simple. Why would I add this extra step? The biggest reason is that adding this broker in the middle gives me
the ability to make changes without updating any of my devices in the field. So I tell my devices one time when I create them, hey, you're going to send your data to this MQTT server. Then later on when I have devices that want to receive that data, they also know about the MQTT server. If I had them just go directly to each other, had the the device
that's sending the data and the device that's receiving the data talk to each other, first of all, there's a lot I have to do. I have to like make sure that device is listening. Hey, are you up? Yeah, I'm up. Okay, here's the data. Did you receive it? Yeah, I received it. Like, I've got to write a lot of kind of boring boilerplate code to manage those
messages. But more importantly, if I later want to say, hey, I want to add another device that's listening for this data. Now I have to go back to every device that's sending the data and say, "Okay, here's another device to add to your list. And every time I add a new device that's sending data, I have to update every single one of those devices to talk to
all the receivers." It becomes a really nasty problem to manage devices in the field. So MQTT is the central place to manage all of this. All it does is sit and listen for messages and pass them to anyone who wants to receive them. And now I never have to update my devices once I've created Now, we're going to use MQTT to listen for alert data that's going
to come from Graphana. So, we'll see what the the architecture of that looks like in a minute. Um, but every MQTT message has what is called a topic. And a topic is just like the uh subject line of an email is what this message is about. And in MQTT, you can put slashes in there to kind of organize things in folders. I'm going to be really boring
and say this is dog/alerts. It's it's everything to do with my dog and this specific part of it is an alert. This will hopefully become clear in a minute as we start sending messages around. I just want everybody to at least have heard of what MQTT is when I put it up on this architecture slide. So, we're going to build an alerting system with all the components
we've already got plus MQTT. So, in this case, we are going to use yet another microcontroller which is this guy. It's another one from M5. This is called the M5 atom. uh matrix. And the reason it's called that is you can see it's got a matrix of LEDs on it. So we can do fun things with the LEDs, which we will this is also going to run
Arduino. Same thing as last time, C++. And in this case, instead of a sensor, I've got an output device. Uh this is from M5, and they call it the M5 audio player. Uh when I ordered this, I thought it would just be like little beeps and and boops. It turns out that this audio player is actually a full MP3 player. So, you can put an S uh
SD card in it and send it commands like next track, previous track, uh play, pause, all that stuff for just a couple of bucks, and you can control it yourself. You can build your own MP3 player. It's super cool. Okay, then we'll have MQTT as this message broker. And so, what will happen is Graphfana is going to look at the data that we have from these other
sensors and when it decides that there's something to alert on, it's going to send it to MQTT. It's going to be the publisher to MQTT and then this device is going to be the receiver of that. So the subscriber to that data and it will do something with the data. What will it do? Uh let's look at that. So again two pages of code and then we'll
get to the demo. The first thing I want to talk about is a function here I've called MQTT received. Anytime I get an MQTT message, what do I do? Well, the first thing that I do is I look at the topic of that message, the subject line. Remember, everyone has a subject line. Every message has a topic. So, we're going to say if that topic is the
topic we care about, we're going to do something. Otherwise, just ignore it. Don't care. I don't care what this message is. It's not for me. So, that's how we're going to determine if this message matters. And then, Graphfana is going to send this big JSON chunk of data as part of an alert. And this is normally great. This is fantastic because it gives you things like here's
a dashboard that you can go look at the data that generated this alert and here's the data leading up to it and here's some relevant other information and it gives you all of this context um that is not actually useful in in this because this is a very small device and we're not going to try to show a full dashboard on a 5x5 LED matrix. So I
could you know it's Arduino there are libraries I could install a JSON parser but again I'm super lazy. Uh I went back to the same approach I used in the first first uh build which is I'm just going to look at that JSON data not even try to parse it because I know the only thing I care about is there's a status field and if that status
field says firing then there's an alert otherwise there's not. So that's what this does. It looks in the payload of the data looks for status looks for firing. If it sees all those things it says yep we got an alert. It sets a flag. If it doesn't see those things it says nope no alert. and it clears the So, here's our loop. Here's what we're going to
run over and over on this device, which is we are going to start off with that flag set to false. Assume everything's great. Then, we're going to let MQTT look for a message. If we find that message, we're going to draw a happy face and we're going to play a sorry, we're going to draw if we find that message, we are alerting. We're going to draw a
sad face and we're going to play a sound, an alert sound. Um, if we don't find that message, if we see that the the status is false, the status is not firing, then we're going to draw a happy face and stop playing any sounds that we're currently playing. All right, so that's what we're going to do. I know everybody's tired of demos. I'm not. That's why they're
going to keep happening. So, let's go back to Graphana and set this up. So, there's one thing that I'm going to do right up front that I should have done before I started this, which is go into the alerting system. By default, Graphfana um Graphfana wants to wait a little bit of time before it sends an alert. And there's a good reason for this. You don't actually
want to, you know, like something's like up and then it's down and then it's up and then it's down. You don't want to fire an alert every single second because that's happening. You want to give it a little bit of time to settle out. Um in this case, I don't want that to happen. I want this to happen super super fast. Uh we're just going to send
things uh within one second. So, I'm updating my alert policy so that will happen. Okay. So, I've got this dashboard. I've got the water uh dish that I am tracking here. So, I want to set up an alert for So, I'm I'm going to save my dashboard first because it's going to make me do that. I'd normally give it a nice name. We'll just call it new
dashboard. That's very descriptive. Um, and then we can come in here and just say new alert rule. So, I've got the data. I've got the dashboard. I'm just going to set up an alert on this. So, all of this stuff is kind of pre-filled in for me. I could go build an alert rule from scratch. I can write Prometheus queries. It's kind of painful. It's much easier
to just use a dashboard and say, "Yeah, that's the thing I care about." So, it grabbed all of this from the dashboard. It knows I'm looking at weight in grams. The thing I really care about is the alert condition. So, when do I want to alert? Well, I want to alert I should have looked at what the uh the weight is. What's What's it at right now?
It's at 439 g. So, I'm going to say if that goes below 350 g, then the water bowl is empty. In the real world, I would actually measure this and we would put a real value in. Graphana keeps everything in folders by default. So, I'm just going to create one called dog alerts. Great. That's a good way to organize it. Same thing for evaluation groups. Uh, I'm
just going to call it dog alerts. This this tells me how frequently I'm going to check for the alert condition being true. Again, it defaulted to 1 minute. I want this to happen fast. I'm going to put it at the minimum 10 seconds. Okay. So, what's going to happen when this alert triggers? Well, I predefined in Graphana. I set up my MQTT server. I just said point
at my MQTT server on my laptop uh and send it a message. So, that's all that's going to happen. And the rest of this is just extra data that I could add if I wanted, but I don't I'm not going to do that right now. So now I've got this alert rule. It is defined. I'm going to turn on my alert receiver. So this is the subscriber
to MQTT and it's currently looking for Wi-Fi. And yep, we got a happy face. I've got it connected to a speaker. So, we're going to turn the speaker on and let's go back to the dashboard so that we can actually watch this happen. So, dashboards, new dashboard, very descriptive. All right. So, when this gets below 350 grams, then we know that the dog bowl is empty. So,
the dog comes along, it's very thirsty again. Big drink. Oh, yeah, buddy. Oh, that's good. Big drink. That's right. Go out. All right. You You can see the weight. Tell me how much I've got there. Am I below 350 yet? >> 406. Oh, the dog's so thirsty. Come on. Have some more. There you go. There you go. It's so hot outside. >> All right. I should have
set a higher That's okay. The dog is so thirsty. >> 337. All right, we're going to put this down. So, remember this will take it's only looking at the data every 5 seconds and then it can take up to 10 seconds to trigger the alert. But oh, there we go. We see a big yellow line. That means the alert has now triggered. Hopefully, this worked when I
tested it in the hotel earlier today. All right. Well, this would have been great if it had worked. We'd play a sound and get a a red smiley face. So, everybody has to pretend that that that happened. Um, the nice thing is we do see that the alert did fire. Oh, it's in pending. Okay, it's going to sit there for a minute. I think I didn't set
one of the other uh alerting rules. Yeah, this is one of the things that I meant to change the settings of on Graphana. There's a one minute period by default where uh it's going to wait to see if the alert clears on its own because again, if something just happens intermittently, you got an alert set up on like network utilization and it spikes up for 5 seconds
and then it drops back down to normal. I don't want to get that alert at 3:00 in the morning, right? Nobody wants to get out of bed for something that's already fixed. Um there I'm thirsty. And there we have our red sad face. Woof, I'm thirsty. There we go. Yeah, I forgot to change the pending value. So, this stuff can actually legitimately be useful. I I'm going
to turn this off so that the alert doesn't keep firing in case I forget and I turn the speaker back on. Okay, so this stuff is kind of useful. Um, we we can I I genuinely do use things like this to say, you know, reminder to water plants or to give my dog water. Again, I do not use this as my only source of of monitoring things
that I am taking care of, but this kind of is is a little bit reactive. Um, it it it's useful, but there is a lot more that we could do with it, right? So yeah, one thing we can do is start to apply some data analytics to the data that we've captured. So I've got a dashboard over here. Is that visible? Yeah, reasonably. So um looking at
how we can look at some of this data. And so we're just going to start with the dog door data. There's a lot that we can do with other data as well, but maybe I would just want to look very quickly at what the dog's doing. So I can pull this into Graphana. I can use that dog uh you know dog door measurement and just look at
it on things like a timeline. This is a visualization called the state timeline. And this is just saying how many times the dog went out and how many times the dog came in. Um okay, kind of useful. I can see if the dog's going in and out. Maybe that's interesting data. But there's other stuff I might want to do with it. I might say like, okay, this
is actually time series data. I'm getting data with a a metric and a value. What if I look at it as a time series chart? Um actually not a lot. it. This is kind of point in time data rather than well-connected data. So if I do these kind of analytics, I don't get a whole lot of interesting results. But if I graph it as something like a
bar graph, maybe that gives me some trend data. I can look like are there days or times that the dog goes in and out more often on average, that might be interesting. I can see things over a larger period of time. I can look at the raw data. Uh that's probably more useful if you want to do animation uh an uh not animations uh analysis or pull
it into a spreadsheet or something. Um again, I can I could think about it like a heat map. Are there times in the day that the dog goes in or out more often? But again, this is fairly sparse data. Um the these are not the best uses of of this type of data. It might be interesting if you put a GPS collar on your dog. So you
might want to say like I want a heat map of the areas that the dog spends the most time in. So that's much richer data that would look better on a heat map. But what we can do with this that makes it more interesting is start to mix the data that we have with other data. So in this case, I've got the green and yellow bars here
vertically represent the times that the dog goes in and out. The dark blue line here is air temperature. And this could be a sensor that you've got on your house. This could also just be from an API online that you can get the weather data from. I can send people examples of how to do that if anybody's interested. But I could see things like, does the dog
go outside more or less often when it's hot out? Is it, you know, I might want to overlay the water data on here, too, and say, is the dog drinking more when it's hot out? So, the the the idea of combining multiple types of data together really starts to show the value of even just simple data like entries and exits from a door flap. Compare that with
temperature, you get more interesting things. And then there's one other thing that you might want to do with it, which is start to apply machine learning to the data. So predictive analytics. Um I in this case, this is the one place that I didn't run this on my laptop. I did this in graphana cloud because I simulated a dog going in and out of a door for
like two weeks and I didn't want to keep my laptop open that long. Uh, and then once I had that, I built a machine learning model on top of it and it looked great. And I did the cardinal sin of demos, which is saying, I can tweak this to make it even better. And I blew away all my data, so it disappeared. But I took screenshots before
I did it. And so this is what that looked like. That may be hard to see because it's in dark mode, but what we have here is the orange line is my simulated data of the dog going in and out during the day. So you can actually see there's kind of a daytime period where it's going in and out. And then at night the dog goes to
sleep and it does not go in inside or out at all. And I ran this for several weeks and what you get is a set of predicted values based on this data. And that's the fuzzy blue line that surrounds that orange line. Um that was actually generated by the uh machine learning algorithm. It's the Facebook profit algorithm if anybody wanted to play with it. Um but you
can see it does a pretty good job of tracking along that. It understands that things stay stable at night and then trend up during the day. So again, this is a counter. It's just counting the number of times the door was opened. Now, what I did with this is I changed my simulation once I had the machine learning model built. I changed my simulation and instead of
having the dog go out like 10 times a day, I had it go out like 10 times in an hour. And so what that looks like is this. that orange line spikes way up really fast and it goes outside of that blue predicted range. Now, this is something you can also build an alert off of. So, you don't have to say, "Alert me when my dog goes
out 10 times a day." You just say, "Alert me when my dog is going out or staying in outside of normal values." Like, if the dog's going out this frequently, maybe it's sick. Or if it's my dog, maybe there's a squirrel in the yard and the dog has to go outside indefinite every 15 minutes. more likely for my dog. But but these kind of things, these kind
of data analytics are are honestly fast and simple to do, but can give you real predictive value uh when monitoring any system, including your pets. So, that's all I've got. I've got a few minutes for questions. Thank you all so much. If anybody is interested in reproducing any of this, this is my GitHub. It is up on my GitHub. Uh it's pinned to the top of my
GitHub as Prometheus for Pets. Um yeah, and happy to answer any questions. >> go back to the slide that had the URL for graphana. Oh, this one. Oh, that's you're not going to be able to access that. That's just my Graphfana instance. I had that as my own personal bookmark to to get there. Um, I can tell you how you would get there in Graphfana, which is
if you're in Grafphana Cloud, there is a um a link over here on the side under AI and machine learning. So, you can just go in there and I don't need to say that. There's kind of a uh a wizard that will walk you through it. Go back to this. Anybody that needs the URL? >> Yeah, the the question was that there was some confusion about the
Python web server I was using in the first project because it's not actually the Python server. It's Adafruit's implementation. Yeah, there are some differences between Python that you run on your laptop and the Python that will run on one of these devices. These are Circuit Python or MicroPython are the the two main projects that run on those. And they do have slightly different libraries and slightly smaller
kind of standard >> Yeah. Question. >> Have I tried using ESP Home? Yeah, I uh I use ESP Home at my house with Home Assistant uh all over the place. For anybody who doesn't know what it is, ESP home is a way of um kind of easily managing these stylo devices and it will do a lot of the configuration of them for you. Um I use ESP
home a lot at home and I actually pull the data from those devices into Graphana and do my alerts off of it. So yeah, that's a great option. >> Yeah, being lazy it's it's the easy way to go. Yeah. Yeah, you can expose it. He's saying you can expose the data through to Prometheus without even using Home Assistant with ESP Home. So yeah, if anybody wants to
play with these ESP home is another great project to look at and it will it will do a lot of the work that I kind of showed in this for you. I just I like getting my hands dirty. I like the nitty-gritty. Any other questions? Yeah. Yeah. So, the question was, are there cheap sensors that will track relative location, for example, for a pet inside your house?
The answer is yes. Um, I've experimented a little bit with this. Um, I've done it again in the context of Home Assistant, which is a uh a sort of home automation hub. Uh but ESP Home plugs into Home Assistant and and is a way of configuring these kind of devices. One of the the plugins for ESP Home is called Bermuda. And what Bermuda does is it uses
the Bluetooth radio in these devices. And as long as you have multiple of these devices scattered around your house, it can do triangulation based on signal strength from known locations of of Bluetooth uh transmitters to like a Bluetooth beacon. So the the upshot of that is you can do something like put an air tag on your pet's collar and use Bermuda with ESP home and be able
to say like, "Oh yeah, the pet's in the living room because the signal strength is strongest there, next strongest in the kitchen, which is next to the living room, and weakest in the bedroom." >> Ah, okay. >> Yeah, sorry. Okay, that's a that's a good point. I'm getting uh told that Air Tags are not the best choice for that because they rotate their MAC addresses. Um but
yeah, there are Bluetooth beacons is the the generic that you want to use for that. All right, thank you all so much for coming. I hope this inspires people. If you build cool projects, email me. I want to see your cool projects. Like genuinely, I really do. So, thank you very much. Testing, testing, testing, testing, testing. All right. Anybody can hear Everybody can hear me. All right.
All right. Hello. Hello. Welcome. Uh my name is Sam Hannah and this is uh launching your first server. Um I just just tell you a little bit about myself before I get started. Um this is my third time at scale. Um I'm actually a healthc care technician by day and at night by night I'm usually a Linux enthusiast and self-hoster and dabble on uh on this stuff
as a hobby and became like a a big giant passion that I've been doing for over 15 years and self-hosting for about eight and just recently for the last maybe a couple years I've been completely uh cloud-free. So I host o everything over my local network. I don't use anything stored nothing like pictures or files. Nothing's stored over the cloud. So everything is now local for me
and it's been pretty good. So and then came here to decided to kind of go over what I've done. And uh so for people who haven't done self-hosting before, it gives you a little insight of of what to expect. So today we're going to discuss um you know what we can do with self-hosting learning some of the components we're going to be needed need to um get
set up um and then I'm going to show you a demo a live demo actually I'm not going to pre-record it I'm hoping everything goes smoothly but um but it should go and um basically I'm going to turn my laptop right here into a server in front of you guys so hopefully it go hopefully we'll have a little fun there. So just to give you a little
for people who haven't done it before but self-hosting is basically the practice owning your data basically on your own hardware something like a laptop or if you have a an old rig like a PC that you you know haven't been using sometimes you can use that to um use that and uh when you host your stuff you can pretty much um per you know pro you know
have your stuff uh not rely rely on third parties like Google or Dropbox and stuff like that. So, this actually helps with your privacy and you can customize it the way you want. Um, and also for people who have to pay for certain things, you can avoid paying for costs that require more space, you know, especially if you're someone who has a lot of storage uh stored
in in the cloud sometimes requires more um out of pocket. Um, and I'm going to like I'm going to show you a little bit later, but like with software like Docker, um, can make it a lot easier to set up a server. Now, there's other applications or at least services out there that can help, but um, using Docker, which is something that's more reliable, um, and especially
knowing what's in the back end of your system, um, can basically help too as well. So pros and cons um basically you know it's pretty standard but the pros would be that it gives you complete control of everything of the data your ser your own server you're going to own the hardware no one has control over it the applications are on it are also loco local sorry
and um you can come customize the settings as the way you wanted to and you'll have the ability to secure the data effectively and preventing from other third party access and um hopefully not having any potential leaks, but should be private and I'm going to show you how to do that and uh can you know like I said earlier can reduce cost you know especially if you're
you know if there's a lot of storage you can also reduce the cost of that and uh hopefully you know host it locally. But the cons also can be that you can require some technical knowledge and it does might require some um skill to try to maintain servers. You know maintaining regular updates, patching your uh you know servers with security um you know updates that are required
especially when it comes to um you know the frequency of updates you know may you know depend on u you know what needs to be patched and it also depends on what the you know the um developers are are hoping to do how often they you know patch everything. Um while the self-hosting can reduce uh fees but when it comes to hardware electricity and also downtime a
lot of times that can also be a lot of upfront fees. Well, you're going to, you know, if it's something like, uh, especially what's happening now with hard drives and RAM being expensive, um, that can also be a upfront high upfront cost. So, that's something to look forward to. But, you're hoping in the long run that your server will last a lot longer than the potential of
having something in the cloud where a lot of those services might cost long lot lot more over longer periods of time. So, most common apps to cell phones. Now, these are not all of them, but these are the ones that I've usually been using, and there's others. Um, if you go to the site that's listed below, they have a lot of uh applications that are listed that
can kind of uh u potentially be alternatives to, you know, certain other services that you use. So, for instance, like NexCloud listed there is a good Microsoft 365 or Dropbox alternative. You can host your own website through your own server using WordPress. Um, if you don't want to have your password manager in the cloud, you can also host it yourself with V Volt Warden, which is a
a bit warden fork that's written Rust, so it's lightweight and it can run on pretty much any kind of hardware. Usually can run it on a Raspberry Pi and it runs pretty well. Uh, image is pretty recent. It's gone really popular, too. It's uh, it's basically a Google Photos um Jellyfin, you know, if you're into doing hosting your own media server, that's a great alternative. There's Plex,
but um with a lot of the uh the complaints that I've been hearing from Plex, I don't haven't used Plex in a while, but a lot of the complaints I've been hearing, a lot of people have been switching to Jellyfin. So, it's been a good alternative to that as well. And you got audiobook audio bookshelf um if you want to host your own podcast or audio book
uh server. And you got Navi Drrome if you want to host your own music server as well. And that's kind of like a looks kind of like a Spotify So components of our self to self-hosting. So basically I'm going to show you what we're going to be needed for this to happen. Uh so with self-hosting basically like I you know expressed earlier um there's many devices you
can use. um you got single c single board computers and the best way to do is just repurpose old stuff like if you have a PC lying around that you're not using or old laptop those are really good things to start out with um especially if it's something you just want to tinker with um a lot of people do use Raspberry Pies but um from what with
with the uh the pricing hike that that's happening with the Raspberry Pies um I know they announced that they were going to raise the prices on them it it to me it feels feasible just to buy just like a really cheap old nook or mini PC or something or even a old laptop. Um, and these can be done headless or you know non- headless. What it mean
basically means that headless would mean is a server that doesn't have like a gooey desktop. It's just a black screen with a terminal. Uh, that's something you might want to do when you're kind of, you know, getting, you know, experience. And if you kind of gotten used to the terminal, then you wouldn't want to do that. But you can run a server with a guey desktop. And
if you want to use it on a Windows or Linux operating system, they you know, you they have enough features on the the guey desktop to kind of customize and and change settings. So um not necessarily um required but you can you do uh set up a static IP address for your um your server. Now this is meaning locally not um like a WAN IP addresses. Uh
I wouldn't recommend that because WAN WAN or ISP static IP addresses can be expensive because they do charge for that probably. Uh but this is for the local IP address. So when you know when you have uh you know a device that's connected to your network you get a local IP address like 90 192 168.1 or 2.0. So, you want to have a a very consistent uh
IP address. Uh especially if you're using doing something like a media server because something that needs to be um you know have a connection constantly, you don't want that keep changing. You'll have to keep updating everybody to change the p uh IP address, but you want something static so it never changes. And it's very um especially I usually make a habit of making a static IP address
because it always makes me you know you remember what it is and and it makes it easier for me to you know remote in if I need to make contact with it to to do any kind of adjustments. And like I said it's with a if you're using like a guey desktop it's um pretty easy to make those changes. Um I'll give you a little example. So
if you kind of I'm using Linux and I'm using Gnome, but if you go to the top right and you can see and if you go to your I'm using the Wi-Fi, but if you go to this your Wi-Fi settings, you can kind of see that there's already an IP address already here. But if I wanted to, I can go to the IPv4 section and kind of
change it to a manual and then I can adjust it. But I'm not going to do that for this period right here because um I don't want to mess with the settings on this and and I don't want this to go wrong with the setup that scale has here. um you could also do it in the terminal. Um I'm using since I'm using Debian um oops sorry
since I'm using Debian on the bottom left you'll see the command there that's uh NMTUI which is uh short for uh network manager terminal user interface and it's uh pretty much a a little uh simple twoy there if we just do you can kind of see it a little and you can pretty much edit a connection through the terminal. So if you're using a headless server, uh
this would be something you would want to do. You would just go to the Wi-Fi and you can actually make changes. Now each, you know, operating system would probably have a different method. It also depends on what uh desktop your environment you're using. So since I'm using Gnome Network Manager is usually the one that's installed. Uh so next feature would be Docker and like I expressed earlier
Docker makes things a lot would make is going to make us a lot simpler for us to install our applications and it basically it's just a platform that allows uh basically our applications to be in a container format and it's basically just an image that gets downloaded to your system and then once it gets set up it's already preconfigured. So all the dependencies, everything that's already um
that that's required is already inside that container. So you don't have to really go outside and and uh do any more uh install any extra software to get it to uh get working. And it can also run on any Linux uh distribution, runs on Windows, Mac OS, so you can pretty much use any kind of operating system if you wanted to um to to run as a
server. Um, and then just make sure that the application you're installing uh is supported by the architecture. There are some applications like if you're using like a Raspberry Pi may not support ARM. So, you want to make sure that if you are using Docker on um whichever architecture you're using, just make sure that the software you're using has that available for for Docker. It's do Docker image.
Oh, I'm sorry. So um for at the bottom here I have a little uh couple command lines there uh which we'll be using. Um basically the first one is the way to install it. Now uh if you go to the documentation of docker there's a lot of documentations on how to install it depending on the operating system you're using. Since I'm using uh Debian um this uh
first line is usually pretty easy just kind of like once I copy and plate paste it in there it would add the rep repository install the docker uh the docker um uh applications needed and then the next line would be to add my user to the docker group so I don't have to use root privileges to um use our docker command Uh so don't want to complicate
really things here because we won't be really using this but if you're using docker there's a you can run a docker uh docker uh an application through docker um the first line that you're seeing there is uh docker run-d and it's actually basically um it's pointing to a u an image. Now, um, usually if the image hasn't been downloaded, you'll see that the image will get downloaded.
And then once it's downloaded, you'll notice that there's a green check mark to let you know that it's running. Um, and then when it's running, depending on what the SE application is, if it requires you to go to the browser, you would go to the browser, type in the IP address or the local host address, and then the port number required to access it. And then you
have docker ps which is basically lists what docker images are uh active and running on your system. So I give you a little screenshot there that kind of gives you like if we were installing vault warden. We can see that it is listed. It's been created 16 14 seconds ago and it's running and it's healthy and tells you what port number that it's being used. And there's
a couple other um command lines that that we can you include. We can stop the the service um by entering the docker stop volt warden command. Uh we can remove it and then we can start it if we want to restart it. Um you can also use the container ID. So if you look at the kind of on the that image up above towards the right you're
going to see the the container ID there. Hopefully it's clear enough but um basically you can instead of using the name Volt Warden you can use the container ID. So, uh, sometimes if you're not sure what the name is listed or if it doesn't come up when you're typing it in, you can just use copy and paste that container ID and you can use that to start,
remove or or start the So, another way to handle Docker is uh basically creating a docker compose file. Now, this is something we're going to I will be using in my demonstration because this way you don't have to remember any command lines. you just copy and most of the time when you're um trying to install an application, they usually will have the uh Docker Compose file available.
It's already been preset. Um there might be times where you may want to change the port number. Maybe if you already have something using the port number that's already recommended, you can change it. Um you can change the volume if you don't have to use the the dot slash if you want to point it to a different hard drive. um you can just change the the the
uh section on the on the left side of the colon and then just point it to the correct uh location you want it. So once it's saved um if you look at the bottom uh bottom left you'll see that it says nano docker compose that's the command to launch uh nano and to open up the docker compose file. Um some people that I've seen use just nanompose
nyamo. I think you could name it whatever you want, but I think it's u uh I kind of just keep it as docker compose and then I have a separate folder for each one to kind of separate each uh service so I have them a little bit organized. [clears throat] So these are commonly used uh docker and compose commands. Now there's others. There's a lot more. I
don't really use any of the other ones. These are most commonly used because I like to uh when I either want to install a application or update an application, these are the commands that I use. So if I want to install it, I use the first one docker compose up uh dashd. Um if I want to update, I would really would shut it down first with the
second line which is the docker compose down. And then if you use docker compos pull that will if there is an update or updated version of the image it will pull the new version and then what you would want to do is use the first line to turn it back on or not install but you would turn it back on or start it. So if you use
the the very first one again after you use the pull command um you'll basically it will just update the application. Um [clears throat] yeah, and there's ways to kind of do this automatically. You can write a script to do it. There's even an application called Watchtower that um it's also a Docker image that you install and it will actually update your Docker containers automatically for you. You
just need to make sure that the applications you use uh work with watchtowwer because like for instance uh if you use an application like image image um makes changes to the docker compose file they may sometimes use either a different image or and so if you don't change it or make sure it's changed before the update's done you could break the break the application so you want
to make sure that the application can work with something like Next thing uh not required I mean I'll explain that but but really we we can we're going to be using a domain name for our uh our little simple uh demonstration. And basically what this means is uh instead of using an IP address to access the application or service we're going to set up a domain name.
So instead of trying to remember what IP address and port number it's on, you could just remember the name that you've set up uh or the domain name. Um and this kind of helps with um setting up a SSL certificate. So if you want to make sure you want to use something like HTTPS, you know, make having a secure connection, uh having a domain name actually uh
is required to set up a um an SSL certificate. Now you could purchase a domain name. There's plenty of places where you can get them. There's NameCheep, GoDaddy, Clariflair. Cloudflare does it too. Um there's plenty other ones that can um where you can purchase domain names. Um you can try it for free if you don't want to go and purchase one if you're just starting out and
you just want to get started. Uh which I'll be using duck DNS. So I'll be using that just to show you guys how just to set up a um a domain name and then how to get it set up on the server um and show you how quick that would be. But yeah, you can just use any of those. Um, and I can show I'll show you
how to make subdomains with them. So that way you don't have to um you you could just one use one domain and and you can use it for all your services. Um, so reverse proxy is going to be needed. Now uh we have engine X. Now engineX is terminal I mean a command line u application. But what we're going to be using or what I'm going to
be using is I'm going to be using EngineX proxy manager which is a lot guey front end that allows us to set up our domains, set up the SSL certificates and it's all pretty much pointclick. Uh there is some typing but it's very easy. I'll I'll show you that. But basically it's allowing the app uh your web services to be um interact with your application with a
domain name. So in order for any you know device to know where your you know your service is uh when you type in the domain name it doesn't know that. So it uses the DNS which is like Cloudflare uh to point out where it's located and it points it to your to your um to your server. So your DNS server knows or knows the IP address of
your server. So that's how it needs to be. So it needs a reverse proxy. So when when the uh when the name when someone types in your name, it goes to your server and the reverse proxy tells that requester that hey this is where this is at this port number. So it tell basically kind of acts like a um a barrier uh for your services. So instead
of um entering just an IP address when you type in the domain name, the reverse proxy reverses it so that way it knows where to go. So this handles the reverse proxy handles all the SSL certificates. It decrypts it, make sure that the there's n end to end u you know encryption. So everything from there it's it's going to make sure that everything is is handled properly.
I have never done it with uh the command line because I've I've tried to learn it and it's it looks like to me it's it looks very complicated but I've been just using proxy manager and it and it's I mean from that I just I kind of run it that way and it runs perfectly. So now do you really need a domain name? Uh most of the
time I mean at least maybe 99% of the time no. uh you can uh use um a VPN connection um instead uh if using a port number. Now if you're okay with using port numbers, you will be needed to use that in order to connect to your service if there's no domain name. Um but you know it's just preference uh it's not required but there are times
where maybe an application may require it. So like for instance uh I'll be using uh Volt Warden as an example when I install the application that requires in order to use it uh an HTTPS uh connection. So um that will require a domain name but if and it doesn't uh there's plenty other services like uh if you want to use like image or um let's say you
want to start a music server those applications you can kind of connect without a a domain name. So, [clears throat] uh, to, uh, help us connect to our servers outside of our network, we're we're going to pretty much make our server, uh, private. We're not going to make this public to the internet. So, in order for this to happen is we're going to use an application called
Tailscale. And if you haven't heard of it, it's basically a a VPN that you're going to set up with all your devices. So, all your devices will be meshed into one network. And as long as these devices have an active connection connect or actively connected with tails scale, it's going to um basically keep them connected. So instead of using like a private IP address, I mean sorry
public IP address, you're going to be using the IP address that's given to you by tail scale. Uh and this IP address is not routable to the internet. So this is only an IP address that's going to work in your tail scale network. So when when I spoke earlier about do you need a DNS uh to access your service um especially outside of your network you don't
you can just use tail scale and use that IP address as your static IP address and then that once you use that IP address you can use that to access your applications you know depending on what the port number is so if you want to go in that route you can but what we're going to do is um you can use the tailcale IP address um in
your um reverse proxy in your DNS settings. So it points so you have to be on your tail scale network in order to access your domain name. So it makes it more even more private um to so in order for you to to anybody to get access they would have to be on your tail scale network. And if you look at the very bottom um this is
just the command line for this set of this demo. But um [clears throat] but basically once uh you go on the tail scale website and if I show you just real quick as you can see if we add a device and you add a client it could tell you tells you which how what would be the what you need to do. So if you want to do
it through a command line or you can have a guide that tells you how to do it. You can just select the device that you want to install it on and it'll show you how to install tail scale on that device. All right. So that's pretty much all we all we will need um just to get started. I mean this is not even the the basically the
the rest of it. I got some more at the end if I can get to it. if I I'm done with the the the demo. Uh but basically [clears throat] this is going to be what we're going to be doing right now or as soon as I'm done with this. Basically, we're going we have a machine and this is basically my the laptop I'm going to be
using. Um we're not going to do a static IP address. I have it listed there because that can be something that you want may want to set up. Um, but and if you are running this uh having a device that's not uh you know local and you're trying to do it remotely, you may want to SSH in it. But since I'm using the device that we're on,
we're not going to SSH in it. Uh we're going to install Docker, install a couple applications, set up Tail Scale as well, and uh set up our domain name so that way our reverse proxy can uh point our um point the domain name to uh our services. So, So, the first thing I'm going to do on this system is u we're going to go back just a
little bit and we're going to install Docker. So, I'm just going to uh copy this line right here. And we're going to go back to terminal and we're going to paste. And it requires a root password. So, we're just going to install it. Now, this can be done on on uh you can install Docker on Windows. So, if you do want to use Windows, you can. Um,
but this method is specifically for uh for Linux and it's uh for my uh Debian. Don't worry about all that. I have snapshots set up. So, it's installing application the application. So, it's making a snapshot of my uh of my uh backup. Basically making a backup. So, we've got Docker installed. And then if we just do we can see there's there's nothing really installed just yet but
we can see that it is So um another thing we're going to do is uh we're going to use this second line and this is going to give us our basically allow us to put our uh user or our current user into the docker group. So that way we get we don't have to use uh we don't need to use root privileges to actually use docker. We
could just use the docker command without sudo. Um it's already been set up. I already have it set up that way. So we don't have to technically I would have to log out log back in but I'm not going to do that. U and the next thing we're going to do is we're just going to uh set up a couple or at least one or two docker
compose files. And what we're going to do is we're create an a folder. And we're going to name it Docker. And I'm going to go into the Docker command there. I mean folder. And we're going to name one um sorry, name it one more. We're going to call it And we're going to go into that one too. So this is where we would do our Docker Compose
file. So we're going to do nano docker-mpose. Uh I didn't have it ready. Sorry. I have my Docker compose files backed up. So, we're going to go to this. We're going to copy this and we're just going to keep it default the way it is. It's just uh if we look at it real quick, as you can see that um these are the port numbers required. We're
going to keep them the way they are. Um and as you can see, it's going to point to it has a dash dot slash. That just means that it's going to store everything in the current folder that it's in. So, we're not pointing it to a different hard drive. We're just going to keep the the data in the same folder that it's in in the engine X
folder. So all we just do is controll X Y for yes and then enter. And then all we have to do is do docker of dash d. Oh sorry it's docker space compose not docker dash. And now it's pulling the image. It's gonna Oh, good. It's not gonna It's going to take a little time. Yeah, it's download. Okay. Shouldn't take too long, but it's downloading the image.
And then once it's done downloading, we're going to see that there's going to be a green check mark to let us know that it's been installed. Thank God for the connection. I didn't think you I thought it was going to be a slow download. We're almost there. It's always that ending that takes the longest for some reason. It's probably because it's distracting. So, there we go. Creating
starting. Boom. Then we got those three check marks to let us know it's done. And we're going to do is we're going to go back to that Docker Compose file real quick. And I want to show you just one thing. I should have done it earlier, but there's, as you can see, there's three port numbers. One is 8080. And this is specifically for the HTT uh P
um protocol. And then you see the 443 and that's for the HTTPS protocol. Um the 81 is going to be the port number that we're going to access to get access to the Nex proxy manager uh application. So if we go to the browser and if we just do localhost-81, as you can see, it's already pulled up. So, we're just going to do it. Just type in
test. Um, we're gonna use that address since this is the theme for today. And then, um, as you can see, this is what it looks like. Um, and we haven't set up a domain name yet, um, because I want to set up tail scale first. Um, so what we're going to do is we're going to go back to our slides and go to tail scale. And I
want to copy this And we're going to go back to the same terminal that we were just using. And I'm going to go back one more. And we're going to create another directory. And we're going to call it I'm sorry, no directory, not yet. Um we're going to um copy paste that. And this is the same thing. It's going to automatically down uh get the repository, update
the system, and then it's going to install tail scale automatically. Again, don't worry about that. It's just my system. I have it set up to do snapshots every time I do an install. Okay. So, at the bottom there, you're going to see where it says sudo tail scale up. Um, so we're going to type in that in right here. And it's going to give us a link
right here. We're going to hit rightclick, open, Click on Google and we're going to click on our account that we want it to be attached to. Hit connect. Um, we're going to go to the console. And there we go. Our device right now is added to the tail scale network. And this is the IP address that I was referring to. This is the IP address that we're
going to be using. So, this will always be the same IP address unless you've removed the device and reinstalled it. Then it'll give you a new one. But this will always be that IP address. So, we're going to use that for our um to get access to it. So, we're going to do one more thing before we get started is um we're going to go to um
duck duckdns.org or and this is where we're going to use uh get a free uh domain name and we're going to use this to uh for our um our tutorial here. And I'm just going to name it Home Lab with Sam. And it's probably going to log me out. Hold on a second. It seems it tends to not keep you online too long. So, or logged in
too long. So, Yeah, we'll do it one more time. Okay. Doesn't it usually shows the but there we go. Okay. So, as you can see there's um it says home lab with SAM but really the name is the full length would be homelab homelabwithsam.duckdns.org. So that's the full um domain name there. Let's see if it would load it again. So what we're going to do is we're
going to change this IP address right here. Uh we don't want it to be that. So we want it to be this IP address right here. And we're going to go back. Don't log me out. Hit update. There we go. It's updated now. So, this whole thing right here is what we want. Okay. We're going to copy that because we're going to go back to our proxy
manager and we're going to create a certificate. And we're what we're going to do is usually you could create a certificate for each domain or subdomain, but what we're going to do is we're going to create a a wild card. And this wild card is just going to be one certificate. And we're going to use the same certificate for each so subdom subdomain name. So we don't
have to um uh because technically you would have to have multiple DNS entries for each certificate but since we only have one uh entry which is because this is what it's shown here um we need to use a a wild card. So to do that, we're going to hit add certificate, hit let it's encrypt with DNS, and we're that name. I mean the domain that I just
had, but we're going to type in the asteris dot and then paste and then just tap on that. And then we're going to go to duck this. So, it requires a token. And this token is actually going to be You just copy and paste this token. And we're going to paste it right there. Ah, I hate the spacing. There we go. And then we're going to hit
save. And it'll take a little time. Depends on the connection, but I think we should be good because it's right now trying to make the certificate. It's communicating. It's using Let's Encrypt. So, it's communicating with Let's Encrypt to create the certificate. And then soon as it's done, it's going to let us know that it's done. You'll see the certificate listed. And we'll give it a little more
little time. We're almost done. That's why I was saying I hope it goes smoothly, but it should work. It's not giving me an error message yet. Okay, we're going to try one more. We're going to do one more. We're going to do Bolt Warden because that's the app we wanted. I'm letting it copy this real quick. And so, we're going to go back to the Docker folder.
And then I'm going to create another doc um folder called vault That's not how you spell it. Okay. And then we're going to go into that folder Paste it there. Um we're going to do slash and as you can see we're using the port 8080 and that's the port number we're going to use to access it. We're going to hit X and then the same docker compose
up-d there we go. So as as you can see that the certificate was created and we're now downloading Volt Warden 26. Okay. All right. Perfect. So now if we do as you could. That's weird. Anyways, they usually used to show um uh it would give you a message that says that since it's an HTTP connection, um it would tell you that you cannot do anything unless it's
done. It's probably because it's got it cached. Let me see if I can reload it. let's reload and see if it works. Nope. Okay. Well, anyways, you wouldn't it wouldn't let you recreate an account anyways because you're not using we're not using HTTPS. Um, but what we're going to do, but like I said, you can use localhost. You can use even use the local IP address that's
given uh to access it. But that would only mean you can only access it locally. You can't use access it outside the network unless you're, you know, port forwarding. But we don't want to do that. And we don't want it out to the to the internet. We want it private. So now that we've got uh Volt Warden installed and our proxy manager should be all set. So
we're going to go to our dashboard and go to proxy host. And this is where we're going to set up the Let's do the Oh, I know what we need to do, too. I'm sorry. So, we're instead of the local host, actually, I'm going to copy this IP address, and we're going to we're going to need to use the uh tail scale IP address. And we can
now access our reverse proxy through our VPN. all right, perfect. So now we're using our VPN to access it. And we're going to need to because when we set up the domain name, once we click on the domain name, it's going to route us to our um to our Volt Warden application. So we're proxy. We're just going to name it something. The subdomain is going to be
just pass for short for password. And then we're going to do um home lab with sam.duckns.org. Press that. And the IP address is going to be that tail IP address with the port number 8080. And we just need to block comment exports. And that certificate the SSL is for the certificate. So, if we see, we're going to see the wild card certificate that we used. And then
we're just going to hit that. We're going to force SSL. Hit save. And now, if we click on it, that's what I thought. Why aren't you Oh, you're right. Well, I'll just remove it real quick. Oh, you're right. Thank you. I'm doing it too fast. No, you can't because the the uh it's created automatically. So, it's There we go. So now you can access your Warton software
application with your domain through your VPN without open any ports. It's private. No one has access it but you. And if you really want to, you can do the same thing with um you can do like npn. We're going to create um one more [snorts] and then we're going to use u the same IP address. We're going to do 81. We're going to create a domain name
just for our EngineX proxy manager just to show you that the wild card will work with all of them. So you just hit save. And I can access my reverse proxy through a VPN with my domain name. So I don't need to worry about remembering IP addresses. So as long as you're I you know you're on your VPN network, you'll have access to your application. So um
or applications, I'm sorry. And um but if you want to try doing this, if you if I just do um if I'm going to if I just turn off tail scale real quick let's say I clear it and then I reload. It's just loading now. It's not doing anything. It's not reloading the page, which means it's not working. you can't access your domain name without the VPN.
So that shows that you're you have a private connection. No one else has access to it. Um as you can see right here, it shows the X is still loading. So that's that's basically it. That's that's the steps you'll just need to take to get it um to set up the server. It's just a very basic one. You're only you know I did only one application. There
are so many you know if you wanted to do is put a next cloud you set up nextcloud as well. But yeah, there's so many things to do. How much time do I have? Ah, uh, a couple minutes. So, if you wanted to secure your server, you know, this is, uh, something you want to think about. Um, things you want to think about is, uh, these are
things you could do is an add firewall to your system. Uh, make sure you're using SSH keys. You can install fail to ban. This bans IP addresses that are trying to um, trying to connect to your server. So if there's any failed connections, it can block it after a certain amount of attempts. Um you can have your application only access uh be accessed by the uh domain
name. So if you if you uh do your docker compose pretty um uh in a certain way, you can have it where it's only uh accessed through the local host uh IP address. So even the local IP address cannot pull it up. So it forces it to use the domain name only. Um make sure you update your servers regularly. Make sure also you do backups too. Anytime
you get into self-hosting, you want to make sure you have backups of your system as well. These are just a couple. Go ahead. >> Almost done. >> Almost done. Um just a there's a couple uh you know things you could do to to do maintenance. This clears up some things from the Docker system. Um and if you do updates on your on your operating system, you know,
if you're doing that command, this is on a Debian DRO. So these are just examples. yeah, and then just a little more if you wanted to in the future, you can run your own DNS server using the same server. There's applications that can help you with that through Docker. Um you can make your server pro public. If you want to set up another ser VPS, you can
install and attach that VPS through your tail scale network and have it as the reverse proxy instead. And that reverse proxy points it to your uh home server and that will give it a tunnel. So that way you can keep it public. You can have access it to any device you wanted to, but it'll keep your your home server still private and it will only have one
way to connect to it, which is through the VPS. And then you could build a NAS which is a a network attached storage. So if you want to do um you know do a server that is has a lot of storage on it you can do that as And that's about it. So if you want to thank [applause] Thank you for the assistance too for the mistakes
I made. So if >> if you wanted um to make your service your servers and services available to the to other people >> the way to do that is through the VPS >> Yeah. So if you wanted it let's say you wanted it public and you didn't want well you would have it would you wanted it public but you still wanted your your server secure what you
want to do is don't open any ports and you would set up a VPS. So the same setup I would do is uh you install install like tail scale and then you would install uh index proxy manager on that VPS and then what it would do is um you would point the that reverse proxy to your tail scale IP address of your home server. So that tail
scale has a direct connection to your home server only nobody else. So let's say something does happen to the VPS. Let's say it gets compromised. Nothing. I mean, all you can do is just destroy it, recreate another one, and you all you have to do is, you know, install tail scale, install the verse proxy, and have it do the same thing. So you're you're kind of using
the VPS as a firewall. It's it's kind of that extra layer, but you are public. So if you have a domain name and you typed it in on any device, it would pull up. So, as long as you're not, you know, throwing out your domain name to other strangers, then, you know, that, you know, that prevents it from any, you know, anybody trying to get into your
system. But, yeah, you would, you would use a VPS if you wanted to public publicly do it without opening any ports and you wanted still wanted your your server private. But, it's a it's up to you. I mean, I would I mean, if I I would only do that if you had people other people using your system and you didn't want people or if you thought pe
the if your friends and family members were going to have issues with like, you know, turning on a VPN all the time and tail scale on the on and on on the phone is pretty easy if they're trying to access it. Once they're installed, all they have to do is it's just it's just simple switch to turn it on. So, once they're, you know, once they're logged
in, they don't have to relog in ever again. uh as long as you know not you know nothing gets cleared no data gets cleared but once they turn it on and you can have still have it private where only certain people can have access to it through your VPN network but if you want it open and you don't want to deal with VPNs yeah I would do
the VPS that's how I do my setup I have mine I have certain services that I keep public because like for work purposes I like to um get access to access to my file server um so I I do have it out open to certain cases, but there's some services I don't want open. I only have a VPN You're welcome. And we still got a few minutes.
Any Yeah. >> So, you mentioned the importance of doing updates. >> How do you manage that and check for them? Do you have a schedule? Do you read the news? >> Yeah, I I would do a schedule. Um like, you know, for this I'm using an Linux operating system. Um, you know, there's only a couple commands you'll need to know. It's just pseudo app update. Um, you
can I would just do them regularly. You could do them weekly. Um, you know, don't wait months, but I would say do them weekly or probably monthly if you if you have to. Uh, you know, I use Debian because it doesn't they do security updates. They don't update, you know, the entire system. So, you're not going to get flooded with a lot of updates if you wait
too long. But, I wouldn't wait too long. But yeah, I would do it regularly like just like weekly have a schedule uh to do it. You don't have to do them daily. A lot of times operating systems, it depends on them, but um if you're not using something bleeding edge like Arch or something um then yeah, it wouldn't uh you know, you won't require be required to
do them daily. Um but I would do it weekly. Have some kind of schedule. >> Thank you. >> Yep. >> He's got a question. email address. >> If you do, I wouldn't host it on a private. The only issue with that is that well, I'll explain. The reason why is because um internet service providers do not like it when you have a um and they actually block
the port 25 uh port number. uh you could call them and see and and try to have them reopen it, but they don't like it because it they don't want you to have a private server uh private email server, sorry. So, you could do it I would probably do it on like on a VPS um even though they will probably block port 5252. The workaround with that
is that you would want to do like an SMTP relay, which is if you're self-hosting or want to be self-hosting, you want to hold you want to um uh you know make sure you have your data. The problem with SMTP relays is you're relaying your outgoing traffic to a third party provider, which defeats the purpose. So you would have to it's a little bit of a struggle
um with doing emails. If you're okay with doing SMTP relays, then you can do it. But if not, you're going to have to deal with uh your ISP ISP provider. And if you're using a VPS, you're going to have to deal with them because they may if they see traffic, even if it's open, if they see traffic, they could block it and may not want you to
use that that port number. So, it it's it's just really just you're on your own at the time at that. If you're trying to do an email server, you could do it. It's not it's not going to be easy. I I did it once. I did it actually I did it a couple times. I did it on a VPS. There's a couple It's not easy to set
up. So there's like applications that you can use. I used um uh there was a application called Uno host which is like it's kind of like a whole it converts your server into like this uh big giant repository of applications and you're using their app your their repository but they kind of help you with the DNS entries um tell you what port numbers they kind of organize
that for you um and then it help you can set up an SFTP relay but once you get all that going it works really well but it's it's just a it's kind of a uh there's a lot of lot of steps to run an email server. Um yeah, I would if you you know I would probably not I would I usually use like Proton Mail just to
be safe, you know, something if you don't want if you just want to stay away from Google but um you can you could try but it's it's it's a it's um it's a bit of a work and to do it self-hostingly like even locally I wouldn't port for I wouldn't open ports. it would probably you know that will just keep yourself vulnerable there you know especially on
a home router god knows what people were you know what people are trying to do to get into systems so yes >> you can you can I just do it for unification I want everything to be same uh so I use docker because I have everything all into one folder and I actually have a script that just goes in and just updates everything for me automatically. You
can do it directly. There's ways there's you can do like the package uh I know some applications have a a package that you can install. Uh if you want to do it that way, it's up to you. Um I I just chose to do a Docker. I just it's just I have a flow that I do when I when I set up my servers. So uh I
had just you know quick install. I just you know have my Docker Compose files all set up. So, I just run one command and it installs all my all my stuff that I need. It's it's just it's all preference. There's there's no there's no one way of doing anything. I mean, if you if you want to don't want to use Docker, you don't have to. There's like
I said, there's a a service called Unhost. If you go to their sites, I think it's like unhost.org. It's like you can download their image or you can convert your Debian I think they're using Debian now uh Debian operating system into a Unhost and it's they have their own repository so they have their if you all it is is just a one-click install. The only problem is
is that you don't have control. So the updates are pushed by them not by the developers. So it's when they think it's stable of the version that they want. Um and then there's sometimes you might be held back because um like Uno host might say, "Oh, you have to be on version Debian 13 to get this update of this application." So you have to wait. So you're
kind of like kind of stuck. So I mean you can use the Debian you can use the the the package that's provided and a lot of applications do provide um package a package format like RPM or Debian uh or even a Windows installer. Um, but they also a lot of times will provide the docker. And like I said, I kind of just do this this way because
it's uh kind of a a flow for me. So I just have everything in one folder. I just transfer my folder to my server and then I can go in and go just one command install and I don't have to worry about downloading packages and going to each each site or anything like that. So it's and everything will be updated too once you install it downloads the
especially if you're doing a fresh install when you do the the Docker command line to to install it and then updates it downloads the ver you know the latest version right away. So I don't have to worry about going to the website do I need the new version or because you know if you want to keep a backup of your the apps that you know the packaged
you know formats of the apps you got to be worried that you know you have the current version and make sure you have the current version. So, at least with Docker, it does it all for you. Make sure you has you have the the current we're on time, but I think we should be good. All right. Thank you guys. >> You're welcome. >> Yeah. If you um
If you have any questions, I have you can email me or I do have a YouTube channel. running on Android live there. Um, if you want to just come up to the front, you can connect your own phone to it and try it out. Um, yeah, until uh the next talk begins in 15. >> All right. Thank you. What's happen? black took care of so much of
it for me. >> Also, I got you were talking about this, >> Yes, exactly. >> Wait, wait, wait. This is what she was talking about earlier, like the connections with the indexes. >> Like a mind map. And I think the way we thought about it is Yeah. So, this is kind of like what Google does where like I search for something and then I search for something
in different wording, but exactly what I'm looking for comes up right away because I knew what I just searched for a second ago. Like, I can tell it's doing that and it sounds like what you're talking about. It has like it's conceptually related to the thing I Interesting. Okay. Yeah. I don't know like I don't know if that's so doable on the static police, you know, the
very the very kind of hack together static search engine, but um it's maybe maybe Adam could have that. because you know I'm not >> working. Yeah. is can no man do what you're describing as maybe I wonder if they do I mean it's open street map is not known for having very good search so I would guess not but um but yeah it's an interesting question >>
but that's that's not Adam that's that was the static one that was that was the one that statically served so it's literally just I type in l and it downloads ljson and London is in there Yeah. So, so >> yeah. No. So, so like >> that the statically statically served search engine I made it so that we could have something running on Pi ZWic like that's the
main reason I made it because I like it's like low tech. I made it low tech. >> But then so eventually we might go back to Adam and then maybe you know try some of your ideas but Now, for now, I think I'm going to go full ste even on like the higher search because I think I can do more with it than I've done. I can
probably take it pretty far and it's file datad geometry of things. Search for So, that's probably a big part of why it's bigger. But anyway, so that is that's all to say I'm probably gonna keep working on the static one for a little while and then so if I'm doing that I'm not sure if your idea like how much I can do that kind of clustering like
how I would do that using static files you I think through the search process like what the Yeah, I don't mind doing two steps. Like for when I have a lot of data, I was thinking maybe it might make sense to do like a little bit slower, but but still pretty good. And maybe what you're talking I could have it. So there might be a conceptual like
right now it's charted by the first letter. if I type it doesn't know what concept I'm looking for. But if I click on London or I guess >> It had a cube and at the end that's not just that's also geograph. You need help? >> It's not something else. >> Put my phone. Is my phone over there? I leave my phone on the seat. >> I can
see Yep. I hope that's it. >> Oh, you need light. >> The AV guy. >> There's no power to this. I will say right now I'm working on sorting and I >> them but also look over here. I guess the question I was like Wait for the AV guy. >> Where is the A guy? So, let's plug your phone in and see if >> Yeah. So, I
guess I guess some ideas. So, like one thing I guess I can think of is like here here are all the Spanish countries. Here are archaeolog you didn't find me. >> Yeah. So maybe It's my friend. >> Ready to rock. Okay. >> Rock and roll. >> Yes. Thank you. >> This talk may run a little long, but it's the last talk of the day. Feel free to
leave if you have to. Good evening everybody. Thank you for coming. My name is David Shaker, the executive director of AppDev for all. That title is analogous to the CEO of a for-profit company. With me is Jim Turner. Jim hired me in 1980 as a college intern. And we have circled back around in various employer employee relationships for the last 46 years. In 2012, he started at
Motorola Mobility, a part of Google at the time, working on Android phones. He's been programming Android phones ever since. Before that, in the early 2000s, he was one of the people who put together WAP, the web browser for flip phones. Oddly enough, flip phones are going to come up again in this presentation. Let's go to the next slide. I started programming. Oh, I'm supposed to stay behind
the podium, aren't I? I started programming in 1974 because one of the math teachers in my junior high school thought that children should know about computers. It was the future. She was an incredibly visionary woman. She was also the wife of the mayor. So, we got the computer. Funny how things work. We didn't get any textbooks or teaching. So I had to hoist myself by my own
bootstraps to learn how to program enormous gaps in my knowledge of course. And as I look forward to where we are at the other end of my career, it feels like we've gone backwards. Folks say that you can't write programs on the phone that you own. that this handset, this happens to be a three-year-old Samsung phone, is somehow not powerful enough to write apps. But it's more
powerful than the computers that built the original Android apps in 2006 or so. It's also, not particularly relevant, but interesting factoid. It's also more powerful than all of the computing that existed on this entire planet when I was born. So, when people say you can't build apps on mobile phones, I say hogwash. I say hogwash because one, it's false, and two, it's a great word and we
should use it more often. I don't know what it means. I've never been on a farm. Do you wash hogs? Is that something people do? How do the hogs feel about it? Let's move on to the next slide. Jim and I are also, as you may have gathered, horribly, horribly old. If you round up, I'm over 100. >> Well, yeah, it depends on how you round. When
the bank calculates interest, trust me, they don't round up. We're so old that we watched Star Trek in the original run and we watched Gene Rodenberry's then utopian vision of a future where the only limitations on your success are the ones you impose on yourself. No government comes along and says, "You're too female. You don't get to improve yourself. You're too black. We don't like you. And
your religion is horrible. So, you're just forget it. My dad fought a war in the 1940s about The politicians we have now seemed to be focused on other things than guiding us into the future. So, because Jim and I are engineers, we did what engineers always do. We said, "We'll fix this." I wonder what that slide says. Oh, that's cool. We should do that. Enough talking in
politics, Jim, if you would. Let's show people hello world. Pretty straightforward, simple program. Let's change this and compile it on the handset. Uh, which I'll tell you more about in a moment. Uh, before I do, you probably have a first name. A lot of humans do. Probably assigned to you by people you'd never met before. If you got to choose your own first name, what would you
pick? >> Mark. >> Mark. All right, let's give Mark a proper greeting. Is there any way I could have known you were going to say Mark? Or I could have opened up your brain pan, gone in and messed with the neurons and then caused you to forget it. But there's no evidence of a surgical scar. So probably not. The talk gets weirder from here. While Jim makes
that change, let me tell you what you're looking at because this is something that you probably haven't seen before. This is Android in desktop mode. It's coming off of Samsung's Dex platform, a desktop experience. A lot of cell phone vendors have added some kind of desk uh desktop mode. Google is now standardizing it. So if you have a Pixel phone, you might download the latest version of
Android and you'll see Android's take on desktop mode. These windows are as you expect resizable. You can move them around, overlap them. Ready to run the program? I can stop stalling. Cool. Let's do it. Do you feel properly helloed? >> Thank you very much. Of course, that's a trivial program. Many more on can compile that. I did that when I was asleep. But we'll get into more
serious stuff in a moment. The bullet points in the slide on the left are what we're going to be covering for most of the rest of this presentation. Let's move on to the first one. Now, We say that code on the go is an industrial strength IDE. It happens for on a phone. The phone is this galaxy fold sitting right here. That is what is generating this
display. What do we mean by industrial strength? When I look it up on dictionary.com, the response is server offline. Try again So, we're on we're on our own. By the way, um notice that this phone is offline. It's an airplane mode. No wireless icon. Code on the go builds offline. That's going to be pretty important later on. We look for simple metrics. They're easy to understand. So,
one of the simpler metrics is how big an app can you build. Let's go ahead to the next slide. And if you would show street complete, do a little demo of that. In the previous hour, uh the speaker who is sitting right there was talking about maps, open street maps. Street Complete is an app that you can download from the Google Play Store. It lets you visualize
open street maps and add features, annotate the maps. It's really kind of cool. The version you're looking at was not from Google Play. This was built on that phone yesterday. We didn't pick it because of any particular love for this program. I picked it at random off GitHub because I was looking for something large to challenge my engineering team with. So this particular program, 124 megabytes for
the APK, the Android package. That's the size of the app. 7,500 files spread across a thousand directories. It's a decent size app. Nothing wrong with that. Built on the phone. took about a half hour for the first build and half of that was waiting for downloads. After that, it was time spent locally. If that's as far as we got, I would have been happy. But the engineers
came back to me and said, "One more thing." They love that one more thing. I said, "What do you got?" They said, "Code on the go is now capable of bootstrapping itself." I said, "Words I'm not allowed to say here." Let's move ahead to the next Next one. There we go. Code on the go can bootstrap itself. That is one of the marks of a powerful IDE.
The source code for just the IDE is 9,300 files. The APK clocks in at a whopping gigabyte. That includes 30,000 documentation files. And I haven't bothered to count the size of the SDK and everything else. This is a huge Android app. You will rarely find anything like this. It builds itself. Now, I said to the engineers, "Okay, it built, but how do you know it built right?"
And they said, "We knew you would ask that." We used the build to build itself a third time. This is a serious product. It happens to run on a phone. And the reason I'm spending so much time in this section of the presentation is because people tend to discount phone apps as little toys. This is not that. Let's move on to the Another feature that industrial strength
IDEs have is a debugger. It's a feature you see in the higherend IDE simply because it's really hard to do a debugger. The whole point of a debugger is to fix your program when it's crashing. So, your programming is in all sorts of weird states that keep trying to crash the debugger. Code on the Go has a native debugger. I would love to show it to you,
but it's very boring because it looks like every other debugger you've ever seen. So, if you want to see it later, come on and Jim can show it to you on his phone or I can run a fiveminute canned video. Let's move on to the next tab. Code on the Go is also, of course, native. It's running on the phone. When I started in Silicon Valley after
college, back when we rode dinosaurs to work, we were selling a $75,000 workstation, what you would call a personal computer, using the then brand new 8086 chip from Intel, which had no native tool chain. So, we had to cross-co compile on an Intel MDS box, download through a cable to the workstation, and it was horrible. It crashed all the time. We were spending half of our time
fixing the stupid thing that were we were trying to use to build the thing we were selling. And also the thing we were selling wasn't very good because we weren't using it. Customers were using it, but we were on the Intel boxes. Why am I telling you this boring war story? Well, I like stories obviously. developing on Android today without code on the go is going back
in time to 1982 and following the same architecture. You compile on an Intel chip, download through a serial cable to an ARM chip, and you spend a lot of your time fighting with the development environment instead of having fun. Programming should be fun. Now, if you're familiar with Android programming, you're probably saying, "Why is this geyser whining about this? He's just shouting at clouds." Okay, I get
that. I mean, who doesn't like shouting at clouds? But until you've experienced the joy of native programming, you don't know how bad it is to do cross compilation. With code on the go, you have fun because you focus on the problem you're trying to solve instead of fixing the plumbing. You can try it out. You can go to our website and download it and have fun if
you have an Android phone. Let's go on Now, here, let me warn you, I'm going to get emotional. This is something I really feel very strongly about. Not joking. So, if strong emotions make you uneasy, you might want to step out. Code on the go is an offline first build environment. Why is that so important? Well, as we said in one of the earlier slides, there are
billions of people in the world with Android handsets and there are millions of those people who do not have fast internet. And yet, without code on the go, you have to have internet to develop your app. Why don't these people have fast internet? Well, some of them live in rural Peru where they're at the bottom of a valley sandwiched between the Andes Mountains. And according to a
gentleman I spoke who services these villages, it's a two kilometer hike more or less straight up the mountain to get a cell phone signal. There are millions of people who technically have internet, but what they have is a 2G or a 3G signal. 2G is the equivalent of a dial-up modem from 19 1997. 3G is way better. It's the equivalent of a DSL line from 2002. You
can't stream video. You can't do modern internet stuff. websites like the website I worked at when I was at LinkedIn, a lovely Microsoft company. Excellent place to work, just in case you're wondering. Uh, our website is 16 megabytes just to get started. We're essentially we I don't work there anymore. We were booting up an entire operating system in your browser when you go to the front page.
That's not going to happen on a DSL line or a dialup modem. There are some people who have internet when they're in town but not at home. Internet when the kids are in school, but not when the kids come home. That's where internet in a box can be very handy at home. But here's where things get tight. As I said at the beginning, there are places in
the world where if the government catches you trying to improve yourself and they find out that you have made the terrible choice of being a female, they will put you in jail or they will kill you. We bombed the hell out of those people in 2001. But it's it's actually worse than that. I used to be a vice president at the biggest bank in the world. And
after September 11, 2001, all of the banks fled out of lower Manhattan to Jersey City. So, I'm standing in the lobby of one of our buildings in Jersey City. And it's the end of the day, and there's this well-dressed man there, T9, typing on a flip phone in 2017, 10 years after smartphones came out. And I'm thinking, what's going on? I am staring at this man. Why
am I staring at this guy? And why is he T9ing on a flip phone? And then I thought about what was in the news in that at that time. And I saw the Yarmaka and the Pis and the seat seat. His rabbi and my rabbi would have been doing this. The word rabbi means teacher. In Judaism, we are taught that the highest thing you can do is
to teach. But this guy's rabbi didn't want to teach. This guy's rabbi said to his congregation, "You may not have a smartphone. You may not learn because you would learn things I disagree with." That is wrong. That is stopping people from improving themselves. Did I confront this guy? Of course not. It's his life. He can do what he wants. What about his kids? What if he has
a daughter who wants to learn to program? And because of arcane rules, she's told you can't because you'd have to go online. With code on the go, she can have a smartphone, stay offline, live her life within the restrictions that she has voluntarily chosen, no skin off my teeth, but she can still improve herself. She can still learn to program and create apps that will help people
in her community. I might disagree with the app she's built. Not her problem. When I was in Nairobi last year, some students in a class asked, "How are you going to make sure that code on the go is not used for evil?" I said, "I'm a white guy in a black country. I'm not going to tell you how to run your lies. We've tried that. It was
a horrible, horrible No offense. What I'm going to do is give you a tool and trust that you will be smarter than us and not make the same mistakes we made. You can make better, more interesting mistakes, but use it wisely. Code on the go is is a tool and the way you use it is up to you. For offline mode to work, code on the go
has to have tremendously good documentation because the users can't go online for help. we have put a huge amount of our company's resources into providing the very best documentation there is. Let's show a So Jim's going to go uh click on a field and ask for what we call first level help. Let's go to second level help. Clicks see more and we see a little bit more
information. Now let's go to third Notice that that was essentially instant. In my former career, I was a performance analyzer. At LinkedIn, my job was to find out what was wrong in the data center in terms of performance and fix it. So, when we built this, when we engineered it, we designed it to be super fast so it stays out of your way. Now, I'm going to
ask Jim to click on that icon at the uh top left there. And this may be tricky. We have a bug in Samsung Dex's interaction with the mouse that makes it hard to activate that particular button. So, I'm going to stall for time. Oh, well, that was fast. each. Okay, >> all right. Uh, let's see. Let's try Android app development. >> I'm deviating from the script a
little >> Apologize to everybody from here. I can barely see what >> that's it. Yep, >> that one. All right. And click on Android Notes for Professionals. The last one. That is a 1329 PDF that just 1329 page PDF that just popped up. Maybe we were cheating. It's been known to happen. Bill [clears throat] Gates. Um, so somebody in the audience, call out a number less than
1330. 862. Let's go to page number 862. >> Very good. Instant help. Regardless of the size of the document, we're using the PDF.js library, the same thing that Firefox uses. So that's JavaScript rendering PDF insanely fast. >> Uh well, it reformats because it's HTML, but I'm going to come back to your point later and you're correct. There are trade-offs. Okay, so that that shows the uh the
help system. Let's go on to the Oh, we've done that. that we can skip over that. All right, the next point to talk about plugins. And I'm going to talk about plugins in an odd way. The difference between an engineering school and a liberal arts school. MIT and Princeton are both friaking cold in the winter. So there's no difference there. Snow on the ground. Your bike flares
out from underneath. It's just horrible. And sometimes there's no fresh donuts at the Waw Wa because there's so much snow this truck couldn't get there. But that aside, there is a significant difference. At an engineering school, you are taught correctly that there is one true answer for engineering problems. It is the best Little oversimplification there. In liberal arts college, you're taught exactly the opposite. You are taught
that there are a hundred answers to every question and that your job is to take thesis, antithesis, and synthesis. Find the best answer and realize that maybe you're not right. Maybe you got it wrong. Because code on the go started out as my idea of what I wanted when I was a kid watching Star Trek. It is possible that I am wrong. I can conceive of a
universe in which I have made a mistake. Not really. I'm just pretending. Because of that, we built in a plug-in system so you can take what we've built and change it to meet your needs. We can talk more about that in the second to last slide. Let's move on. Uh Jim is now going to show a demo of one of our simpler plugins. This is the key
store plugin. When you release an Android app, the release version has to be signed with a digital key. If you're a crypto guy, digital keys are fun. If you're a normal human being, I do not know what I'm talking about. I've never been one. I suspect a lot of you are in that category. If you're a normal human being, you don't care. And if you're a programmer
who's trying to make apps to make a living or to make your family's life better, you just want to get to done. You don't want to deal with this BS. So the keys store generator is a plugin we wrote that abstracts away of a lot of the complexity unless you use defaults which pro provide terrible security but you don't care. It's an app you're using on your
own. You're not distributing it or your friends are going to use it. You're not worried. So you get to make the trade-offs that are correct for your life between security and complexity. So that's the key store generator. It's just a plugin. Nothing fancy but it adds to code on the go without modifying the core. So, it makes it much easier for us to accept outside contributions. We
don't have to worry what's going to go on. We've already had some of the early users creating their own plugins, which is absolutely a joy to see when I wake up in the morning and check Telegram. We've also had one user contribute to the core. And at that point, I overruled our engineering VP who said, "We'll get to it eventually." I said, "No, we're getting to it
this week because I want to encourage people to contribute to the core." This was a visually impaired user who put in the effort without being able to read the screen very well to add support for Android Talkback to code on the go. If he's going to put in that effort to make his life better, who are we to say not yet? No, no, put it in now.
Get it done. Make him happy. Next Oh, so we showed that. Next slide. Okay, this goes to the question a few minutes ago about developing on a small As executive director, it is my job, my fiduciary responsibility to tell you everything is wonderful all the time and this is the best thing since sliced bread, which was invented in uh Illinois, I believe. I have a friend who
grew up in that town. He's very proud of the invention of the bread slicer. Get out of um but I would be lying if I said there aren't problems developing on a small screen. The soft keyboard is terrible. It covers up half the screen. So if you are a smart 15-year-old like I was a hundred or so years ago. You can start developing with code on the
go and it won't be the very best experience you've ever had, but you can do it. You can be better than you were. You can make advancements. And if you're a good boy or girl for Christmas or Hanukkah or whatever, your parents will get you a keyboard and a mouse and life gets much better. And maybe after your brothers and sisters are asleep, they'll let you plug
into the family TV to get the big screen experience. Code on the Go is the only IDE that scales from a handset to the full screen experience. So you can get better as your resources make Um, now we're going to show two demos. The first one, uh, Jim is going to show is shortcuts for common code actions. So let's go ahead and do that. Jim is going
to comment back in the code at line 14. long click to bring up the code actions menu and he added a line of code, but he didn't add the import. So he clicks on fix imports code on the go looks at what he's doing and says, "Oh, the class you're missing is that one and it added the appropriate import up there at line four." That's an example
of a simple little thing that saves typing, which is particularly useful when you have the soft keyboard. We have just a few code actions, but our plug-in system will allow other people to add their own actions. So, a teacher might add some actions to make the students lives easier. Or a company might add some code actions to deal with their peculiar codebase. The other demo we're going
to do is about Sketch. So, I'm going to skip the middle bullet on Agentic AI coding support. Of course, we have an agent. We have a connection to Gemini. So, if you are online and have a Gemini account, Gemini will answer questions about your code. It will suggest improvements. It will actually write code and put it into your software for you. Very cool stuff. The Star Trek
computer couldn't do that. It was just Majel Barrett's voice in the recording booth. So, instead, we're going to show you a sketch. Now, at this point in the presentation, you're bored with my jokes. I get that. Trust me, I've been rehearsing this thing for weeks. I am bored of these jokes, too. And you're wondering, is there anything new here that you haven't seen before? Is there any
reason for you to lean forwards in your chair? This is a good time to start sliding forwards in your chair. You're going to see something no one has seen before except inside the company. And I'm going to set it up by telling you about Bangladesh. My friend Larry went to Bangladesh to check out a school that he had had a relationship with the building of because he
knew what I was doing with code on the go. He checked out the computer classroom. He saw this the ceiling fan spinning so he knew there was electricity. And the teacher said it's fairly reliable. It doesn't cut out too often. And then he said, "Where are the computers in the computer classroom?" And she laughed. She said, "This is Bangladesh. We can't out a school with computers, and
if we could, we couldn't keep them running." So he said, "How do you teach programming without computers?" And she said, "Well, I do it the same way everyone else does it." And the story is so bizarre that we checked it out and verified that she was telling the truth. She writes code on a chalkboard and the students copy it by hand into their notebooks. Then they flip
the page. They write out code and they give it to her to read. Does that sound like a productive way to teach computer programming? >> No, it does not. And then Larry asked a pretty important question. He said, "Do any of your students have cell phones?" And she said, "Of course, they all have Android cell phones, not iPhone. That's for rich people." With Code on the Go,
that entire classroom can be outfitted with computers because they already have them. You don't need an IT department to administer them because the kids take care of it. It's their personal phone. And if that's all we did, it still wouldn't be enough. In 2018, I filled out a form incorrectly when I applied for admission to the College of San Monteo, one of the community colleges in my
county. The incorrect form was that it asked me to list all the courses I'd taken before and I omitted all of my computer science classes from college because I wanted to take the CS curriculum again in 2018. I figured the world may have changed a little bit from the 1970s. And what stood out from that exercise, the one factoid that I still remember was that one of
my professors was proud that she had commissioned a custom textbook with only the five chapters we would cover in her class. She'd saved us money, 50 bucks for five for five chapters. Guess what happened the next semester with a different professor. He says, "Oh, you got to buy the whole textbook, 136 bucks. California is the fifth largest economy in the world. Community college in Sonteo is free
of tuition, but that doesn't matter because that's not the big cost. The big cost is the textbooks. Why hasn't our state commissioned open-source textbooks and told the professors, unless you have a good reason, this is the textbook you are Let more people go to college. Let them improve their lives without being told you can't afford the textbook, go get a job at McDonald's. Thank you. So to
address that and the case of the people in Bangladesh, we have built open source textbooks into Code on the Go. We evaluated a raft of them. We picked the best. They're in that documentation database. We're going further. In the 1990s, I taught computer programming for a company that was known as Ullet Packer. company does not exist anymore. The company with the name is a different company. Hillet
Packard of that era said to the mechanical and electrical engineers, you are not needed and we are not going to fire you. We're going to retrain you to be software engineers. And that's what I did. The curriculum was designed by a gentleman who is an actual NASA rocket scientist. He's working on a satellite that's going to launch in a couple and he is now volunteering with us
to design a brand new curriculum based on the ACM standard curriculum but with some changes. We are obviously adding material on building Android apps. We're adding more material material on software engineering and software tools like for example GitHub. If you're a budding software engineer, you need to know how to use that. And we're deemph deemphasizing some of the more abstract computer science stuff that is not terribly
relevant to day-to-day programming. That's going to be bundled into code on the go next year or so. Which means that if a student has is in the situation I was in in 1974 alone, no one to teach them, kid can't afford school fees, they can still teach themselves. Curriculum's right there. Textbooks are right there. Everything they need is right there. Including an onphone LLM, which is not
as good as Gemini, but it's better than If that teacher in Bangladesh wants to have a good curriculum to teach their students, now they have it in the handset for free available at the school where they have internet and at home when the kids don't. You can use code on the go to program on the nice desktop environment and when you're on the subway going home and
when you wake up in the morning and pick your phone, you can keep programming. You can keep doing this until you fall dead of a heart attack. I am not doing a good job of selling my product. So, that's all a long introduction to what Jim's about to show. Sketch to UI. As this gentleman was asking before, yeah, the keyboard sucks. Doing UI layout is no fun.
So, some folks say, "Oh, just ask an agent to build a UI for you. That's a solution." We've gone in a different direction. We're using a different kind of AI. We're not using generative AI, which is what people think AI means. We're using computer analysis of images. So, here is a handdrawn image. In the center, we have what the user wants for the user interface. And on
the left and right, we have annotations to carry the metadata that you can't put in an image. We've manually set the margins. We're going to automate that away later, but it's not important in the first draft, so we're not worried about it. Now, Jim clicks the detect button. See the green highlights and blue highlights? That gives you immediate feedback as to what the image recognition system saw,
so that you can do a better job if your handwriting sucks. That goes back to the Palm Pilot in the 1990s where people were willing to learn a brand new alphabet to use the device. We think people will be willing to take the feedback they get to learn to do a better job of drawing a square box. Now Jim's going to click update and say, "Yeah, we
really want to do From the image, we've now generated the XML that describes that user interface. The user didn't write a line of code. All they did was took the drawing they would have done on a napkin anyway, annotated it with the information they were going to need anyway and let the computer do the hard work. Completely different kind of AI. And this is the first time
anyone has seen this outside our company. This is still raw. It's not ready for prime time. Although it is in the product, you can use it if you turn on the experimental flag to unlock the hidden features. There's the UI that the software just built from that. The circle was said to be red. The the cancel button was set to be blue. The images Jim picked off
his phone earlier today, whatever those are. >> Egg spam sushi. >> Egg and spam sushi is the top one or the bottom one. >> My dinner plans have just changed. >> So when I ate it. >> Yeah. And we're going to be pushing pretty hard on this idea because it cuts down the amount of typing. And it's not just about cutting down the amount of typing. A
phrase you may or may not be familiar with is semantic gap. It's the distance between the idea stuck up here and the software, the language you're using to implement that. The biggest semantic gap is when you write an assembly code. Who here has spent hours writing assembly code? Yeah, a number of people. I enjoy it, but I have no hair left. Smaller semantic gap if you program
in C, even smaller if you program in Python. With this, the semantic gap goes to zero. Like using generative AI, but in a different way. draw the picture what you were going to draw anyway and let the computer do the rest. Okay, let's uh move on. We're going to be pushing more on this over time. So, in addition to sketch UI to layout, we're going to be
introducing other things you can draw about your program that we can generate code from. One of our goals here, you're going to hear me talk about this a lot during the rest of the presentation, is GTD, get to done. When you're writing software, if you're doing it as a hobby, you're doing it for fun, that's great. But if you're doing it to get paid or to make
your life better or to make your family's life better or your village or your province, you want to get to done. You don't want to screw around with software. You want to get something done. So, a lot of the features in code on the go are built with the idea of getting to done faster. Here's some feedback we've gotten from the Telegram channel, four different people. One
thing that's not up there, but it was kind of hysterical. We were laughing about this in the office. One person said, "Your assistant, your customer support engineer, that's an AI, right? He's too polite and helpful and upbeat." No, that's just how Ben is. I think I've never met him. He might be an AI, but I'm pretty pretty sure he's a person. He never comes to our Friday
meetings, so don't know. >> That's right. Yes. I do want to highlight that item in orange at the bottom one quick responses because that provides a different gloss on the concept of industrial strength. When I finished college in my first job, my friend Bob and I were trying to figure out why the disc drive that was the disc drive interface that was rated to transfer 2 megabytes
a second couldn't make it over 100 kilobytes. So, we opened up the manual and we looked at it and it was misconfigured and the device driver had some problems. We got it up to one megabyte, but we wanted that extra megabyte. So, we opened up the manual. Page three has the company's phone number. Call the switchboard, talked to the engineer. He said, "You got a megabyte? That's
amazing. I've never gotten over 200 kilobytes." We said, "Well, where does the 2 megabyte claim from come from?" He says, "Oh, marketing makes that up. I don't talk to them. They don't talk to me." That model is not such a great model. Companies figured out pretty quick, don't let the users talk to the So we went to a model where you call the phone number and you
talk to first level tech support and they'll escalate if necessary. And then companies said, you know, that's costing money. That's costing money. If there's one thing we don't like spending, it's money. So they said, here's the new deal. The new deal is if you bill more than a million a year with us, you can talk to tech support. If not, you can send us an email. And
then somebody said, emails cost money to respond to. Let's change the deal again and pray that I do not change The new deal was if you spend $50,000 a year, you are allowed to send email. Otherwise, you can submit a web form and good luck, Charlie. We'll see you later. Thanks for being a loyal customer. Don't let the door kick you on the way out. And then
they changed it again. The new approach was we're going to set up a community forum like the old BBS software and you are entitled as a loyal customer to guess the right keywords that other people may have entered when they had the same problem four years ago and see if their solution is like yours or did they just give up and go away? In other words, companies
said, "We're not doing customer support. We're going to put the customer support job on the customers and let them do it. We're just not going to pay them for it." There's a word for that. The word is despicable. If you're a company producing a product, it is your responsibility to support your users. And they said, "Well, we can get away with it. So, we might as well
because our number one responsibility, according to the Chicago School of Economics, is increasing shareholder value, and this is how we do it. It'll make our numbers at the end of the quarter look good, and that's all we care about because I'm going to be out of here in six months anyway. I'll jump to another company, get more money." So, why am I highlighting that? because we actually
offer real customer support by a guy named Ben. How can we afford to do that? We can afford to because we're making a bet that the built-in documentation you saw a few minutes ago is so good, so complete, so fast that you'll get an answer faster than if you wait for Ben to respond during East Coast business hours. Startling, bizarre strategy. We're taking responsibility for the product
we're foisting on you and using that as a way to force us to make it better. friends at Internet in a Box have partnered with us to do something a little unusual. Jim's going to show this in a minute. In fact, why don't you bring it up now and I'll talk over it. >> Oh, yeah. Um, so if you were here last uh last hour, you've heard
about Internet Box. If you're not, Internet Box is a software toolkit for building a soft for building an internet appliance. It'll run on a Raspberry Pi. It'll run on an old laptop. and allows you to choose the content you want exposed in a local Wi-Fi bubble. Why is that important? Well, the reason that these guys do it is because of all these millions of people in the
world who don't have access to the internet. Well, now they can have access to an offline version of the internet, a digital library of Alexandria, if you will. >> Exactly. It is whatever you want on it that they have preconfigured the ability to suck in. The key thing here is who gets to do the choosing. This offline internet is not content shoved down your throat by Mark
Zuckerberg. It is not right-wing racist garbage shoved down by somebody whose name I shall not mention imply company. It is the content that you have decided you want to share. But the internet in a box has some issues. You can buy it at the Wikipedia merch store. I didn't even know they had a merch store. And they're also out of stock, but it's in the 60s and
above. And for people living on $2 a day, that's a big ask. It's also a little tricky to keep the content updated because it's offline. So, you have to physically move the device to a place that has an internet connection. So, we went to the internet in a box people. We said, "Let's partner up. We know Android, you know, internet in a box. Let's port that entire
stack to the hundreds of millions of junk phones sitting in people's drawers in a shoe box in the back of the coat closet on the second shelf where no one will ever see it. It's e-waste. It's that old phone that got a scratch because you put it in your pocket with the keys and the coins. So now instead of being e-waste, parents can say, "I'm going to
configure the internet that I want my children to have access to." No chat GPT. They can't cheat on the homework. No social media. No trolling, no digital disinformation by robots, no sex trafficking, no drug dealing, no porn. Takes all the fun out of things. But it's not my job to tell the parents how to configure things. It's my job to give them the tools to manage their
lives. If you're a teacher, you can use Internet in a Box on Android to provide a safe internet bubble in your classroom so your students can research data from Wikipedia, Open Street Maps, the other sources that you have chosen without being exposed to the internet. If you're running a coffee shop and you have that one customer who insists on viewing horrible, horrible stuff while everyone else is
feeling more and more upset and threatening to quit, you can say, "Well, you can watch that somewhere else, but in this coffee shop, it's just not available. We're trying to give control back to the people instead of the billion-dollar corporations and the billion-dollar people whose interests are not aligned with yours." So, here's an example that uh feed of the Wikimedia 500 is on this phone. If you
want to try connecting to it, go right ahead. Uh the Wi-Fi SSID is, I think, a OnePlus 6T. I believe this phone will support somewhere between five and 10 simultaneous users. And the Wi-Fi password is 59095909. Uh but it is a little bit tricky. Um, once you do that, you have to go to a specific internet address and a port number. So, come see me afterwards if
you want to give it a shot. There's still some rough edges. We need to make this a bit easier. Also, right now, installing it requires you to be a geek and we really need to move that to be an APK. Yes, sir. Couldn't you do like Wi-Fi? >> There are probably lots of ways of fixing this. I don't know all the details. >> Um, terminology. >> Now,
you might wonder why we are dealing with this problem because our goal is to provide a native IDE. What does that have to do with offline internet? Well, it's a Trojan horse because Internet in a Box on Android comes with code on the go, the executable and the source code so you can go mess with it. And it also comes with a little place where you can
upload your apps and share them with your friends on that little box. So, let me tell you about a thought. Let me invite you to join a thought experiment. Let's say you ran a giant corporation that had a chokeold on the distribution of Android software and some very nice gentleman from the government came by. When I say government, I'm talking about a bunch of armed thugs who
are mafiosos. Excuse me, I can't use that word. They are organized criminals. And here's what the guy says. He says, "This is a great company you got here. I The president loves your company. He wants you to succeed, but it would be a terrible shame if you started to have problems with regulatory affairs and and your monopoly became an issue. We want you to succeed. And the
problem is you're distributing an application that tells neighbors when our armed thugs who are only trying to deport people of brown skin and shoot to death the people with the white skin are in the neighborhood. We don't want that app. We want you to get rid of it. But it's up to you. It's a nice company. We don't want any any trouble yet. That happened. Apple and
Google took off the ice tracking applications because the government said, "You may not share this with people." They came up with rationale for it. But we all saw the results. An ICE agent shot a woman through the side door of her car, lied about it, and boasted to his friends that he put six shots into her. And that man was not prosecuted. This is not the America
I want to live in. This is not what my dad fought in World War II for. So, code on the go on Android uh internet box on Android has a second reason to exist. It is to break the monopoly over app distribution and say you get to choose what apps you want to make available. Not Bill Gates, not Mark Zuckerberg, not the guy whose name I'm not
going to mention. Okay, let's move on to the next part. Uh this is I think the second to last slide. I hope it is because my voice is going to give out soon. Back to the idea of industrial strength IDE. When I was at Zinga, the gaming company that did uh Farmville and uh Words with Friends and draw something. One of my co-workers stood up in a
meeting and he said, "We should switch from PHP to Rust." And I said, "That is a terrific idea. I love that idea. Rust is a much better language. Tell me what's your home phone number. And he said, "Why?" And I said, "Because when our data center goes offline due to a bug in the Rust compiler that we have no commercial support for, we're going to call you.
And we know it's costing us tens of thousands of dollars a minute to be offline because I took us offline for 10 minutes last week. And trust me, I know exactly how much that cost." It was so upsetting to one of my co-workers, I had to take him out for repair ice cream. Really, it was for him. but it wasn't If you're dealing with open source software
that has no roadmap, no plan, no guarantee that somebody's going to take your bug report seriously, that's not industrial strength. That's hobbyist strength. And I have nothing against hobbyists, but we need to run a company and keep it functioning. So, here's Code on the Go's road map. Jim and I started this in September of 2023. We said it's going to take 18 months to two years to
do anything interesting because less than that and it's too easy. Somebody else would have done it. More than that, we're going to run out of interest and go do something else. It took us two years and a month. We released in October of 2025. That release was codenamed the dancing bear because it was amazing that it dances at all. I have a great video, but I'm not
allowed to show it anymore. Release one is coming out six months after release zero. Every one of the releases is spaced six months apart. In the 50 years I've been doing this, I found out the only way to get software out the door is to set a deadline and say we're shipping on this date. So every six months we do a major release. Release one is industrial
strength. What a surprise. Releases two and three are about helping our users get to done faster. GTD1 is a bunch of small changes that put together make a much nicer environment. GTD2 is a small set of big changes that do the same thing. Release four, fractions, is about fractionalizing our program from the massive APK it is now into a core and a bunch of plugins that allow
you to treat it as a toolkit to build the IDE that you want. But there's more than that. By offering this as plugins, if you don't like our Cotlin plugin, you can pick someone else's. You can write your own. That's called competition. If we were a commercial company, if I had a fiduciary responsibility to the investors, I wouldn't be allowed to help competition, I'd be my it
would be my job to stop it, to ask the government to regulate us or whatever. We're not we're a nonprofit. We don't answer those authorities. I'll talk about that a little bit more in the last And the last release, NG, that's next generation. When I look back over my long and very boring career, I don't see as much innovation in idees as I would like to see.
The last big bang in IDE was called Turbo Pascal in 1983 from Borland. And Borland was striped of its best employees because Bill, Mr. Bill, would send limousines over to Borland. And in the limousine, an executive would be there with a checkbook and a parade of Borland employees would come in and each one would be shown a check for a million dollars and told, "This check is
valid until you leave this car." That's what happens when you have giant companies with massive market power. They can just strip mine your employees Anyway, that was the last big innovation for release five. I think there are better ways to represent data than text files. We're not exploring that. I want to start exploring some of these ideas and make code on the go an environment in which
computer scientists and software engineers can start to explore some ideas that haven't really been looked at much. And you might think, oh, seriously, agents, agentic AI, that's a big innovation, but it's just frittering around the edges. It's having an agent stand in for you typing on the keyboard. That's innovation, but I'm looking for something more fundamental. Okay, last We started code on the go to make the
world better. In my religion, there is a phrase that translated into English is that our job here is to heal the world. And when you die, you're not going to be graded on how loudly you prayed or whether you believed. The only thing you'll be judged on is did you make the world better by your presence? There are a lot of things you could do to make
the future better. But if you don't choose something, you will get the future that the billionaires have chosen for you. And we know how that movie ends. It is Arnold Schwarzenegger drowning in a vat of liquid metal. No, actually that was Patrick. What was that guy's name? Terminator 2. I mean, seriously, this week, the Pentagon tried to strongarm Anthropic into okaying the development of killer drones that
can assassinate you without a human in the loop. Put in a photo of your face, click the go button, you're dead in 20 minutes. This is insane. I don't want the Terminator future, and I don't want the Robocop future. I want the resources being used to make the I have a long story about that, too, but we're out of time. So there are things you can do
to make the world better. You can remember that as engineers, we fix things that are broken and the politicians that we have now seem to have other priorities than bringing us into the future. There is one thing you can do to help that's not on this slide and it goes back to a question that you should have been asking during the entire presentation I gave and that
is who's pulling this guy's strings? Always ask that of a nonprofit. What is your motive? A lot of nonprofits are actually astroturf campaigns by big companies. So, who's pulling my strings? And the answer to that has been staring at you the whole time. I am. I had a 50-year career, made a lot of money, partly because shorts are cheaper than pants. I'm a very cheap guy. And
I'm not just talking the talk, I'm walking the walk. Every dime of my fortune is going into this. I'm pushing it as fast as I can, as hard as I can, liquidating assets to take care of this problem because dying rich is a sin. A lot of people out there have a lot of money. They could fix problems. They choose instead to convert it into gold coins
in a bathtub and say, "Oh, I'm rich. This is not helping." However, I'm not that rich. I'm not a billionaire. Didn't do that well. These are cheap shorts. If you have a relationship with somebody who can help fund this organization, I can double the speed at which we can fix these problems. If you do, cool. Come up later and talk to me or contact me on the
website. If you don't, that's also cool. Not everyone has a rich uncle. There are other things you can do on this slide to help fix the future. If you don't do it, nobody will. There's no plan B. There's no cavalry coming over the hill in this room. We fix the future or the future fixes us. That's my presentation. Let's take some questions. >> Okay. Well, so far
we don't have any questions. Okay. Uh yeah, we're going to bring mics back so we can get it on the live stream. Um, does your signing mechanism that you mentioned or does it or will it address plan of Google to require u all certified signatures on all inrite apps on certified Google devices starting in September? The keys store plugin has nothing to do with that. But we've
discussed internally the possibility of writing a plugin that would help you register for Google with an ID. That's the best we can do. We can't tell them how to run their business. We can hope that the European Union says that's obviously anti-competitive behavior. Will that happen? I don't know. I can't predict So, all we can do is help people work with it. Uh, next question. Your slide
says that you are looking for early adopters to test features, documentation, reference, etc. But I'm not seeing a contribution link on the slide. How would we reach out if we were interested in helping with any of these things? >> Uh, send email to info appdev forall and it'll come to me. >> We are, now let me be clear, we are a nonprofit. We are not a 501c3
nonprofit. Contributions are not taxdeductible. They will count to us as income. But since we don't make any money, there's no tax to be paid. So if you're thinking of contributing, take off 30% because you're going to still be paying taxes on >> Any other questions? >> I with regards to the um the Android developer verification thing, I believe there were ways to um it won't require registration
for um apps installed with the Android debugging bridge. Have you looked into that? Um, I have not. We do have certain aspects of the Android Debug Bridge available on the phone, but some parts of it only work if you are associated to a Wi-Fi and some parts of it only work from the outside. >> Okay, >> Google has said that they are going to do a thing
to address people who don't want to register, who don't have a government ID, who don't have 25 bucks to spare. That's all that they've told us. They seem to be pushing full speed ahead with the part about you must show a government ID and you must give us money so that we can turn off your apps remotely whenever we decide that we don't like what you're doing.
Nice business you got here. Be a shame if something bad happened to it. They haven't said boo about this other thing. >> Exactly. There are solutions that are great for geeks like you and me, and it sounds like you're better at it than I am, but for the vast majority of users, asking them to flash a custom ROM is not >> Yeah, it's it's we're seeing more
and more phones get locked down and freedom being taken away from more and more people. It's a shame. What's the entrylevel phone Android that if I were to hand to some kids to start playing with and we were to start something, what would be the standard? >> That is a great question and I say that because I already thought about it. Uh the question is, is there
an entry-level phone? What is the lowest level phone that runs code on the go? So when we were in n when we were in Nigeria, I went to a local phone store and I told the guy, "Get me the worst phone you have." And he comes back with a perfectly fine phone. And I said, "No, worse than that." He comes back with a less fine phone. And
I said, "Seriously now, I want the worst phone." So he sends a runner off to the warehouse who brings in this dusty box. And on the front it says six gigabytes of RAM asterisk. No, it's two gigabytes of RAM. The other six are using flash memory for virtual swap. And it turns out it wasn't running Android. It was running Android Go, a stripped down version. So we
were saying this ain't going to happen. It happened. It can compile whatever you want on that phone. It'll just be slow. Yeah, we were kind of amazed. But you know, that goes to the very first point I made that when people say phones aren't powerful enough, that is just hogwash. Of course they are. It's just a compiler. It's just a tool chain. This is not landing a
man on the moon and returning him safely to Earth. So the answer to your question is any phone built in the last 5 to 10 years is probably going to run this fine. Give it a try. If not, let us know because maybe we can do something about it. the user interface and also the insistence that the integrated development environment must go online constantly to check for
updates to make sure that what worked for you when you went to bed can stop working when you wake up and you can spend the first hour figuring out why some guy in a country you've never heard of changed a dependency you didn't know you had and now your software doesn't work and you get to fix it. So we see you next year. >> I'm not bitter.
Not at all. >> You plan to be here next year? Is that your goals? >> Why do you have news about Is there a drone coming to assassin maybe? >> I mean, >> actually the last time I gave a talk at scale was I think 2007 when I was working for Sleepycat and we were by being acquired by Oracle on Monday and I was giving a talk
on Saturday and they told me don't talk about the acquisition. So I I rehearsed in my mirror in the hotel room the night before. How am I going to answer the question when it comes up? Some guy sitting in the front row asks, "What about these rumors that your company's being acquired by Oracle?" And I said, "Let's be clear. Scale is a wonderful con uh uh wonderful
conference, but it's a small town conference on a Saturday in Pasadena, wherever it was. Do you think I would be authorized to disclose an acquisition by Oracle?" So, either the news you've heard is false, and I'll tell you truthfully, it's false, or the news is true, but I'm going to lie and say it's false. But either way, the answer is false. Another question that did pay for
remodeling my bathroom, though. My stock options converted into Oracle options and vested overnight. >> They didn't lay out. And it's interesting when they bought the company, it wasn't because they cared about what we made. It was Berkeley DB. Sleepy Gat was the Berkeley DB company. It was because they wanted the brain power of Mike Olsen to tell them how to compete with open source and he said
you just give up 90% of your revenue. They didn't like that. So they went with plan B which was they bought Sun Microsystems so they could own my SQL. >> Yeah. So uh you were talking about trying to break the monopoly. I don't recall you mentioning Froid and I was kind of curious what you think of Froid just as from the perspective of Monopoly breaking and then
kind of separately do you have in any thoughts about making that part of the app distribution thing that you were talking about like sharing apps that people build like automatically publish it to a self-hosted Froid. Just a thought. >> That is a brilliant idea for a plugin. Somebody should write that plugin and we will be happy to feature it on our page. Let a thousand flowers bloom.
I'm not sure if I'm allowed to say that. Is that considered bad to re re cycle that phrase from the cultural revolution in China? Maybe I shouldn't say that. Um, to be clear, I'm not setting the standards for how people use code on the go. We are not going to tell you what to do. And if you want to build a plug-in to do something cool or
horrible, that's on you. You answer to whoever authorities in charge, not us. We are not going to be arbiting taste. When I was at Zingga, that gaming company I talked about, I worked on trust and trust and safety. And I said, "What kind of material do do you deal with down here in the basement, which is where they were?" And lady looked at me and said, "I'm
not going to show you." I said, "Why not?" She said, "It would turn your stomach. You would need counseling. We last about three months and then we have to go. I'm not going to subject you to this." And so, because of that, I decided that code on the go will never have a social component. Not from us. You can write one, but we are not going to
do anything that allows for usergenerated content to be spread. Because the experience at Zinga was every time you allow people to spread content automatically, it is used for drug dealing. It is used for prostitution, it is used for child sex trafficking. Those folks have their octopus tentacles everywhere and they'll find it and they'll use it. And then guess who gets the blowback? So, if you want to
add automated distribution features, that's wonderful. And we will not stop you and we will feature you on our homepage. But we're not going to do it. If we do, we have to set up the censorship mechanism. I don't want to be in the middle of that. More questions. If there are no more, thank you very much for coming. Let's go get pizza. >> There is game night,
so please head over to the other building and join us. It just started, so No, they just told me to announce the the game. I don't I haven't heard that. So, okay.