Forum Replies Created
-
AuthorPosts
-
Dan in CAParticipantDave,
Its been a while since I tried running ospi.py without auto start.
I forgot that if you start the program using SSH and then log out of SSH, the program will die. I tried it and got the same error message you did when I tried to access the web interface.Dan
Dan in CAParticipantLooks like that got left out of the latest update on GitHub. Its back now.
Thanks for reporting this and sorry for the inconvenience.
Dan
Dan in CAParticipantDave,
Since it is also dropping the SSH connection it sounds like the Pi is rebooting for some reason. Is there any large appliance on the same circuit e.g. heater, microwave?
You could add a line to /etc/rc.local like:
date >> /home/pi/boot.log
This will create a log file in the pi home dir with a time and date of each boot.
Dan
Dan in CAParticipantDave,
Looking at the last couple of lines in the error message It seems that the server is trying to write to a log file and failing. As far as I know the server should not be logging anything.
Did you use Ray’s pre-configured image file for the installation? The latest version of the program on GitHub includes a beta of a new UI but it is too early to use that for regular operation.
If you installed the software from GitHub were you using the most recent rev of Raspbian as the operating system? something may have changed there.
I would suggest setting it up for auto start at boot and see if that changes anything. It is interesting that the problem occurs overnight.
I haven’t seen this before.
Dan
Dan in CAParticipantHi Dave,
Can you still access the Pi via SSH when this problem shows up?
The message indicates the built in server is having a problem but I’m not sure what’s causing it. When you say “refresh” the page, are you re-linking to it or just reloading the page?Dan
Dan in CAParticipantQMan,
Thanks for the tip on Sunwait.
I see it takes Lat-Lon in decimal degrees as the location. That is also what is needed for ET calculations and can be used with e.g. Weather Underground. The original location input Ray used is by city name or zip code. Latitude, longitude is more accurate and I think more useful, it can be used world wide.Dan
Dan in CAParticipantHi Mike,
Hopefully Samer will check in with an answer to your question about temperature with his app.
As far as the location feature in the Python program, it has not been implemented so far. I included it in the options stuff since it was part of Ray’s original code.
Also, I had not implemented the rain/freeze sensor functionality because there was not a connector for it on the original OSPi board. It has been added now to support the new Beagle Bone Black version which does have a connector for a rain/freeze sensor. I also see that Ray is planning a new OSPi version that will have that included.
It would make sense to have a sensor to adjust your system for your local conditions. You have probably seen Denny’s post on the subject:
viewtopic.php?f=28&t=311I am looking at the options for more advanced automatic weather based irrigation adjustments. That was my original motivation for getting involved in this project but I would like to develop something that can be used world wide. I use a drip irrigation system which makes it fairly easy to determine how much water is being applied during each watering cycle. That information needs to be included in order to make accurate adjustments.
Dan
Dan in CAParticipantI pushed an updated version of ospi.py to GitHub with error checking added for this problem.
The reason the rain sensor code was added to the program was to allow use of the built in rain sensor connector on Ray’s new Beagle Bone Black version of OpenSprinkler. If you want to hook up a rain sensor to the Pi version please follow Denny’s instruction at the start of this thread.
Dan
Dan in CAParticipantIt’s basically a bug.
Since the RASPi version does not have a rain sensor connection by default you need to follow Denny’s instruction for hooking it up and modifying the code as he describes at the beginning of this thread.I will look at fixing the code so it won’t cause an error if “use rain sensor” is selected without the other modifications.
Dan
Dan in CAParticipantHi Wayne,
An interesting idea!
There are some changes to ospi.py taking place “under the hood” and a couple of them will probably help you accomplish what you want.
Jonathan Marsh has been reworking the native UI of the program and one of his innovations is a “status API” that allows easy access to what the program is doing. If you have a recent rev of the program, you can log in to the OSPi directory and issue “git checkout Web_Py_UI” to switch to his work-in-progress branch. Once you have the program running with the new UI, add /api/status to the URL of your system, you should see the output of the API.
Another change that is coming soon is the addition of nginx (engin x) server to the setup. It can support sending email messages.
Perhaps a combination of the two would give you the tools you need to make something work. Contributions to the project are always welcome and I will do what I can to help.
Dan
Dan in CAParticipantTake a look at this post:
http://rayshobby.net/phpBB3/viewtopic.php?f=28&t=339#p2270Be sure you use the settings for the rev of the RASPi board you have.
Dan
Dan in CAParticipantBiojardim,
I just pushed an update to GitHub. The problem you described should be fixed now.
Dan
Dan in CAParticipantPablo,
If you use logging on the OS Pi, you might find the post on the wiki about logging and SD cards helpful:
http://rayshobby.net/mediawiki/index.php?title=Set_Up_RPi,_RTC,_WiFi,_Data_Log#Data_Logging_on_the_Raspberry_PiI am using an 8GB SanDisk “Curzer Fit” flash drive on my Pi. It is so small it can fit inside the OS Pi’s cover without needing to cut a hole. It can be replaced when it wears out without having to mess with the SD card.
I agree with your suggestion about a feature comparison chart. The OSPi program is going through some growing pains right now and users keep cumming up with great ideas for new features so it is a little hard to pin down.
Hopefully Ray will come up with another embedded Linux platform that is more reliable. I think the OSPi software would be fairly easy to move to something like that.
Dan
Dan in CAParticipantRobert,
Welcome to the forum and glad you found the problem. You had me worried for a bit.
Dan
Dan in CAParticipantThose are really good resources.
Thanks for posting them.
Dan
Dan in CAParticipantThe problem has been solved for a couple of users by adding the following key-value pairs to OSPi/data/sd.json.
The file should include:
"name": "OpenSprinkler Pi", "snlen": 32
probably not in that order since it is a dictionary (hash) file
The program contains code to automatically add these when the program starts. So far, it seems to fail in cases where the program has been modified by the user. I’m not sure why that is but will be looking for a cause.
Dan
Dan in CAParticipantDenny,
It looks like there is a problem with OSPi/data/options.txt file on your system.
It should look like the following:var opts=[
["System name","string","name","Unique name of this OpenSprinkler system."],
["HTTP port","int","htp", "HTTP port (effective after reboot)."],
["Location","string","loc", "City name or zip code. Use comma or + in place of space."],
["Time zone","int","tz", "Example: GMT-4:00, GMT+5:30 (effective after reboot)."],
["Sequential","boolean","seq", "Sequential or concurrent running mode"],
["Extension boards","int","nbrd", "Number of extension boards"],
["Station delay","int","sdt", "Station delay time (in seconds), between 0 and 240."],
["Master station","int","mas", "Select master station"],
["Master on adjust","int","mton", "Master on delay (in seconds), between +0 and +60."],
["Master off adjust","int","mtoff", "Master off delay (in seconds), between -60 and +60."],
["Use rain sensor","boolean","urs", "Use rain sensor"],
["Normally open","boolean","rst", "Rain sensor type"],
["Water level (%)","int","wl", "Water level, between 0% and 250%."],
["Enable logging","boolean","lg", "Log all events - note that repetitive writing to an SD card can shorten its lifespan."],
["Maximum log entries","int","lr", "Length of log to keep, 0=no limits."],
["Ignore password","boolean","ipas", "Ignore web password"]
];Check it and let me know.
Dan
Dan in CAParticipantHi Denny,
I’m glad the update went OK for you.
There are some cool changes in the pipeline and you will be set to take advantage of them.
Dan
Dan in CAParticipantMike,
Those are great links. I hadn’t seen them before.
Thanks.
Dan
Dan in CAParticipantKris,
That link you provided is to the paper by Samani and is what the current Hargreaves-Samani calculations are based on. It uses min and max temperature plus latitude. They estimate solar radiation from temp and location data, then use that to calculate ET.
What I am planning to do is use ET data directly when available, then Penman-Monteith if solar radiation data is available, then Hargreaves-Samani if limited weather data is available, and as a last resort, use historical weather data.
Ideally the weather data input should be automatic such as by accessing WeatherUnderground on a daily basis. WU provides data for many parts of the world and is probably a good starting point using Hargreaves-Samani.
In some locations such as California there is a specialized network which provides free access to irrigation oriented weather data:
http://wwwcimis.water.ca.govI believe Australia has a similar network and probably more will come online in the future.
One of my goals is to make the system useable world wide as much as possible. It will require being able to acquire weather data from several different sources. This is the tricky part and will need to be developed over time.
As semag mentioned in an earlier post, some jurisdictions are providing home owner oriented irrigation recommendations to help conserve water. This should also be taken into consideration and implemented in the software where possible.
There is another factor that needs to be included in the calculations in order to arrive at a reasonable irrigation schedule. That is the type of plants being irrigated be it lawn, shrubs, vegetables, etc and including growth stage. This is known as “crop factor” or “Landscape factor”.
There is an excellent publication that discusses the application of these things in relation to landscaping:
http://www.water.ca.gov/pubs/conservation/a_guide_to_estimating_irrigation_water_needs_of_landscape_plantings_in_california__wucols/wucols00.pdfThis is just a starting point and I look forward to any input others have to offer.
Dan
Dan in CAParticipantThis is a great thread.
I have been looking into this for a while and there is another equation (Hargreaves-samani) which is designed to work with a minimum of weather data.
It only requires min and max temperature. Both Penman-Monteith and Hargreaves-samani use latitude as part of the calculation.
WeatherUnderground can be used with Lat-Lon as location data. This is more specific than postal code or city name and can be used world wide.For the Python Interval program I already have Python code for both equations but if someone wants to write a C / C++ (or any other language) version there is a PDF file containing step by step instructions at:
http://biomet.ucdavis.edu/Evapotranspiration/PMdayXLS/PMdayDoc.pdfCalibration of the irrigation system is an important part of getting this to work properly since the calculations provide irrigation requirements in terms of inches or mm of applied water (like inches or mm of rain). This also allows for taking precipitation into account.
OpenSprinkler and OS Pi both support a percentage adjustment to the irrigation time as “Water level” so there is a start.
I look forward to seeing how this develops.
Dan
Dan in CAParticipantHi Mike,
There was an update just before the 9/23 one which had that problem.
If you try to check the rev page by adding /rev to the URL of the program you should get a page with a few lines of text that should include
ospi.py revision: 135If it says revision 134 or you get a not found error, you just need to update to the latest version.
If you are running revision 135 and are still getting the error, please let me know.
Thanks.
Dan
Dan in CAParticipantJust when I was thinking the program was getting stable and I could concentrate on some evapotranspiration calculations (weather based irrigation stuff…).
These suggestions are definitely interesting. I will give it some thought.
@Denny,
Thanks for the link to the Git book.
I’m new to Git also and that looks like a great resource. As a Windows user I have found TortoiseGit:
http://code.google.com/p/tortoisegit/
to be extremely helpful, especially since I’ve been using TortoiseSVN as my internal version control system throughout this project.@Ingo,
What sort of menu option would you suggest for the rain sensor pin define? An addition to the Options page comes to mind but your suggestion for the CPU temp. toggle was excellent and didn’t add to the already long Options page.Thanks.
Dan
Dan in CAParticipantI just pushed an update to GitHub with a fix.
Dan
Dan in CAParticipantIngo,
I made a couple of changes to the way Station status is displayed and pushed the update to GitHub.
See if it works better for you.
I still haven’t seen the problem of a run not being logged.
Dan
-
AuthorPosts