OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Python Interval Program 1 year aniversary and version 2.0

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #22956

    Dan in CA
    Participant

    Hi all,

    Today, June 9 2014 marks one year since Ray announced the availability of the Python Interval program for OpenSprinkler Pi.

    To celebrate the occasion I would like to announce the release of version “2.0” of the software. This project has truly become a community effort and I want to thank all who have contributed. This includes everyone who has reported bugs, requested new features and especially those who have added to the code.

    The program was originally a port of algorithms Ray developed for his Arduino based OpenSprinkler. Users have requested new features such as logging, selecting zones that “ignore rain”, and “run now” buttons on the program page, etc.

    Samer Albahra includes support for the program in his mobile app and is continuing development with his latest version.

    Jonathan Marsh has given the web UI a complete makeover replacing Ray’s original JavaScript code from the micro-controller firmware with jQuery based code that is designed to be easily customizable. This is one reason the version number no longer refers to “Firmware”. Jonathan’s UI is now the default UI of the program.

    Nayr contributed valuable network security instructions to the Wiki:
    http://rayshobby.net/mediawiki/index.php?title=Secure_Remote_Access

    Recently, a couple of users have contributed improvements to the program via GitHub pull requests. This is greatly appreciated. However, due to the timing of this release and the fact that merging Jonathan’s UI with the core program required a lot of manual file merging, some of those recent updates may have slipped through the cracks. I have downloaded the patch files and will be checking to make sure those updates get re-added if they are not already in the code.

    One of the most exciting developments is the work being done to create plugins for the program. Especially Scott Schafer’s project to write a plugin that allows users to irrigate based on the amount of water to be applied taking into account natural precipitation.
    http://rayshobby.net/phpBB3/viewtopic.php?f=28&t=653

    The plugin architecture is intended to make it easy for anyone to add new features to the program (not necessarily irrigation related). Scott has added some instructions for writing plugins to the wiki based on his early experience:
    http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#Plugins

    I will be adding some additional detail as time permits.

    ##############################
    Important: Due to the nature of the changes in the new version a normal “git pull” will result in merge conflicts. The recommended way to update to this version is to issue the following commands from the program directory (OSPi) :
    #make sure you are on the master branch

    git checkout master

    r
    #fetch the new version form GitHub

    git fetch

    # reset to the new version

    git reset --hard origin/master

    alternatively, follow the instructions on the wiki for updating from an older version (starting with step 2)
    http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#From_an_older_version_not_installed_using_git

    Once the update has been completed, reboot the system
    or
    if you are using the init.d script contributed by Denny Fox:
    http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#An_alternate_method:
    restart the program with:

    sudo service ospi restart

    You can still access the older version of the program by logging in to the program directory on your Pi or Bo and using the git command:

    git checkout firmware_based

    to switch to that branch. You will need to reboot / restart the program for the change to take effect.

    Enjoy and please report any bugs.

    Dan

    #27121

    eecyclone
    Participant

    Congrats on your program and thanks to you and all others that have contributed to it!

    I just got my OSPi running on my desk and have updated to version 2.0. I love the new look of the web interface! Now I just need to actually install it in my garage and start using the OSPi for real! I’m looking forward to future add ons and other improvements.

    #27122

    dpackham
    Participant

    did the logfile location change? i cant find it anymore

    #27123

    Samer
    Keymaster

    It’s now stored as JSON data under the data folder.

    #27124

    dpackham
    Participant

    ahh i was NFS mounting it to a NAS.

    hmm many json files. what should i move to the NAS and link back?

    THanks

    #27125

    Samer
    Keymaster

    Just the single file: log.json within the ./data folder

    #27126

    dpackham
    Participant

    Cool. Thanks

    #27127

    atatistcheff
    Participant

    I’m having some issues with the 2.0 version. Can you point me to instructions on switching back to the firmware_based branch? Also, if I want to try out 2.x again in the future is it as simple as moving the OSPi folder and doing a fresh install via git? I followed the instructions here: http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi#From_an_older_version_not_installed_using_git to install 2.0.

    Thanks!
    Alex

    #27128

    Samer
    Keymaster

    Other than the program preview, are you having other issues?

    I think moving forward it’d be better to fix the bugs in 2.0 than reverting back. Furthermore, 2.0 offers some new features including logging support for the mobile app. I will take a look at the program preview and see what I can fix however just to clarify, is it just the preview thats wrong or are the programs running incorrectly in 2.0?

    Thanks

    #27129

    atatistcheff
    Participant

    think moving forward it’d be better to fix the bugs in 2.0 than reverting back. Furthermore, 2.0 offers some new features including logging support for the mobile app. I will take a look at the program preview and see what I can fix however just to clarify, is it just the preview thats wrong or are the programs running incorrectly in 2.0?

    Yes, using the newest version is definitely the preferred route. I think some of the programming screen issues I saw were related to my (so far unsuccessful attempts) to get the Apache SSL reverse proxy working. As for the display I do believe the stations are functioning sequentially, at least they did this morning. The preview sometimes looks right and others not so much.

    These are the programs: https://www.dropbox.com/s/odk65wwtihp1thz/Screenshot%202014-06-12%2007.41.02.png

    This is the corresponding schedule preview for today (an even day)
    https://www.dropbox.com/s/esh4f4sinpdvvlo/Screenshot%202014-06-12%2007.35.45.png This actually looks right, the Programs show running in sequence right after another.

    Tomorrow (an odd day) it’s not looking so good. https://www.dropbox.com/s/wgnw35o57utv113/Screenshot%202014-06-12%2007.44.37.png According to the schedule, on Friday it should be Programs 1,2,3,6,7. However on this day it only shows program 1.

    On Saturday the 14th we should be back to Programs 1,4,5 just like today but the screen shows all the stations coming on at the same time. https://www.dropbox.com/s/gg0wibwfudbp6mq/Screenshot%202014-06-12%2007.48.02.png

    For all of the above programs, the mobile Android app shows them perfectly sequenced lining up with the schedule like they actually run.

    #27130

    atatistcheff
    Participant

    Might have spoken too soon. I do get pages that load intermittently without the style sheets or something. Clicking the Programs button just returned this page:

    https://www.dropbox.com/s/3t9om8z8c8lsvvg/Screenshot%202014-06-12%2007.55.48.png

    I refreshed the browser and it displayed normally.

    Shortly after, I clicked on the logs link and got this one:

    https://www.dropbox.com/s/1fldu8jdobv81b9/Screenshot%202014-06-12%2007.56.13.png

    I am using the wired connection to the Pi instead of Wifi for a more reliable connection at least that’s what I’m hoping 😀

    #27131

    virtus
    Participant

    Looks great!

    I wrote a plugin for garage door control and status (hopefully I’ll be able to post it when I return from a trip next week). The plugin consists of the plugin py file and one html file in the templates folder. It works fine with version 2.

    Here’s my question: Is there a way to add information or buttons to the home page without editing the home page itself? I’d prefer to keep my plugins simple and self contained so I don’t have to redo anything when there are updates to the python program.

    So as it stands now – I have a separate page that shows the garage door status and buttons to control them.

    #27132

    Dan in CA
    Participant

    @ atatistcheff,

    Thanks for your bug repports.

    I will be working on fixing things this weekend.

    @ virtus,

    Great news that you have the garage door plugin working!
    I knew the question about adding buttons to existing pages from plugins would come up. I think there should be a way to do it but I don’t have a good answer yet.

    EDIT: Got an idea.
    We could add a “plugins” button to the home page (or all pages) that opens a drop down menu that could be populated from a global dictionary with links to any number of plugin pages.

    What do you think?

    Dan

    #27133

    virtus
    Participant

    @Dan in CA wrote:

    EDIT: Got an idea.
    We could add a “plugins” button to the home page (or all pages) that opens a drop down menu that could be populated from a global dictionary with links to any number of plugin pages.

    What do you think?

    Dan

    That would certainly work.

    EDIT: Doh. So I’ve got too many projects going on at once and mixed up Python and PHP. Too many late nights. Anyway, I think that it would be wise to move to a better templating system. As it stands now you need to edit every single HTML page if you only want to change something simple like the footer. A more modular approach would make it easier to manage/edit the web interface and open the door to user additions. It’s really easy to do in PHP, but I’m not familiar enough with python to suggest how to implement it.

    #27134

    dpackham
    Participant

    i noticed a BUNCH of files in the session dir… when do those get deleted?

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Python Interval Program 1 year aniversary and version 2.0