Skip to content

Multiday Watering Levels, Weather Restriction, Current Fault Detect#272

Merged
salbahra merged 59 commits into
masterfrom
multidayETo
Sep 2, 2025
Merged

Multiday Watering Levels, Weather Restriction, Current Fault Detect#272
salbahra merged 59 commits into
masterfrom
multidayETo

Conversation

@rayshobby
Copy link
Copy Markdown
Member

Summary

  • UI support for multiday watering levels (using historical water data for programs that run on a regular interval) and weather restrictions
  • UI support for current fault detection (overcurrent and undercurrent)
  • Fix 24-hr time not showing in log and preview
  • Update the old links-timeline library to the more modern vis-timeline library
  • Misc. bug fixes such as broken new firmware release notification, remote http port missing leading 0,

Ncp294 and others added 30 commits June 27, 2025 12:13
@rayshobby rayshobby linked an issue Aug 28, 2025 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 28, 2025

Visit the preview URL for this PR (updated for commit b1f06e4):

https://opensprinkler-devui--pr272-multidayeto-saxr97a9.web.app

(expires Fri, 05 Sep 2025 18:10:40 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9b7a984849dffe48c01bc0242f5c0f93b14ed1df

@salbahra salbahra requested a review from Copilot August 28, 2025 17:12
@salbahra
Copy link
Copy Markdown
Member

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

@codex

For now, I can only help with PRs you've created.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for multiday watering levels using historical weather data, weather restrictions, and current fault detection, while also updating the timeline visualization library and fixing time display issues.

  • Adds multiday watering level calculations using historical weather data for programs with regular intervals
  • Implements weather restriction options (rain amount/days, temperature thresholds, California restriction)
  • Adds overcurrent and undercurrent fault detection with UI notifications

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
www/js/modules/weather.js Updates weather delay adjustment options and forecast display with precipitation data
www/js/modules/utils.js Fixes JSON escaping method to properly handle braces
www/js/modules/system-diagnostics.js Adds multiday levels and weather restriction status to diagnostics display
www/js/modules/supported.js Adds version check for weather restrictions feature
www/js/modules/status.js Changes status colors and adds overcurrent fault detection
www/js/modules/stations.js Updates run-once submission to support annotations and improved dialog handling
www/js/modules/programs.js Migrates from links-timeline to vis-timeline library and implements multiday watering level logic
www/js/modules/options.js Adds weather restriction configuration UI and updates current threshold options
www/js/modules/logs.js Updates timeline visualization to use vis-timeline library with proper time formatting
www/js/modules/language.js Adds call to update weather restriction notice
www/js/modules/firmware.js Improves firmware update detection with minor version handling
www/js/modules/dates.js Fixes 12/24-hour time format display throughout the application
www/js/modules/dashboard.js Adds weather restriction notice to dashboard and fixes remote station hex encoding
www/js/main.js Updates option constants for current limits
www/index.html Adds vis-timeline library dependencies
www/css/vis-timeline-graph2d.min.css New CSS file for vis-timeline library
www/css/main.css Updates timeline styling for new vis-timeline library

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread www/js/modules/weather.js Outdated
Comment on lines +842 to +843
if ( typeof OSApp.currentSession.weather.forecast[ i ].precip !== "undefined") {
list += "<span>" + OSApp.Language._( "Forecasted Rain" ) + "</span><span>: " + OSApp.Weather.formatPrecip( OSApp.currentSession.weather.forecast[ i ].precip ) + "</span>"
Copy link

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the string concatenation on line 843. This could cause JavaScript parsing issues.

Suggested change
if ( typeof OSApp.currentSession.weather.forecast[ i ].precip !== "undefined") {
list += "<span>" + OSApp.Language._( "Forecasted Rain" ) + "</span><span>: " + OSApp.Weather.formatPrecip( OSApp.currentSession.weather.forecast[ i ].precip ) + "</span>"
list += "<span>" + OSApp.Language._( "Forecasted Rain" ) + "</span><span>: " + OSApp.Weather.formatPrecip( OSApp.currentSession.weather.forecast[ i ].precip ) + "</span>";

Copilot uses AI. Check for mistakes.
Comment thread www/js/modules/utils.js
Comment thread www/js/modules/supported.js Outdated
Comment on lines +99 to +100
return wto && OSApp.Firmware.checkOSVersion( 2213 );
}
Copy link

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the function declaration on line 100.

Suggested change
return wto && OSApp.Firmware.checkOSVersion( 2213 );
}
};

Copilot uses AI. Check for mistakes.
Comment thread www/js/modules/status.js Outdated

// Show overcurrent fault status
if ( OSApp.currentSession.controller.settings.ocs ) {
OSApp.Status.changeStatus( 0, "red", "<p class='running-text center'>" + OSApp.Language._( "Overcurrent Fault detected" ) + ( OSApp.currentSession.controller.settings.ocs === 255 ? "" : ( " when opening Station " + OSApp.currentSession.controller.settings.ocs ) ) + "!!</p>" );
Copy link

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The double exclamation marks ('!!') in the error message are unprofessional. Consider using a single exclamation mark or removing them entirely for a more professional error message.

Suggested change
OSApp.Status.changeStatus( 0, "red", "<p class='running-text center'>" + OSApp.Language._( "Overcurrent Fault detected" ) + ( OSApp.currentSession.controller.settings.ocs === 255 ? "" : ( " when opening Station " + OSApp.currentSession.controller.settings.ocs ) ) + "!!</p>" );
OSApp.Status.changeStatus( 0, "red", "<p class='running-text center'>" + OSApp.Language._( "Overcurrent Fault detected" ) + ( OSApp.currentSession.controller.settings.ocs === 255 ? "" : ( " when opening Station " + OSApp.currentSession.controller.settings.ocs ) ) + "!</p>" );

Copilot uses AI. Check for mistakes.
Comment thread www/js/modules/stations.js Outdated
Comment thread www/js/modules/programs.js Outdated
Comment thread www/js/modules/options.js Outdated
Comment thread www/js/modules/dashboard.js Outdated
} else {
$( "#restr-active" ).addClass("hidden");
}
}
Copy link

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the function declaration.

Suggested change
}
};

Copilot uses AI. Check for mistakes.
Comment thread www/js/modules/dashboard.js
Comment thread www/js/modules/status.js
// Show overcurrent fault status
if ( OSApp.currentSession.controller.settings.ocs ) {
OSApp.Status.changeStatus( 0, "red", "<p class='running-text center pointer'>" + OSApp.Language._( "Overcurrent Fault detected" ) +
( OSApp.currentSession.controller.settings.ocs === 255 ? "" : ( OSApp.Language._( " when opening Station " ) + OSApp.currentSession.controller.settings.ocs ) ) + "!!</p>",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double exclamation mark is not needed here. Rachio notifies me all the time over and under current and it isn't as alarming.

@salbahra salbahra merged commit 37377c0 into master Sep 2, 2025
6 checks passed
@salbahra salbahra deleted the multidayETo branch September 2, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default weather date format is ambiguous

4 participants