Finding bugs

Have you ever looked at something from so many angles you think you’re going to go crazy?  The email functionality of the sprinkler program was not working and after the umpteenth idea of what it might be, I finally came across something that triggered the answer.  I knew I was failing to send due to a 401 error which is an authorization problem, but couldn’t understand why it worked from my browser and not from the photon.  Well, it turns out I had put the script in a folder that I had password protected (where the garage door web pages reside), and in chrome once you log in with one tab, they are all logged in.  So, I was logging in implicitly while in chrome and the request and email worked.  The solution, make sure and put any scripts (php) you are using for external access from the photon in an open area of your web host, so that the photon can access it.  There is probably a way to get it to login, but for the most part these scripts will be hidden on the photon and not used by anything exposed too much.

Hope this helps you avoid the problem.

Have fun coding.

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.

Continue reading Latest on the Irrigation system

Irrigation System Proof of Concept

I have worked on the irrigation system over the past weekend and have hooked it up for its first test run.  Here is the latest view of the hardware.

IMG_20151018_213212

I’m not sure if you can tell everything that is hooked up and where, but here is the run down.  The relays are number 1-8 from right to left.  The red wires are the valves (solenoids) where the wire in relay 7 is the main valve which needs to be turned on when each of the solenoids is turned on.  The wires for the power is hooked up to the open side of the solenoid.

Continue reading Irrigation System Proof of Concept