SmartThings Community

ESP8266 Smart Sprinkler System


(Aaron Nienhuis) #63

I guess the documentation isn’t very clear. There is a comment in the header of the .ino file. Let me know if you can’t locate the files on the sites mentioned below.

(Al) #64

Thanks alot anienhuis for the reply and sharing your great work in the first place.
Though it seemed like it was sometime it says "The device is unavailable at this moment"
Also what/where do you mean by “preferences in the controller”, for Individual activation?

(Rick) #65

I do have question for all monitoring this thread, the mfg of the ESP chips have released a firmware to fix the wifi KRAcK wifi vulnerability, does anyone have any idea how we all can patch our ESP chips with this firmware? @ogiewon care to chime in ? I assume the bin we are all flashing these esp with is just the sketch and code not the firmware it self for the ESP?

I am sure most of us could do the firmware upgrade. Is there a easy way to do this ? Or is it as easy as just using the latest ESP version when compiling our sketch. I was sure the firmware on the ESP is done via holding certain pins down.

Thanks guys!

(Dan) #66

I think we’ll need to wait until v2.4 is released in order to get the KRACK vulnerability patch. Please read the following from the esp8266/Arduino project.

(Rick) #67

Ok and when 2.4 is out will it be as easy as just compiling the sketch with updated libraries ? Thanks!

(Dan) #68

I think so??? I am not 100% certain though. I have tried researching whether or not flashing an ESP8266 via the Arduino IDE replaces all of the firmware on the ESP8266, or not… My understanding is that the Arduino Core for ESP8266 replaces everything on the board, but I could be wrong. Let me know if you find out any additional information.

(Ned Israelsen) #69

I am following up on your comment from Aug. 30 that you are seeing random delays between each zone. I am seeing that as well using the 8 station code. It’s a big problem for me because I am also using station 8 to start a pump, and the pump relay stays on during the random delays. This could lead to serious pump damage since it creates a deadhead situation when the pump is on but no water can flow.

In your later posts you mention that you modified the code so it is working correctly. What did you do to solve the random delays? It seems like that is an Arduino code issue since I believe that once the cycle starts it runs locally in the ESP8266.

Any help would be greatly appreciated. Thanks!


Over the past couple months I’ve been using this project as a basis for an 8-zone system. It’s been running now for a month and it works quite well, although with the cold weather here in Texas it hasn’t run much.

A primary motivation for me has been to establish a fairly generic hardware/software platform for developing my own ST connected devices over WiFi. I use the ESP8266 and connect it serially to a PIC32MX, essentially using the (cheap) ESP8266 simply for the communication. I use the PIC for all of the I/O which provides lot’s of options. Lot’s of ways to accomplish this I suppose…I’ve just done many projects with the PIC platform and have a lot of experience with it.

I’ve learned a lot about ST development from the code ( although I find ST/Groovy quite tedious). Hat’s off to Aaron and others who’ve developed and shared their work as it’s given me (and others) a great start.

The only problem I’ve come across is that occasionally (once a week or so) my ST App will show the device as unavailable. Sometimes I can simply ask it to manually run a zone and it seems to find the device and everything works fine. Other times it takes some messing around with the app. Worst case I have to cycle power on the sprinkler controller. I think it’s some sort of SSDP or IP renewal issue but haven’t been able to pin it down. If anyone has ideas, I’d love to hear them.

(Rick) #71

Hey there, I did some testing and I don’t use the pump option but yes I do see that the relay stays on when these random delays are running, I also noticed the pump relay runs also during a reboot. I believe this is because the gpio used by the relay is on during boot. Not much we can do about that. As far as the delays go I’m not sure where that’s happening at ? Can anyone else chime in on that? I believe it’s in the local timing library maybe the timer.h.

Like I said I don’t use the pump option but I could see this being a issue.

Thanks guys!

(Rick) #72

Great work, I have never messed with a pic32 what are you able to do using this with the esp8266?

As for the unavailable I noticed it will do that if you don’t have the hub and port configured correctly. Then when it builds a status update to send to hub it fails. So this needs to be working. Or you can turn off device health in st app. But I would recommend fixing the issue than ignoring it. :slight_smile:

(Al) #73

I had this all working before thanks to the forum including schedule and all; then I wanted to use the R8 for some other project, temporarily. Now I re flashed it back to the smart sprinkler but the Smart Sprinkler wifi access point won’t show up. As far as I can tell the flash completed fine with no errors, the relay switch turns on and off at the boot like it did last time. Could it be some updated library files that break it?

Thanks for any suggestion.

(Al) #74

That’s strange, it’s actually working all by itself, somehow it still remembered the WiFi setup even after flashing it.

(Craig Zych ) #75

Any idea why mine just repeatedly sets the up in the device handler to

I’ve had it working multiple times but it usually lasts anywhere between 5 minutes and 5 days then reverts to and I have to completely remove and readd the esp8266 from smartthings.

(Ghassanjankeel) #76

First of all thanks for this very useful fun project.
I have the sprinklers work in Linknode R8, however I have only 5 sprinklers, so I’m trying to make the extra 3 useful.

I’m not a developer, but I was able to add a child app that gives me the ability to control single relays with a virtual switch.
with that said, I connected a float switch to contact sensor and made a pool level sensor that attached to the skimmer cover, and whenever the water is under certain level for 2 min continuously, using a webcore piston it triggers the virtual switch that triggers a relay in the sprinkler and that opens a valve to add water to the pool.

A second thing I want to add is a pool light switch, our pool light switches color by flipping the switch Off and ON, so I thought I would make a piston that would automate the On/off/on sequences and change the color to a predefined value. my only problem is that the relay takes very long time to switch On or OFF (maybe about 4 seconds) and that makes the color changing not work.

is that an option we can change in the script? or these boards are just slow?

(Ghassanjankeel) #77

I used to lose mine, but not this fast… however giving it a static IP in my router solved that

(Craig Zych ) #78

I was hoping that would fix it. Still lost the ip within hours with the ip set as static through that Google Wi-Fi app.

I’m not sure what makes my connection different.

(Ghassanjankeel) #79

Whats Google Wi-Fi app? why don’t you do that in your router’s web UI, you should be able to reserve IP address for the MAC address of your sprinkler

(Craig Zych ) #80

I probably should have explained that better. I have the Google Wi-Fi routers. The Google Wi-Fi app is the interface for my router

(Craig Zych ) #81

A little further.
if I request the SSDP xml file it would come back as for the URLBase.

I rebooted the controller and it now reports the correct IP address and so far it hasn’t reverted. I’m hoping that the code just happen to make it to SSDP.begin(); before successfully getting an IP on that one boot.
Either way there is definitely a bug there.

(Ghassanjankeel) #82

Well, is it still working for you? mine now started showing every few days, where I need to reboot the controller and then rediscover it