Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote sprinklers with ESP8266 (or any url driven relay / sprinkler) #54

Closed
pubdc opened this issue Mar 12, 2016 · 9 comments
Closed

remote sprinklers with ESP8266 (or any url driven relay / sprinkler) #54

pubdc opened this issue Mar 12, 2016 · 9 comments

Comments

@pubdc
Copy link

pubdc commented Mar 12, 2016

Dears, I had envisaged putting a tiny ESP8266 module outside in the sprinkler box, they are dirt cheap and have built-in wi-fi and webserver. They can control relays with their digital outputs and these can be triggered by simple url requests (http://randomnerdtutorials.com/esp8266-web-server/).
It would be cool if I could combine such a setup with sprinklers_pi. I think what would be needed is another type of output, say "url sprinkler", which is defined by a pair of urls : 1 each for on and off.
Sprinkler_pi would than call (open) these urls as commands to drive the respective sprinklers. Would appreciate if you could evaluate this as an extension/enhancement. Kindest greetings, Peter

@tony-osp
Copy link

Hi Peter,

it is possible, but the range of ESP8266 is rather limited (it is WiFi), while power consumption is pretty high, which would require AC power (cannot run it on batteries).

A lot better results are achievable with regular RF modules, such as RFM69, XBee and the like. Also for a big system like that you need to be able to control a lot more channels, to have explicit notion of 'station' etc.

I have my own system of this type, which supports multiple remote stations connected by RF, as well as sensors data collection (moisture level, temp, water flow counters, humidity etc). Originally derived from Sprinklers_pi but gradually rewritten most of the code. tony-osp.dreamwidth.org, github.com/tony-osp.

@nhorvath
Copy link
Collaborator

Presumably you already have AC 24V driving your sprinkler solenoids. I'm just curious why you would put the controller out by the solenoids rather than the other end of the wire.

@tony-osp
Copy link

Hi Nick, two reasons for it:

  1. I have several irrigation zones at the far end of my property and don't want to run thick multi-wire irrigation cables. Also for irrigation at the far end of my property I'm using DC-driven Orbit valves, and don't need to have 24VAC there.
  2. In addition to irrigation control, I'm collecting sensors data - soil moisture, temperature, water flow counters etc, that can be visualized by internet-connected Master Station.

Actual remote controller has 8 channels and sits in a suitable storage box, with wires running to valves. I also have smaller 4-channel controller that drives another group of valves at another spot. And I have 12 channels of irrigation connected directly to the Master Controller.
Initially I was thinking about using wired communication with the remote controller, but RF turned out to be simpler and easier thanks to inexpensive and powerful RF modules you can buy these days.

With best regards
Tony

@pubdc
Copy link
Author

pubdc commented Mar 12, 2016

ESP range was tested at 366 meters for the basic PCB antenna, so for my purposes that should more than suffice.
I would have to check on the power consumption to see if there are ways to reduce it. Wouldn't XBEE be consuming more ? I tried playing with those but found the configuration very cumbersome and confusing. Range also much less than expected. And ofcourse they cost like gold when compared to the ESP8266. In any case I do have 24Vac for the solenoids, and just bought a converter to give me some low voltage DC juice for the Wemos D1 mini ESP8266 unit.
All I need to steer it is calls like "http://192.168.1.99/?pin=OFF3", and "...ON3", so was hoping this could fit well into the sprinklers_pi project. Mostly, if the on/off urls were configurable per solenoid, that same setup could also enable many other network/wifi driven setups next to this ESP8266. Hope this idea will gain support.
Kindest greetings, Peter

@tony-osp
Copy link

Hi Peter, you should consider "direct line of sight" range vs actual range you will get with walls, foliage, rain and terrain in the picture - the difference is huge. Also frequency range is important - different frequencies have very different penetration capability for walls etc, 900MHz (or 433MHz) is highly preferable over 2.4GHz band of WiFi.

I started with XBee Pro (900MHz version) and it worked quite OK, and then moved to RFM69HW (also 900MHz band) which is much better and a lot cheaper than XBee (RFM modules cost about $7). You can easily get 1.5 miles (!) of line-of-sight range on a basic wire antenna. Power consumption for RFM69HW module is pretty small, you can actually run it off a battery (with decent battery management code).
Recently a new RF module became available, it uses LoRa technology and has 6x-8x better range (!)than RFM at the same power level. I have not tried it yet, but it is very promising.

If you are planning to run remote nodes off a battery, ESP8266 is really not an option, but if you are planning to have 24VAC power than it might work if you have sufficiently clear line of sight to WiFi router.

You can probably retrofit basic URL invocation as remote valve control into Sprinklers_pi code, but it will be fairly basic functionality. For adequate support of remote nodes you need a lot more - e.g. you need to track whether remote nodes actually executed your commands, you need logging (and Sprinklers_pi code does not have any logging at all), you need to be able to configure the thing etc.

And you may need to have a lot more nodes in the system if your irrigation setup is big.

I did all that (plus sensors network etc) in my project, but it is essentially all new/different code.

With best regards
Tony

@Bigben83
Copy link

Bigben83 commented Dec 5, 2018

Using Sonoff Pro 4Ch relays works a treat for irrigation controlling, I have many of them all set up on this progrm https://github.com/lejubila/piGarden using the Tasmota firmware, I would love this to be intergrated into sprinklers_pi as I much perfer the interface and setup over the piGarden setup.

@JCrankWV
Copy link

JCrankWV commented May 8, 2019

I would also like to see this feature. Im currently using a ESP8266 running ESPHomeYaml to control 4 zones of drip irrigation in a building way from my main Sprinklers Pi system. It would be awesome to be able to control these valves from Sprinklers Pi.

@nhorvath
Copy link
Collaborator

nhorvath commented May 8, 2019

Please see the release notes for https://github.com/rszimm/sprinklers_pi/releases/tag/v1.5.0

@nhorvath
Copy link
Collaborator

nhorvath commented May 8, 2019

There's now a wiki page too https://github.com/rszimm/sprinklers_pi/wiki/External-Zone-Control-Script
Please contribute scripts you think others might find useful to the scripts directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants