OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Master Valve on Zone 9-16?
- This topic has 9 replies, 5 voices, and was last updated 9 years, 6 months ago by Samer.
-
AuthorPosts
-
March 25, 2015 at 1:47 pm #36261
markParticipantI have an expansion board and would like to put my master valve on a zone other than 1-8. The drop down for master valve only gives 1-8 as options, even though I have the extra 8 zones (9-16) configured. My current sprinkler system is already setup with zones 1-9, and has the master labeled as ’10’. I would like to keep things clean and clear in my mind (and current labels) and keep the labels matching the same in OpenSprinkler. Thank you for any help!
March 25, 2015 at 2:43 pm #36263
SamerKeymasterSorry, unfortunately only stations 1-8 can be designated as master station in the current firmware.
March 25, 2015 at 11:17 pm #36274
markParticipantThank you for the quick response! Looks like I’m learning Python . . .
March 27, 2015 at 2:04 am #36299
RayKeymasterThe original reason it’s constrained to stations 1-8 is that I thought stations 1-8 always exist, so when you define a master station it’s always valid. However, now I think about it, there is no reason why it can’t be just any station. It’s pretty easy to modify the code to support that.
April 7, 2015 at 10:26 am #36528
markParticipantYes, very easy to change. However in doing so, I believe I exposed an existing bug (Which took a lot of time to find). Here’s how I did it. To change the front end, replace the code inside the ‘elif name==”mas”:’ section with the following:
output += “<select name=’omas’>\n”
output += “<option ” + (“selected ” if value==0 else “”) + “value=’0′>”+_(‘None’)+”</option>\n”
for bid in range(0,gv.sd[‘nbrd’]):
for s in range(0,8):
sid=bid*8 + s;
if gv.sd[‘show’][bid]&(1<<s):
output += “<option “+(“selected ” if value==sid+1 else “”)+ “value='”+str(sid+1) +”‘>Station “+ str(sid+1).rjust(2,’0’)+”: “+snames[sid]+”</option>\n”
output += “</select>\n”This will check to see if the option of the expansion board is present, and will only load zones marked as active. The current code handles the upper values for the master just fine, and runs it perfect. But I did find a bug in the display. So even though the master value will turn on and off, the front end web page shows it as off. To fix that, a simple change in the ospi.py file is needed. Change line 97 gv.sbits[b] |=1 << sid to gv.sbits[b] |=1 << s ‘Sid’ will grow from 1 to 16, ‘s’ will will grow from 1 to 8 twice. Since master was only on 1-8, using ‘sid’ was never an issue.
April 7, 2015 at 9:44 pm #36537
RayKeymasterThanks for making the changes. Because the assumption (that master valve can only be from 1-8) was made ever since the beginning, I won’t be surprised there are bugs (like the one you reported) that need to be fixed. It’s probably not a bug per se — since the master valve was limited to 1-8, (1<
April 20, 2015 at 6:30 am #36920
GregTParticipantI’m also looking to put a master on a station above 8. Is there a file I can pull from git that has these changes in it? Or will this be included in base code once it supports two masters? Thanks!
April 20, 2015 at 3:31 pm #36950
markParticipantI didn’t create a branch for these changes, I just opened the files and changed them locally. If you’d like to do the same, follow my previous post above. If you need more specific help, please let me know and I can walk you through it (it’s really simple).
April 23, 2015 at 5:30 pm #37062
Marco83ParticipantHello, I have a very stupid question, I am a beginner.
I have an Opensprinkler with 48 zones and I would like to set zone 48 as the Master.
Mark did share with us very precious code lines, however I don’t know how to upload them into my OpenSprinkler. Do I have to compile the code? Is there a step by step procedure?Thanks for your help
Marco
April 23, 2015 at 6:32 pm #37063
SamerKeymasterThis has been added to the upcoming firmware and will be released in 2.1.4. Ray will be announcing it soon.
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Master Valve on Zone 9-16?