Skip to content

[FPP 10] FPP-Simple-Weather - compatibility & plugin check#227

Description

@github-actions

FPP-Simple-Weather - FPP 10 readiness

Plugin name: Simple Weather
Repo: https://github.com/toddejohnson/FPP-Simple-Weather
Maintainer: @toddejohnson

馃摙 FPP's plugin guidelines and submission process have been updated - see the Plugin Guidelines for what's expected of a listed plugin. Adding another plugin? Start at Submit a plugin.

馃攧 As part of this new process, in the lead up to each new version release we will create a GitHub issue like this one and ask that you review compatibility of your plugin with the new version and outline any new best practices for plugins. Please review this information and update your plugin accordingly.

馃И Get your plugin ready for FPP 10

FPP 10.0 beta3 has been released - FPP 10 full release is due shortly. Please test and update your plugin against beta3, available at https://github.com/FalconChristmas/fpp/releases/tag/10.0-beta3.

馃敡 Please declare FPP 10 compatibility

Please start testing FPP-Simple-Weather on FPP 10 if you haven't already, then add a versions[] entry to your pluginInfo.json once it's confirmed working:

{
    "minFPPVersion": "10.0",
    "maxFPPVersion": "0",
    "branch": "master",
    "sha": ""
}

Until then the Plugin Manager shows your plugin as untested with FPP 10.

Areas of concern / optimisation

  • 馃洃 Blocker - stale-major - Highest FPP major version declared is 9, behind the current target FPP 10
  • 馃洃 Blocker - tls-verify-disabled
    • TLS certificate verification is disabled (functions.inc.php:135: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);) - this accepts a connection to anyone who can intercept the traffic (a malicious AP, a compromised router), not just the intended server.
    • Remove the override and fix the underlying cert issue instead (e.g. bundle/trust the CA properly)
  • 鈿狅笍 Best practice - stale-issues-prs
  • 鈿狅笍 Best practice - no-set-e
    • fpp_install.sh has no 'set -e' (or || exit) - without it, bash keeps running the rest of the script even after a command fails, so if an earlier step errors out (e.g. a dependency install fails), later steps still run against that broken state and the plugin ends up half-installed with no visible error.
    • Add set -e (or set -euo pipefail) as the first line after the shebang so the script stops immediately on the first failure instead
  • 鈿狅笍 Best practice - no-restart-flag
    • registers command type(s) via commands/descriptions.json but doesn't request an fppd restart at every lifecycle point that needs one - uninstall: no fpp_uninstall.sh (create one).
    • fppd only reads commands/descriptions.json and loads a native plugin's .so once, at its own startup (PluginManager::loadUserPlugins(), called once from fppd.cpp) - never again while running, and never in response to a plugin install/upgrade/uninstall.
    • Each lifecycle point runs independently (a plugin-only update runs fpp_upgrade.sh INSTEAD of fpp_install.sh when one exists; uninstall runs fpp_uninstall.sh then unconditionally deletes the plugin directory, so that script is the only code that ever runs before removal), so the flag has to be set independently in each one this plugin actually has/needs - fixing it in one script does not cover the others.
    • Add source ${FPPDIR}/scripts/common; setSetting restartFlag 1 to each script listed above (creating fpp_install.sh/fpp_uninstall.sh if missing - only fpp_upgrade.sh is optional, and only needs it if you already have one) so the Plugin Manager's restart banner appears right after that step instead of leaving the command silently unavailable/lingering as a ghost until fppd happens to restart for an unrelated reason
  • 鈿狅笍 Best practice - log-naming
    • log filename doesn't follow the plugin-.log convention (plugin_setup.php:11: $logFile = $settings['logDirectory']."/".$pluginName.".log";).
    • Name it plugin-FPP-Simple-Weather.log (not just FPP-Simple-Weather.log), so it's recognized as this plugin's log by FPP's log viewer and namespaced against collisions with other plugins/tools
  • 鈿狅笍 Best practice - no-timeout
    • outbound HTTP call has no timeout set (functions.inc.php:26: $ch = curl_init("http://" . $host . "/api/overlays/models");) - a hung remote server stalls this indefinitely, blocking whatever hook/show command triggered it.
    • Set CURLOPT_TIMEOUT/CURLOPT_CONNECTTIMEOUT (PHP curl), the 'timeout' key (PHP stream contexts), or timeout= (Python requests)
  • 鈿狅笍 Best practice - no-icon
    • no icon.png in the repo root and no iconURL in pluginInfo.json - the Plugin Manager will show your initials instead of an icon.
    • A local icon.png (128x128 or 256x256, repo root) is preferred since it renders offline once installed; iconURL is the fallback and the only option shown before install
  • 馃挕 Optional - no-license - no LICENSE file - add one for redistribution clarity

We know our automated checks don't always get it 100% right. Please fix whatever above does apply first - then, for anything left that doesn't apply or you think deserves an exception, comment /submit with an explanation and a maintainer will take a look.

Once you have updated your plugin, please comment /recheck on this issue and we will automatically scan your plugin and comment the new results here.

Want to sunset this plugin? Request Plugin Removal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions