Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homebridge-spruce-irrigation #529

Closed
waltmoorhouse opened this issue Apr 9, 2023 · 11 comments
Closed

homebridge-spruce-irrigation #529

waltmoorhouse opened this issue Apr 9, 2023 · 11 comments
Labels
verified use when a plugin meets the criteria - adds the verified badge text

Comments

@waltmoorhouse
Copy link

Link To GitHub Repo

https://github.com/waltmoorhouse/homebridge-spruce-irrigation/

Link To NPM Package

https://www.npmjs.com/package/homebridge-spruce-irrigation

@waltmoorhouse waltmoorhouse added the pending the label given to a new verification/icon request label Apr 9, 2023
@github-actions
Copy link

github-actions bot commented Apr 9, 2023

✅ Pre-checks completed successfully.

@bwp91 bwp91 added reviewed currently-reviewing use for starting a review - adds a comment with the verification list with empty checkboxes and removed reviewed pending the label given to a new verification/icon request labels Apr 10, 2023
@bwp91
Copy link
Contributor

bwp91 commented Apr 10, 2023

  • - The plugin must successfully install.
  • - The plugin must implement the Homebridge Plugin Settings GUI.
  • - The plugin must not start unless it is configured.
  • - The plugin must not execute post-install scripts that modify the user's system in any way.
  • - The plugin must not contain any analytics or calls that enable you to track the user.
  • - The plugin must not throw unhandled exceptions, the plugin must catch and log its own errors.
  • - The plugin must be published to npm and the source code available on GitHub.
  • - GitHub releases should be created for every new version of your plugin, with patch notes.
  • - The plugin must run on all Active LTS versions of Node.js, at the time of writing this is Node.js v14, v16 and v18.
  • - The plugin must not require the user to run Homebridge in a TTY or with non-standard startup parameters, even for initial configuration.
  • - If the plugin needs to write files to disk (cache, keys, etc.), it must store them inside the Homebridge storage directory.

If I configure an auth token that is invalid, this crashes the plugin and sends homebridge into a restart loop:

Config:

        {
            "pollSeconds": 30,
            "runMinutes": 15,
            "lowBatteryLevel": 2.7,
            "authToken": "kjljhklhjkljl",
            "_bridge": {
                "username": "0E:7E:83:52:E6:60",
                "port": 40442
            },
            "platform": "HomeBridgeSpruceIrrigation"
        }

Result:

}
[10/04/2023, 16:28:47] [homebridge-spruce-irrigation] Discovery action completed

/usr/local/lib/node_modules/homebridge-spruce-irrigation/node_modules/axios/lib/core/settle.js:19
    reject(new AxiosError(
           ^
AxiosError: Request failed with status code 401
    at settle (/usr/local/lib/node_modules/homebridge-spruce-irrigation/node_modules/axios/lib/core/settle.js:19:12)
    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-spruce-irrigation/node_modules/axios/lib/adapters/http.js:556:11)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[10/04/2023, 16:28:47] [homebridge-spruce-irrigation] Child bridge process ended
[10/04/2023, 16:28:47] [homebridge-spruce-irrigation] Process Ended. Code: 1, Signal: null

@bwp91 bwp91 added awaiting-changes use after review has started - awaiting user to make changes to plugin and removed reviewed currently-reviewing use for starting a review - adds a comment with the verification list with empty checkboxes labels Apr 10, 2023
@bwp91
Copy link
Contributor

bwp91 commented Apr 10, 2023

This is not part of the verification, but I would like to recommend a name property within the config schema, to let users change the 'name' of the plugin as shown in the homebridge log.

Something like:

  "schema": {
    "type": "object",
    "properties": {
      "name": {
      "title": "Plugin name as shown in Homebridge Log",
      "default": "SpruceIrrigation"
      },
...

@waltmoorhouse
Copy link
Author

Once I add that to the config, where do I tell the logger to use it when logging?
Do I do log.prefix = config.name?

@bwp91
Copy link
Contributor

bwp91 commented Apr 11, 2023

You don’t need to do anything extra, it should use it automatically

@waltmoorhouse
Copy link
Author

Ok, v1.1.1 just published should address both these items. Thanks

@bwp91
Copy link
Contributor

bwp91 commented Apr 11, 2023

/check

@github-actions github-actions bot added pending the label given to a new verification/icon request and removed awaiting-changes use after review has started - awaiting user to make changes to plugin labels Apr 11, 2023
@github-actions
Copy link

✅ Pre-checks completed successfully.

@bwp91
Copy link
Contributor

bwp91 commented Apr 11, 2023

Plugin is no longer crashing homebridge with an invalid token - so good!

I noticed that I still get these constant log entries when the token is invalid - so I assume some interval is running.

[11/04/2023, 18:13:39] [HBSpruce] Updating controller readings.

is this interval necessary when the token is invalid? Was just a thought of mine - is out of the scope for verification.

@bwp91 bwp91 added verified use when a plugin meets the criteria - adds the verified badge text and removed pending the label given to a new verification/icon request labels Apr 11, 2023
@bwp91
Copy link
Contributor

bwp91 commented Apr 11, 2023

Congratulations! Your plugin has been verified.

You can now add the Verified by Homebridge badge to your plugin's README:

verified-by-homebridge

[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

Your plugin is now also eligible to display a ❤️ Donate button on it's tile in the Homebridge UI. See https://github.com/oznu/homebridge-config-ui-x/wiki/Developers:-Donation-Links for instructions.

Thank you for your contribution to the Homebridge Community.
https://homebridge.io

@waltmoorhouse
Copy link
Author

Plugin is no longer crashing homebridge with an invalid token - so good!

I noticed that I still get these constant log entries when the token is invalid - so I assume some interval is running.

[11/04/2023, 18:13:39] [HBSpruce] Updating controller readings.

is this interval necessary when the token is invalid? Was just a thought of mine - is out of the scope for verification.

If the token was ever valid, the interval will keep updating HomeKit with last known values. If it was never valid, then yeah it's a bit useless. I'll make a note to look into it for the next version.

Thanks for the help getting me verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified use when a plugin meets the criteria - adds the verified badge text
Projects
None yet
Development

No branches or pull requests

2 participants