WEBVTT

00:00:00.000 --> 00:00:03.680
On our last episode of Linus Tech Disasters,

00:00:03.680 --> 00:00:10.440
one of the custom liquid-cooled gaming machines in my home rack sprung a leak, pouring gallons of water

00:00:10.440 --> 00:00:13.880
over every system beneath it. And my initial thought was,

00:00:13.880 --> 00:00:18.240
oh, I forgot to screw in a fitting. But as it turned out,

00:00:18.240 --> 00:00:23.160
despite taking precautions to prevent it, it wasn't a fitting not being screwed in.

00:00:23.160 --> 00:00:27.200
It was a fitting completely corroding off of the block.

00:00:27.200 --> 00:00:30.760
Maybe some of the metals in our loop are incompatible.

00:00:30.760 --> 00:00:34.200
Nope, after spending hours inspecting them,

00:00:34.200 --> 00:00:37.720
every other system's fittings were spotless,

00:00:37.720 --> 00:00:43.160
not a hint of corrosion to be seen. I was so dumbfounded that I turned to the YouTube

00:00:43.160 --> 00:00:46.720
comments for help and it actually worked.

00:00:46.720 --> 00:00:51.760
There was a strong consensus on what the problem was. So today, with the help of Pulseway,

00:00:51.760 --> 00:00:56.120
who sponsored this video, we're gonna hopefully rectify this silent killer

00:00:56.120 --> 00:01:01.200
and add a remote monitoring system so that if there ever is another leak,

00:01:01.200 --> 00:01:05.600
hey, at least I'll know about it before I come home at the end of the day

00:01:05.600 --> 00:01:07.840
and find that my computer peed itself.

00:01:18.840 --> 00:01:24.040
The first really good community theory was that the fancy fuel hose we were using as our tubing

00:01:24.080 --> 00:01:29.200
might use steel webbing to reinforce it, which could introduce galvanic corrosion,

00:01:29.200 --> 00:01:32.960
but this was actually due to a miscommunication on my part.

00:01:32.960 --> 00:01:39.280
It's not fuel hose, it's a general purpose hose, and it uses a textile reinforcement rather than steel,

00:01:39.280 --> 00:01:42.280
so we could scratch that one.

00:01:42.280 --> 00:01:45.280
Another interesting theory was that a microcrack

00:01:45.280 --> 00:01:50.880
in the delrin plastic of the GPU block might have allowed the steel screws that hold it down

00:01:50.880 --> 00:01:55.640
to come in contact with the water, but a close visual inspection reveals no cracks,

00:01:55.640 --> 00:01:59.560
and the threading for all of those screws is completely clean,

00:01:59.560 --> 00:02:04.720
which suggests that no corrosion occurred there. A third theory was that a flaw in the plating

00:02:04.720 --> 00:02:09.760
of the affected fittings could allow galvanic corrosion to occur with the underlying metal,

00:02:09.760 --> 00:02:14.080
which would explain why some of them were eaten while others remained perfect.

00:02:14.080 --> 00:02:18.040
But the thing is, when you or EK in this case

00:02:18.040 --> 00:02:22.360
is designing anything that involves metal and water, galvanic corrosion is something

00:02:22.360 --> 00:02:27.680
that they carefully consider. So, while the most obvious way to avoid corrosion

00:02:27.680 --> 00:02:32.080
is to never mix metals, there are many metals that are safe to mix,

00:02:32.080 --> 00:02:37.840
especially when they're not directly connected, and the underlying material of these fittings is brass,

00:02:37.840 --> 00:02:44.080
which, if you consult this anodic index, should be fine with the copper and other metals in our loop.

00:02:44.080 --> 00:02:48.760
Should be fine. The story changes when you apply a voltage,

00:02:48.760 --> 00:02:52.080
and well, we obviously weren't intentionally doing that

00:02:52.120 --> 00:02:57.600
when you have a large power draw in one spot, like a couple thousand watts of computers in a rack,

00:02:57.600 --> 00:03:02.960
and a low power draw in another spot, like a couple hundred watts from a pump,

00:03:02.960 --> 00:03:08.880
you're gonna end up with a difference in voltage between them, which accelerates corrosion dramatically,

00:03:08.880 --> 00:03:12.720
and can make compatible metals far less compatible.

00:03:12.720 --> 00:03:18.480
But the good news is for this solution, oh boy, we don't have to worry about the details.

00:03:18.480 --> 00:03:23.400
This is an isolation transformer, and you might be familiar with transformers,

00:03:23.400 --> 00:03:27.080
you would use one to take a low voltage and make it a higher voltage, or vice versa.

00:03:27.080 --> 00:03:32.360
Sure, like to run your sewing machine from Asia. Yeah, if you're in a different country, that's a big one.

00:03:32.360 --> 00:03:35.800
In this case, it's 120 volt on both sides.

00:03:35.800 --> 00:03:39.360
You see that? Made in Canada, thanks Hammond Manufacturing,

00:03:39.360 --> 00:03:42.760
but it decouples the circuit giving us galvanic isolation,

00:03:43.600 --> 00:03:47.120
or preventing a loop. So in a nutshell, we're taking anything

00:03:47.120 --> 00:03:51.200
that's plugged into this guy, and we're giving it absolutely no path

00:03:51.200 --> 00:03:55.480
back to the main panel. It's almost like Wi-Fi for your electricity.

00:03:55.480 --> 00:04:00.040
I feel like our analogies are making this worse. The point is, no voltage difference.

00:04:00.040 --> 00:04:01.480
Wrap it before you tap it.

00:04:04.160 --> 00:04:07.960
Where do you want to put this thing? How about up here? On top of the tank?

00:04:07.960 --> 00:04:12.320
The tank full of water? I mean, it should be fine, right? Yeah, I mean. Realistically, while we're here,

00:04:12.320 --> 00:04:15.920
I should probably have the pumps running off the UPS. You'd have to run an extension cord

00:04:15.920 --> 00:04:20.320
all the way over there. Conveniently. Is that an extension cord that's all the way right there?

00:04:20.320 --> 00:04:23.880
Yeah, I really don't think that's longer than that. I don't think it's worse than that. Yeah, I don't think it's longer than that.

00:04:23.880 --> 00:04:27.720
Look how long that is. That's a 25-footer. It'll work. You want to bet everyone's lunch on it?

00:04:27.720 --> 00:04:30.960
If I'm right, you pay for everyone's lunch. If I'm wrong, nothing happens.

00:04:30.960 --> 00:04:34.880
Fine. It has to go all the way down to plug into the bottom UPS.

00:04:34.880 --> 00:04:38.440
It has to be managed. Sure. He's literally trying to cable manage it

00:04:38.440 --> 00:04:41.480
as much as possible to prevent it from reaching.

00:04:41.480 --> 00:04:45.600
Dude, these are so satisfying. I will admit, they are quite good.

00:04:45.600 --> 00:04:50.880
LTTstore.com, let's go. That might be the best thing you've ever done.

00:04:50.880 --> 00:04:54.360
My kid's right there. What? No, he's not. Probably somewhere.

00:04:54.360 --> 00:04:57.600
It's gonna be so funny when you lose. Wow, it reaches.

00:04:57.600 --> 00:05:01.520
No way, no way. You're buying everyone's lunch. Get wrecked.

00:05:01.520 --> 00:05:06.360
Fine. Even though I owe him lunch, technically? Yeah.

00:05:06.360 --> 00:05:10.440
One of the big things that you guys said was, hey, no matter what caused this problem,

00:05:10.440 --> 00:05:15.240
you should really have monitoring in place so that if it were to ever happen again, you would know.

00:05:15.240 --> 00:05:20.880
And on top of that, we can make automation. So if there's a leak, shut off the pumps.

00:05:20.880 --> 00:05:26.560
Yeah, it's going to be good. Theoretically, everything is fine now.

00:05:26.560 --> 00:05:30.240
I mean, but. Maybe. But that doesn't mean we're going to stop here.

00:05:30.240 --> 00:05:33.600
OK, what's next? Grounding. Grounding.

00:05:33.600 --> 00:05:38.080
All right. You're not going out for a week. Says who?

00:05:38.080 --> 00:05:43.440
You going to stop me? I have your stepdad's number. Keyword being step.

00:05:43.480 --> 00:05:46.880
Are you going to take that? He might actually see this.

00:05:46.880 --> 00:05:50.200
To take things to another level, we're going to follow another recommendation that

00:05:50.200 --> 00:05:56.600
came up a lot in the comments. Some of you noticed that I never grounded my rack.

00:05:56.600 --> 00:05:59.880
While the systems themselves are theoretically grounded

00:05:59.880 --> 00:06:06.560
using the third prong of the plug that we plug into them, the rack itself is not necessarily connected to ground.

00:06:06.560 --> 00:06:10.960
So we've got a whole bunch of these grounding leads.

00:06:10.960 --> 00:06:14.200
And then what? We just connect these from the back of every chassis

00:06:14.200 --> 00:06:17.720
to the rack? You could. But we also got this. Here, catch.

00:06:21.720 --> 00:06:24.960
Like a grounding bus bar. So you just stick that in the rack

00:06:24.960 --> 00:06:29.240
and then screw all the little thingies onto it. Keyword management. No, no, we got this. We got this.

00:06:29.240 --> 00:06:32.320
OK. Oh, that just barely fits. Yeah, so that could go right there.

00:06:32.320 --> 00:06:36.360
It's almost like it's made for a rack. Naturally, we have to ground our grounding bar

00:06:36.360 --> 00:06:41.880
to something for it to work as a grounding bar. Unfortunately, the rack is a bit of a ways from the panel.

00:06:41.920 --> 00:06:45.760
And our electrician who is going to do this properly for us is unavailable today.

00:06:45.760 --> 00:06:50.160
So instead, we're going to have to open up the panel and tie the wires directly into the grounding bar.

00:06:50.160 --> 00:06:57.920
It also means I didn't have the correct wire. So Linus happened to have these two pretty thick gauge wires.

00:06:57.920 --> 00:07:01.160
So we're going to use those instead. I also didn't have the correct connectors.

00:07:01.160 --> 00:07:06.760
So I cut these Hammond ones, butt connected them onto the long wire, and now we have the right connector.

00:07:06.760 --> 00:07:10.360
Is this how you should do this? Probably not. But it's just a ground.

00:07:10.360 --> 00:07:15.960
It's probably right, Rhys. I don't know what I'm doing.

00:07:15.960 --> 00:07:20.360
Got it? Hey, it worked. There we go, grounded.

00:07:20.360 --> 00:07:24.760
I'm going to let Linus be the one to open the panel and stick his fingers in there because it's his house.

00:07:24.760 --> 00:07:29.560
So we're just going to leave this for now. Hammond sent us these sick little grounding kits,

00:07:29.560 --> 00:07:33.760
and they have little just blade connectors. So you hook one set up to the server,

00:07:33.760 --> 00:07:37.480
one set up to the grounding bar, and then if you need to take the server out for some reason,

00:07:37.480 --> 00:07:41.360
you can easily disconnect it. Let's try it with one of Linus's Nasty units here.

00:07:41.360 --> 00:07:42.360
Let's screw that.

00:07:44.600 --> 00:07:50.000
Look at that. Wow. Now we just repeat like 10 times.

00:07:50.000 --> 00:07:53.320
While Rhys works on getting all the systems grounded, let's talk sensors.

00:07:53.320 --> 00:07:59.100
We have three different types. Starting with our leak sensor, although calling it a sensor might be a bit generous.

00:07:59.100 --> 00:08:02.640
This is basically just like two wires. You apply voltage to one side,

00:08:02.640 --> 00:08:05.920
and as your leak bridges the gap with water, it creates an electrical connection

00:08:05.920 --> 00:08:09.400
between the other side, and on that side, you're just sensing for any voltage.

00:08:09.400 --> 00:08:14.560
So when there's no water, it should be zero volts-ish, and when there is water, say if we did five volts

00:08:14.560 --> 00:08:18.080
on this side, or probably should like one, or two volts on this side. So that works.

00:08:18.080 --> 00:08:21.640
And then we've got a flow sensor. This one is really just to tell us if, say,

00:08:21.640 --> 00:08:25.360
the water runs out, or the pump stops working, which would obviously be bad,

00:08:25.360 --> 00:08:28.720
because then the water inside the computers would boil, which might cause a leak.

00:08:28.720 --> 00:08:34.080
This way we can notify ourselves if the water is not flowing, and then we've also got a little float switch.

00:08:34.080 --> 00:08:37.960
Very simple. This one, if it's at the bottom current passes, if it's at the top current doesn't pass.

00:08:37.960 --> 00:08:41.280
So we stick it in the water tank here, at the top,

00:08:41.280 --> 00:08:43.440
and we can tell if it's full or not.

00:08:44.400 --> 00:08:49.760
I should do not, this is how we're gonna test it later.

00:08:49.760 --> 00:08:54.960
But before we can install it, we have to drain the loop, which is going to be interesting.

00:08:54.960 --> 00:08:59.600
This valve is open, and nothing is coming out.

00:08:59.600 --> 00:09:03.600
I saw a comment. Somebody said they had experience with hose bibs like that,

00:09:03.600 --> 00:09:07.880
and they said that some of the manufacturers started using really crappy cheap materials in them

00:09:07.880 --> 00:09:11.240
that are not necessarily compatible with plumbing, and I just looked up in there,

00:09:11.240 --> 00:09:15.360
and you know what I saw? Corrosion. I read the comment, and I was like,

00:09:15.360 --> 00:09:17.160
this is too stupid to be true.

00:09:18.600 --> 00:09:22.440
Linus! Guess what doesn't happen when you open this hose bib?

00:09:22.440 --> 00:09:23.760
Oh, no.

00:09:25.640 --> 00:09:29.960
You're ballsy. Let's take your phone light up there. Uh-oh. Can you imagine if that's literally

00:09:29.960 --> 00:09:33.240
what caused all of this? You've gotta be kidding me.

00:09:33.240 --> 00:09:37.400
You know, whole room water cooling was exactly the same thing.

00:09:37.400 --> 00:09:42.600
It was a vendor cheeping out on the parts. That reservoir was supposed to be stainless steel.

00:09:42.600 --> 00:09:46.800
I mean, you should've just used a plastic one. But it wasn't made of stainless steel.

00:09:46.800 --> 00:09:49.880
I used a plastic one. Yeah, you also were the one who specced this.

00:09:49.880 --> 00:09:53.320
Supposedly brass hose bibs, smart guy. I bought it from a plumbing store.

00:09:53.320 --> 00:09:56.560
So it looks like we were both bamboozled. You don't get to be all...

00:09:56.560 --> 00:10:01.360
Yeah, but at least my idea was like a good one. It's also good that I got this particulate filter.

00:10:01.360 --> 00:10:05.960
Yeah. It's plastic, actually. Oh, it's a polypropylene, I think.

00:10:05.960 --> 00:10:09.880
Nice. Oh, no, it's polyester. It's like a t-shirt, basically. What are these made of?

00:10:09.880 --> 00:10:14.080
Ah, well, those are metal, but that's the same type that's already in the loop. Because I don't feel like going to the plumbing store

00:10:14.080 --> 00:10:17.520
and because I don't trust those things ever again, I'm going to make my own valve.

00:10:17.520 --> 00:10:21.720
I've got a little guy and a little valve.

00:10:21.720 --> 00:10:23.120
Oh, look, I fixed the leak.

00:10:25.320 --> 00:10:26.920
Just gonna get water everywhere.

00:10:33.200 --> 00:10:37.320
Ooh. We have to make sure that we put it the right way.

00:10:37.320 --> 00:10:41.760
There's these very helpful arrows that I should follow.

00:10:41.760 --> 00:10:46.160
Oh, look, I even drew arrows on the tubes. So I just matched the arrow with the arrow

00:10:46.160 --> 00:10:47.680
and then I can't screw it up.

00:10:49.440 --> 00:10:51.680
Hey, Reese, you leak tested this filter, right?

00:10:56.080 --> 00:11:00.280
Filter installed. Is that closed? Beautiful.

00:11:00.280 --> 00:11:06.000
Water in the filter, yay. The sensors are great and all, but they don't exactly work without something to read them.

00:11:06.000 --> 00:11:12.160
In the past, we've bought little like relay or input output boards for Z-Wave or Wi-Fi on Amazon.

00:11:12.160 --> 00:11:17.560
But if you've seen anything about how Linus's wireless has been working, eh, I wanted something hardwired.

00:11:17.560 --> 00:11:23.560
And then I stumbled upon a company called Sequent Micro Systems, which sounds super nerdy

00:11:23.560 --> 00:11:27.360
and to be honest, it kind of is. All they sell are these custom home

00:11:27.360 --> 00:11:30.960
and industrial automation boards. And this one, which is a Raspberry Pi hat,

00:11:30.960 --> 00:11:35.400
just plugs into a Raspberry Pi. Weep, this one has 16 universal sensors on it.

00:11:35.400 --> 00:11:39.840
That means we could handle all seven of the gaming computers in here for leak sensors.

00:11:39.840 --> 00:11:43.560
We could put a couple on the floor, our two flow sensors and still have room to spare.

00:11:43.560 --> 00:11:47.720
It was a little complicated to get set up, but they actually had really good customer service.

00:11:47.720 --> 00:11:51.640
The guy was emailing me back within the hour, responding. They have a bunch of different boards.

00:11:51.640 --> 00:11:55.480
You can get ones that have some sensors, some power outputs, you can get ones that have MOSFETs,

00:11:55.480 --> 00:11:59.840
you can get ones that have just cereal. Like, they make a lot of different products

00:11:59.840 --> 00:12:05.280
and it's actually pretty awesome. This one in particular requires separate power.

00:12:05.280 --> 00:12:08.840
So you plug in a five volt power lead here

00:12:08.840 --> 00:12:12.280
and then it powers the Raspberry Pi through it directly.

00:12:12.280 --> 00:12:16.360
There's also a battery for a real time clock that's on the board that they use for hardware monitoring.

00:12:16.360 --> 00:12:21.200
So if the Raspberry Pi becomes unresponsive, this board can reboot the Raspberry Pi.

00:12:21.200 --> 00:12:26.000
It's one of those things where you wouldn't really think about it for a house setup, but if you were stuffing this in a wall somewhere

00:12:26.000 --> 00:12:29.240
for industrial controls, you want to make sure this thing is operational

00:12:29.240 --> 00:12:33.360
if there's an issue, it fixes itself. Imagine if you had like 200 of them, right?

00:12:33.360 --> 00:12:37.360
In a perfect world, I just hooked that sensor pin right up to this board and be done with it.

00:12:37.360 --> 00:12:40.480
But unfortunately, electronics can sometimes be a bit more complicated.

00:12:40.480 --> 00:12:45.280
In our case, we need to add something called a pull-up resistor. And that just makes sure that when there's no pulse

00:12:45.280 --> 00:12:50.880
being sent, the sensor reads a high signal, like close to our voltage around five volts.

00:12:50.880 --> 00:12:55.240
If we didn't have that, the sensor wire can actually sometimes float between ground and five volts,

00:12:55.240 --> 00:12:59.920
which looks a lot like a pulse, which obviously we don't want.

00:12:59.920 --> 00:13:05.120
The pull-up resistor makes sure it's only ever reading the correct value, so it's very important to add.

00:13:05.120 --> 00:13:09.320
If you had an Arduino that was reading this sensor instead, they actually have a pull-up pin mode,

00:13:09.320 --> 00:13:12.880
which does it on the board. But in our case, we're just going to add one

00:13:12.880 --> 00:13:16.080
on this breadboard, and in the future, we'll just solder it into a piece of wire

00:13:16.080 --> 00:13:17.080
and be done with it.

00:13:23.680 --> 00:13:27.160
Does the flow sensor work? Yeah, we literally just finished wiring it.

00:13:28.160 --> 00:13:31.400
Is it in like a home assistant, or like, what is even going to control this?

00:13:31.400 --> 00:13:37.160
No, it can be, if you want. Right now, I just wrote a little script.

00:13:37.160 --> 00:13:40.400
Obviously, we have to interpret the data, because all we're getting is pulses.

00:13:40.400 --> 00:13:44.680
Luckily, they just give you a formula. You take the pulses per second, or hertz,

00:13:44.680 --> 00:13:48.760
and divide by 5.5, that's your leader per minute. So I made a little script to do that.

00:13:48.760 --> 00:13:55.120
Hey, nine liters per minute. So we're getting roughly, almost exactly, 50 pulses

00:13:55.120 --> 00:13:58.600
per second, 50 hertz. The heartbeat of the whole setup.

00:13:58.600 --> 00:14:04.560
And then if we go to the other sensor, which I did flow to, it's off right now.

00:14:04.560 --> 00:14:09.480
Right, no flow. Oh, no flow to the pool right now. So what we'll do is adjust this script

00:14:09.480 --> 00:14:13.720
to send that data to the PulseWay API, and then we can make whatever workflows we want

00:14:13.720 --> 00:14:17.520
in PulseWay, and then on top of that, we can just make a little script

00:14:17.520 --> 00:14:21.160
that sends it to Home Assistant, if you want. Super cool. Because Home Assistant also allows, like,

00:14:21.160 --> 00:14:25.200
custom components, so you can have it on your phone. Now that the pool loop is refilled and running,

00:14:25.200 --> 00:14:28.520
we should be able to take a look at our flow from both of the pumps.

00:14:28.520 --> 00:14:32.560
I found this cute little terminal app called TTYplot, and you can plumb data from a script to it,

00:14:32.560 --> 00:14:36.960
and it makes a little graph in your terminal. It's very cute. This top one is the local loop,

00:14:36.960 --> 00:14:41.600
so if I adjust the speed on the pump here, right now it's on low.

00:14:41.600 --> 00:14:45.440
If we go to high, hey, look at that.

00:14:45.440 --> 00:14:50.760
This is the outdoor loop, only pushing around five liters per minute,

00:14:50.760 --> 00:14:55.880
which is pretty low. And then the indoor loop seems to hang out around 10.

00:14:55.880 --> 00:14:59.920
Five liters per minute? Yeah, that's pretty bad. Oh, hey, look, everything's grounded.

00:14:59.920 --> 00:15:05.680
Yeah, look at that. It's all grounded. We won't be out for weeks. We were overthinking it.

00:15:05.680 --> 00:15:08.800
Each of them we just found a screw and put it underneath the screw.

00:15:08.800 --> 00:15:12.320
The only thing is we didn't ground it into the panel yet, so it's not technically grounded anything.

00:15:12.320 --> 00:15:15.680
Right. I did run the wire over there. Oh, okay. Mostly.

00:15:15.680 --> 00:15:20.360
Is this you? Yeah, I grounded it. Okay. We should probably shut the panel off before we open it.

00:15:20.360 --> 00:15:24.400
Yeah, where's the one for this? Oh, this one.

00:15:24.400 --> 00:15:28.080
Oh my gosh, okay. This is not an insulated screwdriver

00:15:28.080 --> 00:15:31.760
and is not rated for electrical work. The only reason I'm doing this

00:15:31.760 --> 00:15:36.160
is because this panel is completely off, de-energized.

00:15:36.160 --> 00:15:39.400
I do not recommend this. Don't try it at home, et cetera.

00:15:39.400 --> 00:15:45.480
Oh my goodness, who put this in here? The screw is shallow.

00:15:45.480 --> 00:15:48.560
It's just camming out every time. Can I try to do it? Hold on, hold on.

00:15:48.560 --> 00:15:50.720
We might not even need it. My God.

00:15:51.880 --> 00:15:57.120
Oh my God. Zero. Zero. Okay, so everything in here is safe.

00:15:57.120 --> 00:16:02.000
I mean, well, we hope. The rack is hooked up now. See, you got a little ground cable going in there.

00:16:02.000 --> 00:16:05.360
Definitely not spliced inside the panel. That one.

00:16:13.800 --> 00:16:17.640
Now that the flow sensors are working, let's wire up a leak sensor. Like I mentioned before,

00:16:17.640 --> 00:16:21.360
we have to apply power to one side. So we'll plug this into five volt here.

00:16:21.360 --> 00:16:25.720
And then the other side, instead of getting a pull up resistor, gets a pull down resistor.

00:16:25.720 --> 00:16:30.720
It functions in a very similar way, but instead of pulling the voltage up to your kind of voltage supply level,

00:16:30.720 --> 00:16:35.260
it's pulling it down to zero because the path goes to ground. The last thing we've got to do is adjust the sensor

00:16:35.260 --> 00:16:37.920
on the board to be a zero to 10 volt sensor.

00:16:39.040 --> 00:16:43.440
We can see that it's reading about 0.17 volts

00:16:43.440 --> 00:16:46.600
when, in theory, nothing is connected.

00:16:46.600 --> 00:16:50.200
Okay, if I bridge this now with a screwdriver, which is metal,

00:16:50.200 --> 00:16:53.400
it goes from like 0.1 volts right up to five,

00:16:53.400 --> 00:16:58.160
which makes sense. When I let go, there's no path and it reads 0.14.

00:16:58.160 --> 00:17:00.160
Now we just need to try it with some water.

00:17:01.520 --> 00:17:05.040
Hey, it immediately registered 0.5 volts.

00:17:05.040 --> 00:17:08.600
Now, instead of printing this the terminal, let's send this data to Pulseway.

00:17:08.600 --> 00:17:14.000
Fortunately for us, Pulseway has a cool feature called custom fields and it allows you to attach custom bits of data

00:17:14.000 --> 00:17:17.640
to systems and entire site. You can do it globally if you want.

00:17:17.640 --> 00:17:21.280
Typically you would use this with their script system, say if you wanted to store the bit locker keys

00:17:21.280 --> 00:17:25.660
for all the systems on your network or the Windows licenses or check battery data,

00:17:25.660 --> 00:17:28.700
things that you would only need to read like once a day or something like that.

00:17:28.700 --> 00:17:33.880
But in our case, we want to read these sensors like every five seconds. Fortunately, they also have an API.

00:17:33.880 --> 00:17:37.600
So we can just edit our little script instead of printing it to the console,

00:17:37.600 --> 00:17:42.480
send it to the Pulseway API and then that'll set the data. While I don't technically need the Pulseway agent

00:17:42.480 --> 00:17:46.800
running on our sensor Raspberry Pi, I'm gonna install it anyways because then we can have monitoring.

00:17:46.800 --> 00:17:51.640
Obviously if the sensor Raspberry Pi dies, that would be not great and we'd want to know about that.

00:17:51.640 --> 00:17:56.920
Once it is installed, it's really easy to connect to the account. They actually have a command called Pulseway registration.

00:17:56.920 --> 00:18:00.320
Just go register, no proxy, custom server, yes.

00:18:00.320 --> 00:18:04.400
It just pops out this big QR code. And bam, it updates the config file

00:18:04.400 --> 00:18:07.720
and starts running Pulseway. We should be able to see it in the Pulseway window now.

00:18:07.720 --> 00:18:12.160
Hey, look at that, dream house sensor Pi for, now let's send some data.

00:18:12.160 --> 00:18:15.520
I went ahead and created a couple of custom fields in Pulseway, one for the flow rate

00:18:15.520 --> 00:18:19.640
of the loop inside the house and one for the flow rate of the loop that goes to the pool.

00:18:19.640 --> 00:18:25.680
And then when we run this, output updated account, 9.45.

00:18:25.680 --> 00:18:31.440
And then if we go to the site, if we go to Sebastian, dream house, custom fields,

00:18:31.440 --> 00:18:35.360
we can see that it's 9.45. Let's see if it stays that way.

00:18:35.360 --> 00:18:38.360
If I go ahead and turn the pump down,

00:18:38.360 --> 00:18:41.480
boom, 8.72, perfect.

00:18:41.480 --> 00:18:47.200
Now we just have to install Pulseway on some machines so we can make them turn off when bad things happen.

00:18:47.200 --> 00:18:51.760
We're first gonna make a workflow in Pulseway. I made one here called shut off water cooled computers.

00:18:51.760 --> 00:18:56.040
Ideally you would make a system group and then put all the systems in it, but for now we're just gonna use this one,

00:18:56.040 --> 00:19:00.000
which is LAN 5 and just set that manually. I'm creating this as an ad hoc workflow,

00:19:00.000 --> 00:19:03.840
which means you have to manually trigger it, but you can also set them up to run on a schedule,

00:19:03.840 --> 00:19:08.080
say like every day at 2 a.m. Or you can set it to run based off of a notification

00:19:08.080 --> 00:19:12.920
like CPU usage too high or disk full. Then we just say shut down.

00:19:12.960 --> 00:19:18.520
And there isn't an option to just shut off computer because this is like an IT management solution, right?

00:19:18.520 --> 00:19:23.200
Generally you don't want to like fully shut off on computer because now you can't manage it anymore.

00:19:23.200 --> 00:19:26.520
They do have an option for reboot, but we're gonna say execute a PowerShell command

00:19:26.520 --> 00:19:31.960
of shut down. I'm also gonna add a send email task if the condition check fails

00:19:31.960 --> 00:19:38.720
because it would be a little weird for this workflow to get triggered and then the custom field read a value that's fine.

00:19:38.720 --> 00:19:44.320
Like there's something wrong at that point. So we should get notified if that's the case.

00:19:44.320 --> 00:19:47.880
If the flow goes below one liter per minute, it should shut off LAN 5.

00:19:47.880 --> 00:19:53.440
It should have done it. Did it do it? Uh, I wouldn't say that.

00:19:55.120 --> 00:20:00.400
It's definitely run the workflow. You're about to be signed out. Windows will shut down in less than a minute.

00:20:00.400 --> 00:20:04.520
What, no way. Wait, it's gonna shut down in a minute, it says?

00:20:04.520 --> 00:20:08.000
It says less than a minute. She's shutting down, boys.

00:20:08.000 --> 00:20:11.280
That's great. Maybe I need to adjust that script a little bit to make it a little more urgent

00:20:11.280 --> 00:20:17.280
in terms of the shutting down, but not bad. Yeah, and when we combine that with the leak sensors,

00:20:17.280 --> 00:20:24.400
basically we can set it so that in the event that something goes bad, everything shuts off.

00:20:24.400 --> 00:20:28.000
The last part of our little electronics project here is being able to turn the pumps on and off.

00:20:28.000 --> 00:20:31.000
So if we detect a leak from one of the leak sensors,

00:20:31.000 --> 00:20:34.360
we can shut off the pump and limit the amount of water that gets out and the amount of damage.

00:20:34.360 --> 00:20:41.480
How do you do that? With relays. Each of these is a 40 amp, 250 volt relay,

00:20:41.560 --> 00:20:45.360
which is way overkill for what we need.

00:20:45.360 --> 00:20:51.080
I can just plug a serial cable into this, which is, in this case, an Ethernet cable,

00:20:51.080 --> 00:20:55.080
and plug the other side into our sensor board and then control this remotely

00:20:55.080 --> 00:20:59.000
from the Raspberry Pi and the sensor board. That means we can put this right next to the pumps,

00:20:59.000 --> 00:21:03.720
run an Ethernet cable back over here, and Bob's rungo, we can control the pumps remotely.

00:21:03.720 --> 00:21:06.920
Long term, I think we could mount it in the big isolation transformer box.

00:21:06.920 --> 00:21:10.640
That actually has a switch already, so we could probably just wire this up to the switch,

00:21:10.640 --> 00:21:16.160
but for now, we're just gonna do this to try it. This is not my finest work,

00:21:16.160 --> 00:21:19.520
but I've spliced the relay in between the load wire

00:21:19.520 --> 00:21:24.640
on this power bar. And these are all connected with Wego nuts, so they should be relatively safe.

00:21:24.640 --> 00:21:28.320
And if we plug this in, this power bar should not be powered.

00:21:28.320 --> 00:21:29.920
Dun dun, dun dun.

00:21:32.360 --> 00:21:37.480
Power bar, not powered, that's good. And now, let's plug in the relay board.

00:21:37.480 --> 00:21:42.040
It does need its own source of power, specifically 12 volt instead of five volt this time.

00:21:42.040 --> 00:21:45.760
So we'll wire that up here. There's also a few dip switches you wanna toggle.

00:21:45.760 --> 00:21:50.200
On this board, we enabled TX and RX, and then the termination switch,

00:21:50.200 --> 00:21:54.880
and then we just did the termination switch on this side. That's because each of these is the end device.

00:21:54.880 --> 00:21:59.480
If you had a bunch in between, daisy chains, you would just turn the termination one on,

00:21:59.480 --> 00:22:03.080
on each one on the end. If the board was mounted directly on the Raspberry Pi,

00:22:03.080 --> 00:22:06.720
we could use their command line library directly. But instead, since it's going over serial,

00:22:06.720 --> 00:22:10.680
I had to turn off the serial functionality on there, so it's just passing through,

00:22:10.680 --> 00:22:17.200
and then enable serial on the Raspberry Pi. And in theory, hey, cool.

00:22:17.200 --> 00:22:23.200
You see him clicking? Now, we can plug this in.

00:22:26.080 --> 00:22:31.640
You ready? On, see that's lit up, and then we go off.

00:22:31.680 --> 00:22:34.800
Now I've just gotta make a little script to toggle it based on the leak sensor,

00:22:34.800 --> 00:22:40.000
and hope it works. So we've done the demo, where if the pump fails, the systems turn off.

00:22:40.000 --> 00:22:45.240
But what we haven't demoed, is if a leak sensor gets triggered, the pump turns off.

00:22:45.240 --> 00:22:48.240
Well, let's do it. Okay. I'll go lick a leak sensor.

00:22:49.360 --> 00:22:52.800
Five volts not gonna hurt. I've licked a battery before us. But how many amps is it?

00:22:52.800 --> 00:22:56.560
Five amps, it's fine. Five amps? Yeah. I wouldn't lick that.

00:22:56.560 --> 00:22:59.920
I'm gonna lick it. I wouldn't lick that. I'm gonna do it. Well, make sure you get it on camera.

00:22:59.920 --> 00:23:03.840
Fine, fine, I won't lick it. I'll just dip it in the water on the floor. Go for it.

00:23:03.840 --> 00:23:05.520
And dip.

00:23:07.360 --> 00:23:11.640
Oh my God. Right, we've got a light on that same power bar.

00:23:11.640 --> 00:23:15.640
Oh, well did the flow stop? I didn't, yeah. Okay, now let me un-lick.

00:23:15.640 --> 00:23:19.040
Okay, obviously we have to fix up the wiring here a little bit.

00:23:19.040 --> 00:23:22.080
Is it going? And she's going. Hey!

00:23:23.320 --> 00:23:26.840
So theoretically, well there's a lot more protections

00:23:26.840 --> 00:23:30.320
than there were before. Most of them are just sitting on the concrete floor.

00:23:30.320 --> 00:23:32.560
So if it leaks, I'm sure they'll work great.

00:23:33.720 --> 00:23:37.320
I have a box, we'll put it all in a box. We'll make it nice. You know, it also worked great.

00:23:37.320 --> 00:23:41.680
Thank you so much for sponsoring this video. Pulseway is your solution for remote management

00:23:41.680 --> 00:23:46.640
of all manner of systems, not just janky basement water cooled ones.

00:23:46.640 --> 00:23:50.400
Yeah, we built our own monitoring system and then used Pulseway to do all the system stuff.

00:23:50.400 --> 00:23:55.240
And they have a fully featured mobile app so you can diagnose and even fix problems on the go.

00:23:55.240 --> 00:23:59.600
Yeah, like if your pump stops working, you'll know, even when you're in France.

00:23:59.600 --> 00:24:03.640
There's updates, temperature monitoring. You won't be able to do anything about it.

00:24:03.640 --> 00:24:06.680
Disc usage monitoring. But you'll know. Yeah, you can call your team.

00:24:06.680 --> 00:24:10.240
Get them to do it. You think I'm gonna come to your house and fix your water cooling while you're in France?

00:24:10.240 --> 00:24:13.360
It's the Pulseway pitch. Oh, that would be helpful.
