Forum Replies Created
-
AuthorPosts
-
craigmwParticipantSamer –
Thanks for the quick response! So, the native HTML page doesn’t support more than one OSPi like the Android app does? I just tried your Chrome app and was having trouble. I noticed that the OSPiBY unit had crashed. I could still SSH in, but using the top command, I could see that the OpenSprinkler program was no longer in the list. BTW, the OSPiFY unit was still running, and I could access that from the Chrome App. I am going to try to figure out why the OSPiBY unit crashed. I’ve noted this behavior a few times now, so something must be wrong even though that RPi still seems to be accessible via SSH (over WiFi).
Cheers!
craigmwParticipantIncidentally, the instructions given for setting up the new C++ based kernel have an issue. Obviously, it is necessary to inactivate the Dan’s Python kernel to prevent device contention and allow access to port 8080. However, the original instructions for installing the Python interval programming and making it start automatically (http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#Starting_the_program_automatically) use an entry in rc.local. However, the instructions for disabling the Python interval program indicate that the program is auto-started via init.d (using update-rc.d). Running sudo /etc/init.d/ospi stop will give an error (file not found) if one followed the link above for automatically starting the Python interval program (which I did). Instead, it is necessary to remove (or comment out) the lines in /etc/rc.local that start the Python interval program on reboot.
Note that even after doing so, I am still getting network errors reported in the web app. I will try with completely fresh installs of Raspbian to see if that might fix this issue, but for now, I’ll need to stick with Dan’s program.
craigmwParticipantHaving had some trouble with the new “unified” firmware, I’ve just switched back to Dan’s python OSPi kernel, which is working just fine on the latest version of Raspbian (updated via rpi-update).
uname -a reports: Linux raspberrypi 3.18.10+ #775 PREEMPT Thu Apr 2 18:10:12 BST 2015 armv6l GNU/Linux
So, I think you should be good. Just in case, use something like WinSCP to make a backup to a desktop computer. If it doesn’t work, it is a simple matter to restore it.
craigmwParticipantI have had to revert both OSPi units to Dan’s interval program because of this network error problem. I’d really like to get the new program working, but not at the expense of having non-functional sprinklers. Dan’s program seems to be working fine on both. Has anyone else run into this issue?
craigmwParticipantSamer:
Okay, I understand. I liked the web app because it allows me to adjust my settings from a desktop PC, but with the improved UI of the native scheduler, I can just use its page for this. The Android app is quite nice, especially since I have two OSPi’s configured (one in the front and one in the back). I like how easy the Android app allows one to switch back and forth.
craigmwParticipantDan…
I will check the sd.json file, as I think you might be right about this. It seems that I had trouble connecting with my OSPi’s after previous updates. This resulted in my having to tweak the sd.json files with the correct port numbers (not 80 or 8080) for the interval program to be reachable. I will check out your method to see if this is fixed. Also, I’m unsure about the options.txt file and will check this as well. I clearly screwed up something on the previous upgrade (in trying to get the interval program and web app functioning).
Thanks again…
craigmwParticipantI just tried to access the device settings from Dan’s web server page, and it shows a bunch of junk. So, it appears this may be due to a problem on that side of things. I’ll post regarding this issue to the proper forum entry for Dan’s program and see if I can figure this out.
Thanks again!
craigmwParticipantSamer:
I just downloaded the latest version of Dan’s interval program using a git pull, and I’m still getting the same error. I cannot save the device settings, with a message coming up that says there is a problem with the password.
“Error communicating with OpenSprinkler. Please check that your password is correct.”
This occurs on both of my OSPi units after updating both the interval program and the mobile app directories. Other functions, including program editing, work fine.
craigmwParticipantSamer:
I like the ability to control these from a desktop or laptop, since I find it easier to do so. This is especially for inserting reasonable values for station times (e.g. 5 minutes), where I find it difficult to insert such short times. In any event, trying to save the device options results in a device error. I’ve checked the native app and it does look quite interesting, but doesn’t seem to work (it keeps failing to connect despite my Android phone working just fine in accessing the network).
Thanks…
Craig
craigmwParticipantDan:
This looks great! I was able to read the temps on my two OSPi units today. It peaked at about 90F here in OC today, and my OSPi in the backyard was reading about 148F! It is mounted in a weatherproof Orbit enclosure, which seems to get pretty warm. The second one mounted in our garage was running about 140, so not much cooler. I guess these can really take the heat… at least I hope so. All is fine so far, with no lockups. I guess we’ll see how things go if the temps go up much higher.
craigmwParticipantAre you sure it’s the RPi and not the SD card? I’ve had a couple of SD cards get corrupted, and this results in the power/RED light coming on, but the ACT/green light only comes on briefly. Changing out the SD card to a new one with a fresh copy of the OS fixed this in both cases. I had been using a couple of cheapo 8 GB SD cards, both of which failed. Some new SanDisk class 10 16 GB SD cards fixed that problem, though I really don’t need that much memory for the OSPi’s purposes.
August 23, 2013 at 3:56 am in reply to: sprinklers_pi – An alternative sprinkler control program #24963
craigmwParticipant@eddiek2000 wrote:
@ndboost wrote:
give us some source code on github so we can contribute!!! 🙂
The source code is part of the distribution on page 1. I have been playing with it. I can get more than 7 zones, but can’t activate above #9. I also have an issue save data for zones over 9. There are a few constants that need adjusting and must be another I am missing. A debugger would be great to break on where I am having issues.
I would like to add a seasonal adjustment too. I have found that setting very useful on my Rainbird.
I’m not sure what you mean by seasonal adjustment, but I believe you can control the watering “budget” using the Water Level field under the device options page. This can also be adjusted using the web app, which is really handy if you have an iPad, iPhone or Android. I love being able to turn on and off different zones while testing my sprinkler setup remotely using my Android phone. Also, I have the expansion board and have not had any problems with scheduling or activating zones 9+. That’s an interesting issue.
craigmwParticipantI wonder if it would just be simpler to build your water monitoring system around an Arduino. They have lower power consumption than an RPi, and with a cheap RTC shield and a WiFi shield, you would be able to log and retrieve data via the web.
craigmwParticipantWhat happens if you disconnect the OSPi GPIO pins from the OSPi board, but keep the power connection? If you disconnect the I/O wires but keep the smaller wire bundle for power connected, does the RPi still fail? This would at least tell you if it was a problem with the GPIO interface. Perhaps the GPIO wire bundle is shorting out somehow?
craigmwParticipant@dblessing wrote:
At a quick glance, I don’t see why One-Wire stuff wouldn’t work. It would be nice to know what I2C address those sensors use. Currently, with the OS board and the LCD my I2C address table looks like this:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
The above is found my running `i2cdetect -y 1` for the Rev2 Pi. Those addresses translate to 0x20, 0x48 and 0x68. The 0x20 is the LCD and the 0x48 and 0x68 are the OSPi. Don’t quote me.
Looks like Maxim/DS provides a 1-Wire/I2C bridge chip called the DS2482 that could handle the interfacing between I2C and the 1-Wire bus.
http://www.farnell.com/datasheets/1675710.pdf
According to the data sheet: “The I2C slave address assignment is controlled by two binary address inputs, resolving potential conflicts with other I2C slave devices in the system.” Given the large number of 1-Wire devices (thermocouples, thermistors, switches, ADC, pressure transducers, etc), this could be a viable way to interface with the “outside world” using the RPi mounted onto an OSPi. The downside is that 1-Wire stuff is relatively slow, but fine for most applications that would be hosted by an RPi.
craigmwParticipantGood to know, as it would be nice to use the same RPi for doing other things. I’ve already got a mini-stable of them. Two for OSPi and one for my music server. Many more on the way for various other tasks, so it would be nice for me (and my router) to consolidate some of these tasks onto existing RPis. I’d like to be able to use One-Wire devices for some of these tasks. Would that be doable with the OSPi connected as such?
craigmwParticipantDoes the RPi do okay when you separate the two boards, but have the RPi powered by the OSPi board? If so, it does seem like there may be a short with the support pillars, or perhaps a faulty wire that could be losing its connection when the boards are connected.
craigmwParticipantSo, the GPIO pin usage by the LCD display doesn’t interfere with the GPIO pins needed for the OSPi?
craigmwParticipantMaybe we are overthinking this. For most of us using this to control sprinklers in our yards, a simple Water Index value as such would be most appropriate:
http://www.bewaterwise.com/wat_index_02.html
Perhaps I can email them to find out what parameters they use to come up with their Water Index (WI) value.
Edit… Okay, the Watering Index is simply: (ETw / ETwm) * 100, where ETw is the total of the previous 7 day ETo values, ETm is the highest weekly ETw in the last year. This is pretty straightforward, but the real issue is how to obtain those ETo values. This is not particularly difficult in California due to the CIMIS system (http://wwwcimis.water.ca.gov). I’m not certain how one would automatically obtain those values for a specific location using the web. If that were doable, it would be great for those of us in California. But, it would be preferable to have a way to use web-based weather data to estimate ETo for a specific location, in the spirit of providing this functionality to everyone. After looking through the calculations, it doesn’t look all that simple. The simplest calculations only consider temperature. Also, the Penman–Monteith equation appears to have several variables that are unlikely to be readily available from weather sites. However, some of those variables may be less likely to change over a yearly basis, and thus could be removed from the calculation as the WI gives a ratio, not an absolute value. We really don’t need to know the predicted volume of water lost, just a daily fraction of water lost to evapotranspiration vs. the maximum daily water lost for a specific location.
craigmwParticipantDan:
Yeah, as I’m also in California, I’m aware of the local ET info. In my case, and likely the case of most that have typical landscaping, my zones are a mix of different types of plants and vegetation. So, I really just need to come up with an averaged value for the entire property based on our location. Monthly historical values would make little sense. Here in SoCal, as you know, one day it can be raining and the next day, we have Santa Ana winds. Even on a day where there is some sprinkling, it might make sense to have some watering. So, it would be nice to simply come up with a simplified algorithm taking into account humidity, precipitation, wind, and temperature to alter the Water Level parameter.
craigmwParticipantI agree, Samer. This would have to be reasonably rock solid. A commercial example of this is:
http://www.rainbird.com/landscape/products/controllers/ETmanager.htm
I will look around to see if I can identify some solid algorithms that would take into account weather data (e.g. wind speed, humidity, temperature, rainfall, etc) that spits out a reasonable evapotranspiration value that might be easily used for this.
As for killing someone’s yard while on vacation, there are several issues here. First, if the hardware goes on the fritz in an infinite loop, this could lead to uncontrolled open valves and flood something, which would be bad. I would think that coming home to some dead plants would be the better alternative than a flooded neighborhood or thousand dollar water bill. Even so, this is a hardware problem that could be addressed with other hardware, but beyond the scope of our discussion.
craigmwParticipantThanks Samer and Dan. I guess I need to investigate how these work already! In any event, how difficult would it be to access the weather underground data and use this to tweak the Water Level parameter?
craigmwParticipant@salbahra wrote:
That actually exists and is referred to as the water level and can be adjusted from 0-200%.
Sorry I haven’t read your whole post been a busy afternoon and will hopefully digest it more later but it sounds like you have got everything working now!
Samer – Yeah, I figured this out just now looking at the Device Settings page. Given this, how difficult would it be to add a subroutine to check for evapotranspiration info? If that water level parameter is stored in a file, would it possible to set up a small cron job to alter the parameter in the settings file once a day? I would guess that a Python program would be capable of doing so, or it could be added to the interval program. Would changing the parameter in the file impact the interval program (i.e. would the interval program update its stored water level value by loading it from the file, and if so, how often does it do this)?
craigmwParticipantDan – One other thing…
On the Wiki page for your program on the OSPi, you might want to add a SLEEP 60 to the section on automatically starting up the interval program. I had trouble with this because when I switched to a Class 10 SD card. Apparently, there is not enough time for the RPi to gather the WiFi IP address before the script runs. Putting a SLEEP 60 just before your code in rc.local seems to fix this. I had been running my OSPi with a Class 4 SD card, but it became corrupted and I switched to a Class 10 card. After this, the interval program would not autoload.
My rc.local is:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.# Print the IP address
_IP=$(hostname -I) || true
if [ “$_IP” ]; then
printf “My IP address is %sn” “$_IP”
fisleep 60
host=$(hostname -I | sed ‘s/ *$//g’)
port=:8088
cd /home/pi/OSPi/
## If you aren’t sure that the path to python on your Pi is /usr/bin/, use whereis python to determine the location
/usr/bin/python ospi.py $host$portexit 0
craigmwParticipant@salbahra wrote:
@craigmw I can confirm this feature works so there is probably something configured incorrectly. The best thing to do is to use the program preview for guidance. Make sure the program interval is greater than 0. Make sure if you are using multiple programs with the same start time that the selected stations don’t overlap between programs. Maybe give us some generic information on how your programs are setup and we can help further.
Samer – Wow, you are quick! I think I’ve figured this out. Previously, I had three programs two of which that started at 3:30 (end time at 5:00). One of these programs was set to run for 4 minutes on all stations, and the second was to run 4 additional minutes on two stations. A third program was set at 14:00 to run two stations. The two programs set to run at 3:30 did not show up together. I could see the events at 3:30 all from one program (on the 9 stations), and the events at 14:00 (on 2 stations). Note that the three programs I had scheduled ended up in reverse order (due to a previous bug).
So, within your webapp, I deleted all three programs to redo this and it now works fine. I set up Program 1 to start at 3:30 AM (end time at 5:00 AM) to run all 9 stations with 4 minute duration and 1439 minute interval (to run only once daily). Program 2 was originally set for 3:30 to 5:00 AM to run only on two zones that need extra water, 4 minute duration and 1439 minute interval, and Program 3 from 14:00 to 14:30 with 4 minute durations and 1439 interval also to run on 3 stations that need more water. This time, I could see that Program 1 and Program 2 were interspersed, with the two stations in Program 2 showing up interspersed with Program 1 events. So, I adjusted the duration for Program 2 to 8 minutes, and now I see Program 1 and 2 events interspersed with 4 minute durations for 7 stations, and 9 minute durations for the two. Program 3 shows up with events at 14:00.
So, I think I get the logic now. If you want different times per station, you need to add programs with an incremented program number on top of a base program (e.g. Program 1). The additional program(s) need to have the intended duration set… the events in additional programs scheduled concurrently do not add time to the “base” program. So, it seems that this must be calculated on the fly (e.g. as the schedule is running, or in the Preview Programs page).
It would be amazingly cool (and far beyond what is currently out there from my understanding), if the calculated durations could include a multiplier (e.g. duration * multiplier) where the multiplier could be 0 to 2 (e.g. 0 to 200%). A daily call to an internet weather site for location specific evapotranspiration info could be used to set the multiplier based on precipitation, humidity, wind, temperature, etc. This would be far more refined than just having the programs turn off when the Rain Delay is flagged manually.
-
AuthorPosts