OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Interval Program V2.0.1 available

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

    Dan in CA
    Participant

    This release includes:

    1. A fix for the irrigation timeline on the Home page

    2. The addidion of a “Plugins” button to the Home page

    The timeline display
    The Home page irrigation timeline had several problems that could not be easily fixed by a simple tweak of the code. It required a full-on “function transplant”.
    Because I did not write the code for the new UI, it took a bit of time to figure out how things work. The curent update seems to be doing much better now but still needs some additional work to implement a display of Master valve operation.

    While digging around in the code for the timeline I found a feature that has not been fully documented before.

    The irrigation timeline actually displays data from two different sources:

    Irrigation events that are scheduled and are either currently running or scheduled for a future time are shown as markers with white stripes. This data is generated by a simulation of the Interval program’s operation. if you click the “Next Day >>” button on the timeline you will be viewing a full simulation of the irrigation programs you have defined for that day.

    Irrigation events that have already occurred will only be shown if logging is enabled and solid color event markers are created from log data. If you have logging enabled and click the “<< PREV DAY" button on the timeline you will actually be viewing a graphical representation of the log data.

    when you are viewing the current day’s timeline (the default view), you are seeing a combination of the two data sets.


    The new Plugins button

    The Plugins button opens a drop-down menu with links to plugin URLs.
    A link can point to a web page containing user controls, displays, more links, etc, like the “Monthly Adjust” example plugin, or it can point to a Python class in your plugin that causes some action to occur like the “Test Relay” example.

    If you are writing a plugin and want to add it to the menu, you will need to have imported the “gv” module into your plugin. You may have already done this since the gv module provides access to all of the Interval program’s settings and other “global variables” as described in the gv_reference.txt file in the OSPi directory.

    With that in place, you only need to add one line of Python code to your plugin like so:

    gv.plugin_menu.append()

    where:

      ‘Menu Text’ is the name of your plugin or other text you want to appear on the menu and,
      ‘url’ is a URL for the link.

    With this line added, somewhere near the top of your plugin, it will be automatically added to the menu when the plugin is loaded.
    In the “Monthly Adjust” example plugin the line is:

    gv.plugin_menu.append()

    The menu is not yet styled and is rather crude looking but I wanted to get the basic functionality in place and available for use. There are some other changes to the program in the works and time is limited so I will leave the UI styling to others.

    To update to this version from GitHub
    It is recommended that you use the “fetch – reset” method rather than a simple “pull” ie:
    #make sure you are on the master branch

    git checkout master

    #fetch the new version form GitHub

    git fetch

    # reset to the new version

    git reset --hard origin/master

    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

    If you are updating from a pre-v2.0 rev, this update method is required.

    Dan

    #27320

    scottsh
    Participant

    Awesome new Plug-in UI code! I was driving home tonight thinking that this was needed. I’m working on porting my plug-in over now.

    #27321

    Alan
    Participant

    Dan,

    After I upgraded to the latest version, I noticed that the timeline is not displaying the Odd/Even day programs correctly. I have my program set for even days, yet the timeline is showing it on the odd days.

    #27322

    Dan in CA
    Participant

    Thanks.

    I’ll check it out. That should be an easy one to fix.

    Dan

    #27323

    eecyclone
    Participant

    I have a 3 day cycle with program 1 set to run on day 1, program 2 on day 2, and program 3 on day 3. The log shows that program 1 ran yesterday morning and program 2 ran this morning. However, the timeline shows program 2 running tomorrow, Thursday, Friday, and so on… The mobile app shows the program preview as cycling correctly through the 3 programs every 3 days. I don’t have any ideas why this would be but I wanted to report the issue.

    #27324

    Dan in CA
    Participant

    eecyclone ,

    This could be the same problem Captn Avenger reported. Your reports provides a valuable clue about the possible cause.

    Thanks.

    Dan

    #27325

    eecyclone
    Participant

    @Dan in CA wrote:

    eecyclone ,

    This could be the same problem Captn Avenger reported. Your reports provides a valuable clue about the possible cause.

    Thanks.

    Dan

    Also if it helps, the program preview was not doing this until I updated to 2.0.1. The programs were showing up fine in 2.0.0. My program preview issue with 2.0.0 was with sequencing (if I set programs 1, 2, and 3 to run on the same day, they would all show as running at the same time) However, sequencing in program preview is fixed with 2.0.1. I did a little bit of testing, and when I have the interval set to start in 1, or 2 days, the program preview does not display. It is only able to be previewed when the interval start in setting is set to be starting in 0 days. Let me know if you need me to explain what works and doesn’t work more clearly.

    #27326

    Dan in CA
    Participant

    That helps.

    I am testing the updated code and have found some possible problems.

    Dan

    #27327

    prb
    Participant

    In addition to the problems outlined above in 2.0.1 I’m also seeing this:

    I have recurring programs defined to start at 06:00 and running until 09:00 and running with an interval of 1 hour for a duration of 15 minutes. Previous to 2.0.1 this would run the zone 3 times for 15 minutes each. Now the homepage preview shows these programs running 4 times with an additional run starting at 09:00.

    – paul

    #27328

    Dan in CA
    Participant

    Paul,

    Thanks for the report. I see the problem and it is fixed for the next update.

    Dan

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Interval Program V2.0.1 available