Latest on the Irrigation system

I have finished the first draft of the project and it appears to be working.  Let’s go over the list and just hit the high points of how I did things and problems I came across.

  • Plug into the weather to determine if they need to be run.

So I was able to find an httpclient for the photon that I am using to check a weather site for the latest rainfall totals.  I save the data from the last two days and if it is over an inch I skip that day’s watering.

/Weather information retrieval

int checkRain(String command) {
  RestClient client = RestClient("yoururlherr");
  String weatherResponse = "";
  client.get("weather url", &weatherResponse);
  return weatherResponse.toInt();
int getRain(String command) {
 return totalRain;

Inside the loop:

 if(now>=2300) {
    yesterdaysRain = todaysRain;
    todaysRain = checkRain("tdoay");
    totalRain = todaysRain+yesterdaysRain;
  • I have permanent restrictions which would reduce me to just being able to run a specific two days a week, so I need to run it in the evening if the forecast didn’t pan out.

This is why I am not using the forcast yet.  I need to weigh what I want to do here.  I think I need to add a button to disable the next run and then turn it back on.

  • Email notification when a watering is cancelled. (Still need to add it)
  • I would also like to run specific zones on command so that I can more easily test zones for problems. (Done previously)
  • I want a log of when it ran and for how long on each zone. (need to add it still)
  • Each zone needs to be configurable to run for different lengths of time. (Done)

So all of that said, I am still working on an issue that I am having with the photon where it doesn’t seem to want to flash anymore unless I first clear it off with the tinker code that comes with it (default code).  I have contacted particle about it and they are working on the issue.  They have been very responsive.

Published by


I am a software developer that likes tinkering in the garage. I hope you like my projects and have fun reproducing them.

Leave a Reply

Your email address will not be published. Required fields are marked *