Home Automation - get notifications on iPhone

Thought it might be time to update this thread. A huge thanks to everyone for all their suggestions, my balcony garden is looking magnificent and very well watered!

The setup I ended up with is like this...

Click Koyo Ethernet PLC
Intel Compute Stick micro PC running an AdvancedHMI application and TeamViewer

The PC connects to the internet via wifi from my router inside the house. It connects to the PLC using a USB-ethernet adaptor.

The SCADA is still a work in progress, but so far I have it set up to:
- Email me if there are any problems, including a description of all faults and warnings in the alarm text. Includes warnings if the tank is getting low, and when it's completely empty
- Retrieve the weather forecast from the Bureau of Meteorology first thing every morning, and if it's going to be above a set temperature, give the plants some water before the sun comes up
- Retrieve the weather report in the evening, and if the actual temperature was above a set temperature, water again after the sun goes down. Also, if there was above a certain amount of rainfall for the day, only water the parts of the garden that aren't exposed to rain
- Water after 3 days regardless of weather, if no watering has taken place in the meantime

I ate the first tomatoes from the garden last night with my dinner, and they were delicious!

Learning AdvancedHMI was a little bit of a learning curve, but with the forums and the excellent support from Archie both here and on the AHMI forums, I'm working through everything quite nicely. For a free product I'm thoroughly impressed!

The photo below shows the garden as it currently sits. The big timber structure up the back I designed and built from scratch using recycled timber. The water tank is sitting underneath, and the water pump is out of sight underneath the bench seat. The rack against the handrail was built by my mother in law out of an old pallet (she also found and restored the bench seat). You can see the panel mounted on the end of the bench seat where it also doubles as somewhere to sit my beer while I watch the sunset. The water is run up the back of the main planter box and around the balcony railing in 19mm poly, and then I tap off it everywhere I have something green with an adjustable dripper.

IMG_6895.jpg
 
Last edited:
Inside the panel you can see the PC down in the bottom left corner. The panel has capacity already built into it to be run off a solar panel/battery/inverter setup, and to be able to detect when the battery is low, and connect it to mains power for a couple of hours to charge the battery, for those winter months when I won't get much sun. That part of it is on the backburner for a little bit though, I want solar panels to get just that little bit smaller and more efficient before I invest my hard earned in them :)

IMG_6642.jpg
 
I like all of this. Also, you have way too much spare time :ROFLMAO:

Is all the notification stuff set up through AHMI?
🍻
 
Last edited:
I like all of this. Also, you have way too much spare time :ROFLMAO:
Well of course I have too much spare time, I don't have to water my garden! 🍺

Is all the notification stuff set up through AHMI?
Yep - just uses a DataSubscriber watching all my alarm bits for a change, and if any of them change it triggers a VBA sub to go through and check if any of the alarms are new alarms. If so, it generates a list of the relevant messages and a subject line, and then calls another VBA sub which is set up so that I can just pass it all the email parameters and it will send one off. I set it up to get the recipient list from a text file so that if I ever go on holiday and rope someone into keeping an eye on things while I'm gone, I can just add their address to the text file and they'll get the emails when the tank needs refilling, and I can focus on more important things like where my next beer is coming from 🍺
 
That's a good looking cabinet for a glorified sprinkler timer. I'm really curious as to how you are getting the weather report and are then able to manipulate the data so it is usable in the PLC. Unfortunately I doubt I'd understand it if you spent a month explaining it.

Bubba.
 
Really nice job. Wish we could "thumbs up" these posts. You deserve a big round of applause!
 
That's a good looking cabinet for a glorified sprinkler timer. I'm really curious as to how you are getting the weather report and are then able to manipulate the data so it is usable in the PLC. Unfortunately I doubt I'd understand it if you spent a month explaining it.

Bubba.

I've had a lot of people look at me strangely and say things like "isn't this a little over the top?" (absolutely, yes) or "you know you can just buy watering timers right?" (where's the fun in that?). My biggest problem was needing a pump and a water tank because I don't have mains water out there. That eliminates 99% of off-the-shelf systems right off the bat. Finding the right combination of pumps/fittings/pressure cutouts/sprinkler fittings was actually probably the most difficult bit out of everything!

The weather report was actually reasonably straightforward - the hardest part was working out which out of the 2000-odd files the BOM puts on it's FTP server had the information I wanted. Once I worked that out, I googled how to write a batch file to download a file from an FTP server, given the name of the file server and the filename. There's not a huge amount to that part of it. Then I just scheduled a task in Windows to run that batch file at 5:30am each day (after the forecast is published at 5:05am) and 6pm each day (after the actual temperature/rainfall data is published at 5:45pm). Now I have a text file with a whole lot of stuff in it, but somewhere in each text file is a number I want.

The good news is that the format of these files is always identical, except for the descriptions of the weather, so I was able to work out a pattern where the number I wanted would always be preceded by certain text (for example "actual-max-temperature").

Then I used a few VBA commands to read through the file looking for those keywords, extract the line it was on, trim all the data before and after the number off, and convert it from a string of text into an integer.

From there, the VBA command to write it into the PLC was literally as simple as "[CommsDriver].Write([NumberIJustGot],[PLCTag])"

Sounds complicated, but when broken down it's actually reasonably straightforward. Plus, it looks really, really cool :)
 
What a great job!

I wasted so much water last summer with a timer that watered no matter what the weather. My poor chilli plants were half drowned and almost frostbitten when I returned from vacation.

Nick
 
I've had a lot of people look at me strangely and say things like "isn't this a little over the top?" (absolutely, yes) or "you know you can just buy watering timers right?" (where's the fun in that?)

You certainly get an A+ for over the top and very cool!

The weather report was actually reasonably straightforward .....

Then I used a few VBA commands to read through the file looking for those keywords, extract the line it was on, trim all the data before and after the number off, and convert it from a string of text into an integer

I wish I could say that 99% of that didn't zoom straight over my head without so much as mussing my hair, but... Well, yeah. VBA has long been on my list of things to learn and understand, and you might well of inspired me to get off the dime and get to it.

From there, the VBA command to write it into the PLC was literally as simple as "[CommsDriver].Write([NumberIJustGot],[PLCTag])"

Sounds complicated, but when broken down it's actually reasonably straightforward. Plus, it looks really, really cool :)

Thanks for the explanation.

Bubba.
 
What a great job!

I wasted so much water last summer with a timer that watered no matter what the weather. My poor chilli plants were half drowned and almost frostbitten when I returned from vacation.

Nick
I have some chilli plants going as well, not much risk of frostbite up there though! Not for another couple of months, anyway.

Awesome! I am considering gathering weather data to assist operators / assist control / assist performance metrics.

Love the view!
Well if you've moved to the UK, gathering weather data should be fairly easy...just assume it's overcast and rainy and you'll be at least 90% accurate :ROFLMAO:

What prompted the move, anyway?

+1

If you're ever in the states I need some help on a few projects of my own, very nice!
If you buy the plane ticket, I'll be happy to help you out pro bono! Might have to include the wife in that though, don't think she'd be too happy if I went overseas without her ;)
 

Similar Topics

I’m looking at automating my house. My question is my dpinkler system. If it has been rating the past few days, I want it to gather the latest...
Replies
11
Views
2,652
Hi, I'm looking for a HMI or just a display if I can't find a HMI. I will soon have a s7-1200 at home providing some information and control. I...
Replies
6
Views
1,440
Hi all, Has any one of you used PLCs for home automation sort of projects? There`s a large commercial building essentially looking to give us a...
Replies
22
Views
7,736
Hi All, Have anyone of you used PLCs or products from companies like Schneider, Omron etc for home automation? How about if I want to connect 5...
Replies
20
Views
4,976
Over Christmas, I installed a small PLC panel at my parents' house to control several things that needed automating. They have a whole-house...
Replies
20
Views
4,573
Back
Top Bottom