Control: Sprinkler Control MQTT OpenHAB ESP8266 Demo
Sprinkler Control MQTT OpenHAB ESP8266
Hey guys Matt here from MKSmartHouse.com and in this video I am going to give you a demo of the sprinkler system we will be creating.
So what is this sprinkler system exactly well, it is a device that connects to our openhab server through MQTT and listens for commands to determine which sprinkler valve to turn on. If I pull out a mobile device and open up the openHAB app you can see that I now have 5 things in the outside frame. The first 3 things are switches that say “Zone 1” “Zone 2” and “Zone 3 and what these switches do is turn on the sprinkler valves that are connected to the device. The next item is “20 Minute Cycle” and this one goes through and activates each zone individually for 20 minutes and then goes to the next zone. I will demonstrate Later. The next item is “Sprinkler System Schedule” and it controls whether or not the openhab system should do its pre programmed scheduled watering of the sprinkler system. So if I turn it off then it will not water by the schedule which is everyday at 5 am but, if I turn it on then it will water everyday at 5am. One cool thing that implemented in the rules and will show you in the software video is that whenever the system does its daily water then it will send you a notification before it starts watering to let you know what is going on. Now, let’s get into the demonstration of the device. I would just like to note that this device can control up to 3 zones but currently at my house I only have 2 so you will only see 2 sets of sprinklers activate on the lawn. Let’s start off by controlling each individual zone. First I am going to turn on Zone 1, and as you can see the sprinklers in zone came up and started watering the grass. Next I am going to turn off Zone 1 and turn on Zone 2 and just like Zone 1 you can see the sprinklers came up. If I did have my third zone up and running I could turn off Zone 2 and turn on zone 3 but currently I do not have the hoses connected to those sprinklers. The next thing I want to show you is the 20 minute cycle. So if I turn it on, you can see that zone 1 turned on and is watering. For demonstration purposes I changed it from 20 to 1 minute in the code so that way we don’t have to sit here and watch the sprinklers for 20 minutes and wastewater. I am going to speed up the video a little and as you can see Zone 1 now turned off and Zone 2 turned on. Now I am going to speed it up again and Zone 2 turned off and Zone 3 turned on but again it is not connected. Next, I am going to show you around the device starting with the valves that I have outside. So, outside I have three valves, the first 2 from the top are connected and the third one is not, it is there for future use. Anyway the 2 are connected to 3 conductor gray wire that goes inside the house and connects to the sprinkler system device so, let's go take a look at it. As you can see this is the device and it is nicely mounted to the wall. Starting from the top we have the device itself. Next we have all the wires coming from the box. Starting from left to right we have the 5 volt power wire and that is simply connecting into 5 volt power brick that is connect to an extension cord but ideally should be plugged directly into the wall. Next to that are the sprinkler valve wires. Then finally is the sprinkler valve power adapter wires which go to a power adapter to power the sprinkler valves when the device allows it. But, let's take a closer look at the control box. It is all housed in a nice plastic enclosure. Anyway if we open it up we can see the Custom PCB and its components. First up at the top left is the mode switch and we use this to either put the device into program mode or in run mode. Underneath to the left is the communication port and this is how we are going to program the device. Then under that is the 5v to 3.3v regulator. To the right of the regulator are the terminal blocks for 5v power, 3 sprinkler valve outputs and sprinkler valve power adapter. Above the terminals are the 3 relays to control the valves. And above that are diodes, transistors and resistors. If we flip the board over we will see the esp right in the middle. The esp8266 is the whole brains of the device and it is what connects to the openhab server through mqtt That’s it that is the entire device! In the next video I will show you all the hardware we will need and how to put it together. Alright thank you for watching and If you have any questions leave them in the comments section below or head over to mksmarthouse.com/forum where you have a better chance of it getting answered. Good Bye!