OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › sprinklers_pi – An alternative sprinkler control program
Tagged: _pi, OSBo sprinklers
- This topic has 191 replies, 62 voices, and was last updated 9 years, 3 months ago by jay.
-
AuthorPosts
-
September 18, 2013 at 6:44 pm #24999
rszimmParticipantsolar: Yep. There’s a bug. I just uploaded v1.0.6.
Sorry about that
September 18, 2013 at 6:51 pm #25001
rszimmParticipant2 Events
00:03:21 2013/9/18 (4)
Event [00] Time:04:00(240) Command 3 data 0,0
Event [01] Time:05:00(300) Command 3 data 0,1My schedule runs twice. What does the number in parenthesis mean? If it’s run time, is the weather adjustment applied to both times/runs?
Kris: The number in parenthesis is the structure representation of time (i.e. 240 minutes from midnight…..which is the same as the 4:00 that preceeds it….remember, this is a “secret” screen that I use during debug.) Command 3 means “run a schedule”. data 0,0 means run schedule 0, time 0. data 0,1 means run schedule 0, time 1.
If you watch closely, at 4AM you’ll see a bunch of additional events created. Command 1 means “turn on a valve” (data position 0 tells you which one). Command 2 means “turn off all valves”. The duration weather adjustment isn’t made until directly before the schedule is run (in case there has been some additional rainfall…).
September 18, 2013 at 10:23 pm #25000
solar411Member@rszimm wrote:
solar: Yep. There’s a bug. I just uploaded v1.0.6.
Sorry about that
Upgraded to 1.0.6 and confirmed everything is working. Thanks for the speedy fix!
September 19, 2013 at 4:22 pm #25002
KanyonKrisParticipantVersion 1.0.6 is installed without issue and is working fine.
Notable user interface improvements:
– On the home page the Zones line now shows the number of enabled zones in a bubble on the right. (Previously it was 15 indicating all possible zones.)
– Names for schedules and zones now support most symbols. Previously if the / were used in a name like “Test/” it would result in “Testtttttttt”
September 21, 2013 at 10:19 pm #25003
rszimmParticipantperico: What would be the purpose of simultaneous zones? I suppose it wouldn’t be hard to enable, but I’m having trouble understanding the use case and I’m worried that adding it might cause confusion. I’ve never seen an irrigation timer with simultaneous zones.
September 23, 2013 at 12:24 am #25004
eddiek2000Member@perico wrote:
Hi.
It would be possible to run the zones in concurrent mode?. When I was testing it I noticed that only one valve can be on at once.
Thank you and congratullations for your work!!
If you run multiple vales at the same time, then could you just connect them to the same control line?
September 26, 2013 at 1:35 pm #25005
nhorvathMemberI developed my own relay board for the raspberry pi because I had 9 zones and didn’t want to have to use an opensprinklerpi + expansion just for the one extra zone. I posted the design on github in case anyone else wanted to use it: https://github.com/nhorvath/sprinklers_pi/tree/master/hardware/Sprinkler%20Controller
September 26, 2013 at 6:19 pm #25006
KanyonKrisParticipant@nhorvath wrote:
I developed my own relay board for the raspberry pi because I had 9 zones and didn’t want to have to use an opensprinklerpi + expansion just for the one extra zone. I posted the design on github in case anyone else wanted to use it: https://github.com/nhorvath/sprinklers_pi/tree/master/hardware/Sprinkler%20Controller
Nice design and I’m impressed you went all the way to making the board yourself.
I hadn’t checked up on Fritzing in a years and didn’t know it can do PCB layout now, very cool.
Just for grins I uploaded the Gerbers to OSHPark to get a quote. $60 for 3 boards.
September 26, 2013 at 7:01 pm #25007
KanyonKrisParticipantFor my irrigation system I’m using a Raspberry Pi and a 4 channel relay board I bought off Amazon for $8.50. The board is made by Sain Smart (http://www.sainsmart.com/arduino-compatibles-1/relay/4-channel-5v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic.html). Sain Smart also makes 2, 8 and 16 relay boards, and boards with solid state relays for more $.
It’s small (75mm x 55mm x 20mm / 2.95″ x 2.17″ x 0.79″), can be driven directly from the Pi, has an LED for each channel that lights when active, and screw terminals for connecting to sprinkler valves.
I connected the relay board to the Pi with a ribbon cable. I bought a 40 conductor ribbon cable ($5 from Amazon – http://www.amazon.com/dupont-cable-200mm-male-female/dp/B00A6SOGC4/ref=pd_sim_pc_6) with individual female connectors on each and peeled of the 6 wires I needed, worked great.
Note that for each relay, the center screw terminal is the common with Normally Closed to the right and Normally Open to the left.
I mounted the Pi and relay board to a plywood board with wood screws, then mounted the plywood board to my garage wall. The Pi uses a USB WiFi adapter to connect to my home WiFi router.
sprinklers_pi needed to be set to Direct Negative for this relay board.
September 28, 2013 at 3:05 pm #25008
pericoMemberYes, I suppose you could do something like that, but there are more advantages in concurrent mode, for example not use always the same valves in the line (sometimes run 1+2 other times 1+3,…)
In fact, this option came back in last firmware because many people asked when it was disabled in 1.8.2
September 28, 2013 at 3:16 pm #25009
RayKeymaster@nhorvath wrote:
I developed my own relay board for the raspberry pi because I had 9 zones and didn’t want to have to use an opensprinklerpi + expansion just for the one extra zone. I posted the design on github in case anyone else wanted to use it: https://github.com/nhorvath/sprinklers_pi/tree/master/hardware/Sprinkler%20Controller
Nice design. Thanks for sharing. You may want to make this a separate post to get it more noticeable, or post it under the Hardware section.
September 29, 2013 at 12:28 am #25010
tritronMemberI have few questions:
I would like to move /web to /srv/web but editing web.cpp and changing /web to /srv/web breaks program i only get blank initial page.
I would create service file for arch linux any help pointers
Any ideas for case for raspberry pi and relay board?September 29, 2013 at 5:10 am #25011
KanyonKrisParticipantnhorvath, I agree with Ray, you should post your board design in a new thread. It deserves more notice.
September 30, 2013 at 12:18 am #25012
tritronMemberHow do you add garage opener any recommended software that will work with this one?
September 30, 2013 at 2:48 am #25013
KanyonKrisParticipanttriton,
I don’t understand why you want to move the web pages to /srv/web, what’s wrong with staying with /web ?
For your relay board, go to Settings and for Output select either Direct Positive (relays are activated by Raspberry Pi output going high) or Direct Negative (my board needed this).
I haven’t heard of anyone adding garage door support yet. The source code is available, hack away.
September 30, 2013 at 5:28 pm #25014
rszimmParticipanttriton, moving things to /srv/web/ shouldn’t be hard, but it requires code changes in lines 914 and 915 of web.cpp. The 5s you see in those two lines refer to the size of the string ‘/web/’ which is 5 characters long. If you move things to /srv/web/ then you’ll have to change those to 9s.
You should also increase the length of sPage (declared on line 762) to 39.Ultimately though I wouldn’t recommend this. You’ll forever have custom code on your machine and you’ll have to re-edit things every time we drop a new release. That will be painful. Can’t you just put a symlink from /web/ to /srv/web/??
As for using a relay board, there are a number of posts earlier in this thread on the subject. I know KanyonKris uses one with his system and he’s really helpful. Before I plunked down the money for the awesome OpenSprinklerPi module, I used one of these (http://www.ebay.com/itm/8-Channel-5V-Relay-Shield-Module-For-Arduino-UNO-2560-1280-ARM-PIC-AVR-STM32-/221285941764?pt=LH_DefaultDomain_0&hash=item3385ab8204) which worked just fine with the software, but of course it’s big, bulky, uses mechanical relays, and doesn’t have the 24V power supply.
September 30, 2013 at 5:56 pm #25015
rszimmParticipantI don’t have any experience with arch linux, so I’m afraid I can’t help a whole lot there. I looked up some info on their startup scripts and it seems you should be able to get something working with this:
[Unit]
Description=Sprinklers Pi
After=network.target
[Service]
ExecStart=/usr/local/sbin/sprinklers_pi -L/var/log/sprinklers_pi
Type=simple
[Install]
WantedBy=multi-user.target
October 3, 2013 at 4:32 am #25016
tritronMemberThank you guys for all your help. I thin that opensprinkler is great but is overkill for me. I am replacing my current sprinkler controller with raspberry pi so i can easily control them from phone or computer. I dont need buttons and lcd display so I realy wish there was version of opensprinkler with just 24 volt input and 5v controler and relays (thyristors)
It would be nice to have header that slides over raspberry pins. The board could cost 15 to 25.
What software are you guys using to control garage door opener?October 5, 2013 at 5:42 am #25017
RayKeymaster@tritron: note that there are two different versions of OpenSprinkler, one is based on the Arduino microccontroller and has buttons and LCD, the other is based on the Raspberry Pi (it’s called OpenSprinkler Pi, or OSPi for short), which does not have buttons and LCD.
October 8, 2013 at 8:53 pm #25018
nhorvathMemberrszimm,
First off thanks again for the great software… I was thinking about adding to the logging feature because this morning things ran with a wunderground scale of 100%, but the advanced wunderground status for today shows 23% (which still seems high because it rained yesterday but that’s another story). I’m guessing there was a communications issue this morning and it just defaulted to 100%, but I’m not certain. It would be nice if it stored the wunderground calculation data and it could be displayed if you clicked on the wunderground % in the logs. I’m a software developer and could help with this… just wanted to know what you thought about it before I started, and maybe if you could point me in the right direction as to how the data gets into that table.About the 100%, is that a correct assumption that if it fails it just falls back to 100%? Does it retry at all? Maybe if it fails it could use the last retrieved data instead of 100%.
Thanks,
NickOctober 8, 2013 at 9:29 pm #25019
rszimmParticipantNick, yes; if the software gets an error or otherwise cannot communicate with the weather underground server then it will default back to 100% of the scheduled run time.
I’m thinking I understand what you’re asking for. If you click on the individual cell in the WUnderground column then it will pop up a box that tells you the overall parameters that fed into that calculation. e.g. the temp, the humidity, etc. Correct? That touches a bunch of code (the core C code, the html web page, and the database table that holds the data), but it shouldn’t be too terribly difficult to do. Let me root around in the code and see what I come up with…
Of course you can always look a the actual program log in /var/log/sprinklers_pi and there should be an error message in there as well as the actual data you’re looking for. If there’s a successful connection, you should get a message that looks something like:
2013/07/27 12:43:42 Adjusting H(-27)T(56)R(-114):15
This states that we’re subtracting 27% for humidity, adding 56% for temp and subtracting 115% for rainfall, resulting in a duration that’s 15% of what’s scheduled. (100-27+56-114). If there was a connection failure or some other failure, there should be an associated message in the log.October 8, 2013 at 10:01 pm #25020
nhorvathMember@rszimm wrote:
Nick, yes; if the software gets an error or otherwise cannot communicate with the weather underground server then it will default back to 100% of the scheduled run time.
I’m thinking I understand what you’re asking for. If you click on the individual cell in the WUnderground column then it will pop up a box that tells you the overall parameters that fed into that calculation. e.g. the temp, the humidity, etc. Correct? That touches a bunch of code (the core C code, the html web page, and the database table that holds the data), but it shouldn’t be too terribly difficult to do. Let me root around in the code and see what I come up with…
Of course you can always look a the actual program log in /var/log/sprinklers_pi and there should be an error message in there as well as the actual data you’re looking for. If there’s a successful connection, you should get a message that looks something like:
2013/07/27 12:43:42 Adjusting H(-27)T(56)R(-114):15
This states that we’re subtracting 27% for humidity, adding 56% for temp and subtracting 115% for rainfall, resulting in a duration that’s 15% of what’s scheduled. (100-27+56-114). If there was a connection failure or some other failure, there should be an associated message in the log.Thanks for the info on the log I didn’t know it was there and I guess that solves my immediate problem. Yes, it was a bad wunderground response. Since my soil is mostly clay I schedule 3 shorter waterings in sequence so there some time for it to soak in as the other zones go, it looks like it gets wunderground data each time and only failed on the last one so for me falling back to some cached data would be really beneficial rather than running at 100%. Do you think that is a good idea to store the last response?
October 9, 2013 at 1:44 pm #25021
KanyonKrisParticipantSomewhat related, how does sprinkler_pi handle weather adjustments when watering say every other day? Does it simply use the current day’s weather info? It would be nice if it could look back every day since the last watering and use the average of those days.
October 9, 2013 at 3:37 pm #25022
nhorvathMember@KanyonKris wrote:
Somewhat related, how does sprinkler_pi handle weather adjustments when watering say every other day? Does it simply use the current day’s weather info? It would be nice if it could look back every day since the last watering and use the average of those days.
Currently it just looks at todays conditions and the rainfall from today and yesterday.
October 29, 2013 at 4:47 am #25023
XerogasParticipantI’ve had mine connected for a couple days now, but the logs do not show that it has fired up any sprinklers yet. It’s on an interval of 2 (days, I guess), and there’s only one schedule configured. The schedule shows it starting at 6:30 am
2 Events
21:43:49 2013/10/28 (2)
Event [00] Time:00:-1(-1) Command 3 data 0,0
Event [01] Time:00:-1(-1) Command 2 data 0,0 -
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › sprinklers_pi – An alternative sprinkler control program