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

Irrigation system

IMG_20151012_185017
(That is my anti-static mat that it is sitting on :))

There are plenty of irrigation systems that are connected to the internet, but I enjoy playing around with this stuff so I’m making my own.  I have just started the project, but here is what I have so far.  There was just one on woot today for $164 that looked very polished and intriguing.  There is also one for the Pi that comes with a pre-built open source program that has many of the features I want.  That said, I think I can do it cheaper and get what I want.  I also have plans to add a rain gauge to it to make it work even better, but that’s for another post after I get this project done.

Continue reading Irrigation system

Garage Door Project

This project was inspired by a project on makezine where they used a Particle Photon to open a garage door via an android/iphone app. I liked the idea and decided to give it a try. Once I got it working, I decided to make my own modifications. I ditched the app to use a web interface instead (found an example here). I found a few problems that I resolved, I think it worked in the makezine article because they were using the older spark core io chip.

Continue reading Garage Door Project