OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPi Major Update Available
- This topic has 20 replies, 9 voices, and was last updated 5 years, 4 months ago by JimS.
-
AuthorPosts
-
October 7, 2014 at 8:55 pm #23197
Dan in CAParticipantThis is a major revision of the program code.
For upgrade instruction, see the wiki at:
http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#From_an_earlier_version
A simple “git pull” will not work for this update.Please note that the version number (2.1.0) refers specifically to the Python project and it is not identical to the micro-controller version of OpenSprinkler with the same number. They just happened to arrive at the same revision number at the same time. However, one goal of this project is to maintain feature parity with the Micro-controller version.
Many thanks to Rimco Boudewijns (The Netherlands) for his work to clean up and re-organize the code, making it conform to Python standards and improving maintainability. I have learned a great deal from him.
Rimco is continuing to develop a fork of the project on GitHub. He has renamed his project files from ospi to ospy to avoid confusion. If you are into software development be sure to take a look at his “refactor” branch. His fork is at:
https://github.com/Rimco/OSPyHere are some highlights of this version:
1. Martin Pihrt (Czech Republic) has contributed a number of plugins which can be found in the plugins sub-directory. They are disabled by default since not everyone will want to use all of them. You can enable any that you are interested in by logging into OSPi/plugins and changing the group permission to executable on the plugin file of interest:
sudo chmod 776 ./[filename].py
(without the [])These are his plugins:
- a. system_update.py – Update the ospi system from within the native web UI
b. sms_adj.py – uses SMS data for modem to control your ospi by phone
c. lcd_adj.py – for using a 16×2 LCD display with ospi.
d. pcf_8591_adj.py – for using a pcf8591 ADC with ospi
e. pressure_adj.py – to monitor water pressure when master station is on
f. email_adj.py – Sends email messages from ospi to a gmail address of your choiceSee the comments in the python plugin files for more details. If you go to martin’s web page you’ll probably want to use google’s Chrome broswser because it will offer to translate the site’s contents for you. His web site is in Czech.
Martin has also helped develop a system for translating the web UI into multiple languages. We have created a working system that can easily be switched between English and Czech. The next update will have a language option and a simple text file that anyone can use to translate the UI into their own language.
2. One unexpected improvement from Rimco’s code changes is faster page loads for the native web UI.
3. Andrew Radke (Australia) contributed an extension to the CSS for the web UI that allows the program to be used directly on small screen devices such as tablets etc.
So far this version seems stable and bug free. Samer Albahra (Texas) has tested it with his mobile app and it is good to go. That said, please don’t hesitate to post about any problems you find.
The plan going forward is to return to incremental updates with added features, UI improvements and of course I look forward to some really great new plugins from the community.
Dan
October 8, 2014 at 3:56 am #28443
RayKeymasterCool, very excited to see the new development. The plugins, especially the pressure plugin, are very interesting and I will be checking out them soon. Thanks for the great work!
October 8, 2014 at 8:32 am #28444
pierantonioParticipantHello, this is a great update!!
Very faster and perfect for mobile devices!
Now i have i problem with this release.
If you want to set the system in off now appear a error message with “internal server error” and you can’t with off the system.Thanks in advance!!
Bye, PierantonioOctober 8, 2014 at 11:31 am #28445
pierantonioParticipantan update..
the internal server error appear also in stop all stations
i’ll tried to reinstall entire apache web server, rebooted many times, but the problem persist.
I tried to delete entire ospi software with it’s folders and reinstalled all but the problem persist.thanks
October 8, 2014 at 3:43 pm #28446
Dan in CAParticipantThanks for reporting this. I see the problem also.
I will look into it today.
Dan
October 8, 2014 at 5:39 pm #28447
Dan in CAParticipantOK. I just pushed a new rev to GitHub to fix the stop stations bug. If you are running version 2.1.2 you already have the bug fix.
If you already updated to version 2.1.1 you can use
git pull
from the OSPi directory to get the bug fix. Otherwise use the instructions from the wiki mentioned in the original announcement.
@ pierantonio,
Just want to mention that the ospi program does not use the apache web server but a server built into the web.py framework.Dan
October 10, 2014 at 6:52 am #33185
pierantonioParticipantHello Dan!
Thanks for your support, now i had updated the software to v. 2.1.2 and all is ok! 🙂Thanks for your explanation about the built in server, I was not aware.
Bye, Pierantonio
October 13, 2014 at 2:44 am #33851
hespanhaParticipantI just upgraded version: 2.1.2 (2014-10-08) and I am getting an “internal server error”:
~/OSPi$ sudo python ospi.py
plugins loaded:
mobile_app
monthly_adj
relay
weather_adj
weather_level_adj
Starting timing loophttp://0.0.0.0:8080/
Checking rain status…
No rain detected: Mostly Cloudy. No action.
Monthly Adjust: Setting water level to 100%
Traceback (most recent call last):
File “/home/pi/OSPi/web/application.py”, line 239, in process
return self.handle()
File “/home/pi/OSPi/web/application.py”, line 230, in handle
return self._delegate(fn, self.fvars, args)
File “/home/pi/OSPi/web/application.py”, line 420, in _delegate
return handle_class(cls)
File “/home/pi/OSPi/web/application.py”, line 396, in handle_class
return tocall(*args)
File “/home/pi/OSPi/webpages.py”, line 57, in GET
return template_render.home()
File “/home/pi/OSPi/web/template.py”, line 1020, in template
return self._base(t(*a, **kw))
File “/home/pi/OSPi/web/template.py”, line 881, in __call__
return BaseTemplate.__call__(self, *a, **kw)
File “/home/pi/OSPi/web/template.py”, line 808, in __call__
return self.t(*a, **kw)
File “templates/home.html”, line 311, in __template__
<td class=”scheduleTick” data=”2″></td>
IndexError: list index out of range192.168.1.114:54115 – – [13/Oct/2014 00:39:34] “HTTP/1.1 GET /” – 500 Internal Server Error
October 13, 2014 at 3:23 am #33852
hespanhaParticipantI was able to resolve my problem by:
1) In the file OSPi/data/sd.json, replace
“nbrd”: 2
by
“nbrd”: 1
2) Login and change the number of extension boards back to 1 in the options (I do have one extension board)
3) In the process I lost the stations names, so I had to re-enter themMy system now seems to be mostly normal, except for an error when I try to use the weather-based water level plugin, for which the “status” box shows
Weather-base water level encountered error:
Traceback (most recent call last):
File “/home/pi/OSPi/plugins/weather_level_adj.py”, line 85, in run
history = history_info()
File “/home/pi/OSPi/plugins/weather_level_adj.py”, line 319, in history_info
‘humidity’: float(day_info[‘humidity’])
ValueError: could not convert string to float:October 13, 2014 at 9:58 pm #33870
Brendan CoupeParticipantI just moved from 2.0.3 to 2.1.2 and my CPU is maxed out. /usr/bin/python ospi.py is using 95% of the CPU.
I was not able to upgrade using the instructions that I found on the wiki.
The first link appears to be broken (all links may have the same double http problem – using Chrome on Linux):
WORKS: http://rayshobby.net/mediawiki/index.php/Python_Interval_Program_for_OSPi#From_an_earlier_version
After upgrade I got an internal server error. It appears that snames.txt in 2.0.3 has been renamed to snames.json in 2.1.2. Simply renaming the file did not fix the error. I decided to start clean rather than deal with any other upgrade issues.
The only file that I copied from the 2.0.3 data directory is the programs.json file. The CPU is maxed out with both the clean (no programs) programs.json file and the one copied from the 2.0.3.
October 15, 2014 at 5:56 am #33964
Crusader998ParticipantExcellent work! The only issue I have with this app is that its difficult to put it behind a proxy. allot of the links are hard-coded in the python code with links such as /wa or /sn. this means that it will hit https://mydomain.com/wa instead of https://mydomain.com/opensprinkler/wa
This makes it difficult to put behind a proxy where I would like to reverse proxy the site to https://mydomain.com/opensprinkler
Is it possible to make the code slightly more dynamic or if possible make it a variable that can be modified in a conf file or such?
Any thoughts?
October 15, 2014 at 11:53 am #33972
Dan in CAParticipantOctober 15, 2014 at 12:00 pm #33973
Dan in CAParticipantLet’s try this one more time since I can’t edit the previous post and there does not seem to be a preview option for posts.
http://rayshobby.net/mediawiki/index.php?title=Secure_Remote_Access
October 16, 2014 at 5:38 am #33989
Crusader998ParticipantYeh I could use a different web server on the PI but How do you solve the issue that alot of the code has hard reference such as:
jQuery(“button.manual”).click(function () {
sid = parseInt(jQuery(this).attr(“id”));
sbit = jQuery(this).hasClass(“on”);
if (sbit) {
window.location = “/sn?sid=”+(sid+1)+”&set_to=0″; // turn off stationOctober 16, 2014 at 6:16 am #33990
Crusader998Participantso under webpages.py doing the following would work well:
gv.baseurl = ‘https://mydomain.com/opensprinkler’
else:
web.config._session.user = ‘admin’
raise web.seeother(gv.baseurl + ‘/’)that way its compatible with the standard deployment and makes it flexible with more complex ones.
October 24, 2014 at 1:27 am #34163
aspruntParticipantI am experiencing the same issue as Brendan Coupe. Very high CPU utilization by python (as shown by sudo top from the command line). With OSPi stopped, CPU utilization is negligible. The web UI and even interaction via SSH are so laggy as to be hardly useable.
The installation was done cleanly from github. My repository is at 8d12fac. I configured the RTC using the instructions here. The only anomaly isÂ
pi@ospi ~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: — — — — — — — — — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — 48 — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — UU — — — — — — —
70: — — — — — — — —Which I’m afraid I don’t understand at all. Yesterday, “UU” was 68, but the “48” has been there the whole time.
I’d appreciate any suggestions. Otherwise, my next step will probably be to start the whole process again from a clean raspbian image.
Thanks
October 24, 2014 at 3:09 pm #34171
aspruntParticipantA closer reading of the i2cdetect manpage and this stackoverflow answer makes me think the “UU” at 68 is not a problem, in that it’s just indicating that there’s likely a chip (the RTC) at that address, which is already in use by a driver (presumably the one I installed).  So does anyone know if the device found at “48” is indicative of a problem?
October 25, 2014 at 9:23 pm #34202
RayKeymasterI’ve also seen this happening in the past, and I honestly don’t completely understand the UU mark. But all OSPi boards we sell have passed functional tests, which include RTC test — the tester verifies that the RTC exists, can be programmed with a time and can read back the time correctly.
February 20, 2015 at 6:47 pm #35619
StephenParticipantFor the “email_adj” plugin, would it be possible to add a field in the setup window called “Send Test Email” or something like that? That way, we could test our settings and make adjustments, rather than having to wait until the OSPi started its next cycle.
I have set it up with my email settings but as it is pouring with rain here in Brisbane, I had turned the whole sytem OFF through the GUI (not at the wall). In order to check my settings, I did a “run-once” but did not receive an email, so I suspect my email settings might be incorrect.
The plugin asks for “GMail username” – did this mean only email addresses like this work – “[email protected]” – or will email address hosted through Google APPS also work, so an email address like this – “[email protected]” – would work?
February 21, 2015 at 6:04 pm #35629
Dan in CAParticipantThe email_adj plugins was originally designed to work with gmail only as far as I know.
It is in need of some updating. I’ll take a look at it when I get a chance but that may not be very soon.
Most of the plugins are submitted by users and maintenance can be spotty.
Dan
April 26, 2019 at 6:37 am #59956
JimSParticipantWhere can I find the plug ins by Martin Pihrt? I looked around a bit and can’t find them.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPi Major Update Available