SIP
Keypad Plugin -WHat broke that Manual Program isnt an option - Printable Version

+- SIP (https://nosack.com/sipforum)
+-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1)
+--- Forum: Plugin questions (https://nosack.com/sipforum/forumdisplay.php?fid=6)
+--- Thread: Keypad Plugin -WHat broke that Manual Program isnt an option (/showthread.php?tid=248)



Keypad Plugin -WHat broke that Manual Program isnt an option - gdgeist@chickenmad.com - 2021 Jun 24

Edited for clarity - what broke that made this not work - want to fix but not looking to start from scratch
Html snippet:
Code:
                  <option value="-1" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '-1' else ""}>None</option>
                  <option value="0" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '0' else ""}>Start Manual Station</option>
                  <option value="2" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '2' else ""}>Set Water Level</option>
                  <option value="3" ${"selected" if 'dkeyfn' not in settings or settings['dkeyfn'] == '3' else ""}>Set Default Manual Station Time (minutes)</option>
                  <option value="4" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '4' else ""}>Set Default Rain Delay Time (hours)</option>
                  <option value="5" ${"selected" if 'dkeyfn' in settings and settings['dkeyfn'] == '5' else ""}>Start Rain Delay (hours)</option>

option value 1 is omitted but found in the python code:
Code:
    # Value functions
    FN_NONE = -1
    FN_MANUAL_STATION = 0
    FN_MANUAL_PROGRAM = 1
    FN_WATER_LEVEL = 2
    FN_MANUAL_STATION_TIME = 3
    FN_RAIN_DELAY_TIME = 4
    FN_START_RAIN_DELAY = 5
    # Function text must be 9 chars or less
    FUNCTION_TEXT = {FN_MANUAL_STATION:      u"Station",
                     FN_MANUAL_PROGRAM:      u"Program",
                     FN_WATER_LEVEL:         u"Water Lvl",
                     FN_MANUAL_STATION_TIME: u"Sta Time",
                     FN_RAIN_DELAY_TIME:     u"RDly Time",
                     FN_START_RAIN_DELAY:    u"Rain Dly"}

and later in the same keypad.py:
Code:
        elif self.selected_function == KeypadPlugin.FN_MANUAL_PROGRAM:
            programID = value
            # Execute program and provide feedback
            return programID >= 0 and KeypadPlugin._set_runonce_program(programID)



RE: Keypad Plugin - Why Program isnt an option in Web but is in python code - gdgeist@chickenmad.com - 2021 Jun 24

added it back in and none of the normal functions work now - only the long press. of course i see the notes in the function but wondering what needs to be fixed i.e. a clue - my sprinkler service company says they always have a 1 minute run through of each zone programmed so they can eyeball issues during the season and use it to blow it out at close of season so trying to give them a press A then 9 for the all zone for a minute program.