Code name CHIC

CHIC is the code name I gave to my project. It’s an acronym for:
Clos du Lac

Most of the homes in my community have grape vines in their front yards. This supplements the few acres of vineyards that surround the neighborhood. We sell the grapes to local vintners. However, there is a problem with consistency on the homeowners grapes partly due to irrigation issues. The vineyard manager let’s us know when and for how long to water the vines, but not every homeowner follows through, for various reasons. So I came up with a suggestion to assist the vineyard manager to have control over the irrigation valve that waters the homeowner vines. This idea came about after I read about the Imp. I enlisted a friend to help me with the Javascript and html portions while I tried my hand at the agent and device code. My friend insisted on a cute name before helping, hence Chic!

Right now the prototype is running, albeit turning on a LED instead of a sprinkler valve. There is an image map of the community on a web page where the user can click on the lot number to see the current status of the sprinkler for that lot. A dashboard is displayed with information regarding the current status, days of week to water, the length of time to water as well as a manual on/off control. The manual on has a built in timer for 60 seconds, just in case you forgot to turn it off. I added this in case of maintenance needs i.e. checking for leaks or testing out the water pressure.

I tried to keep the code simple. The device calls the agent every hour to see if it is the correct day and time to water. I use the server to store the days and duration to water. The start time is set to a default of 7:00am PST.

The proposal to the HOA is that each homeowner has one of the Imps connected to their wifi network (i’m assuming that everyone has a wifi set up in my neighborhood) and connects to the the sprinkler for the front yard vines. For final hardware I think I could leverage from the Jane design. I would only need the Imp, 24v regulation down to 3.3v and the thyristor to control the valve. Perhaps one LED to indicate watering or flashing for manual mode.

Currently the HOA have been sent the link to the web page to try it out. A part from comments like “It’s cool, have you shown it to…”, no further requests for a final solution have been made. I’ll post an up date if it goes further as making the hardware will be new to me and I will probably need some help. I still need to set up some security for final use and modify the Javascript for the additional Imps. Right now the demo is set to one Imp and “friendly” messages if you try other areas. I have attached a couple of images of the web page. Once I’ve tidied up the code some more, I’ll post it to github. But for now it works as I envisioned!

I’d like to say thanks to the Imp community for assisting with code examples that I read and leveraged from, as well as my friend for the wizardly Javascript!

Sounds great!