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-ecoforest-thermostat #616

Closed
CyberMrProper opened this issue Dec 9, 2023 · 11 comments
Closed

homebridge-ecoforest-thermostat #616

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

Comments

@CyberMrProper
Copy link

Link To GitHub Repo

https://github.com/CyberMrProper/homebridge-ecoforest-thermostat/

Link To NPM Package

https://www.npmjs.com/package/homebridge-ecoforest-thermostat

Plugin Icon (Optional)

logo

@CyberMrProper CyberMrProper added the pending the label given to a new verification/icon request label Dec 9, 2023
Copy link

github-actions bot commented Dec 9, 2023

✅ Pre-checks completed successfully.

@bwp91 bwp91 added the currently-reviewing use for starting a review - adds a comment with the verification list with empty checkboxes label Dec 10, 2023
Copy link

github-actions bot commented Dec 10, 2023

  • General
    • The plugin must be of type dynamic platform.
    • The plugin must not offer the same nor less functionality than that of any existing verified plugin.
  • Repo
    • The plugin must be published to NPM and the source code available on a GitHub repository, with issues enabled.
    • A GitHub release should be created for every new version of your plugin, with release notes.
  • Environment
    • The plugin must run on all supported LTS versions of Node.js, at the time of writing this is Node v18 and v20.
    • The plugin must successfully install and not start unless it is configured.
    • The plugin must not execute post-install scripts that modify the users' system in any way.
    • The plugin must not require the user to run Homebridge in a TTY or with non-standard startup parameters, even for initial configuration.
  • Codebase
    • The plugin must implement the Homebridge Plugin Settings GUI.
    • The plugin must not contain any analytics or calls that enable you to track the user.
    • If the plugin needs to write files to disk (cache, keys, etc.), it must store them inside the Homebridge storage directory.
    • The plugin must not throw unhandled exceptions, the plugin must catch and log its own errors.



Comment /check to run checks again.

@bwp91
Copy link
Contributor

bwp91 commented Dec 14, 2023

Hi @CyberMrProper we recently added a criteria that plugins must be dynamic platform based, rather than accessory type.

A brief look at the plugin and it seems like this really wouldn't suit a platform type right? I mean, there is no login into an external cloud provider, the device is found and discovered locally?

@bwp91
Copy link
Contributor

bwp91 commented Dec 14, 2023

And I assume that most users would only have one of these devices anyway (rather than multiple)?

@CyberMrProper
Copy link
Author

It is a local/device with its own IP, and the device is a pellet stove. For now this is a single device, not sure if this brand eventually will launch additional devices. So for now, keeping it as a single accessory makes sense to me.

@bwp91
Copy link
Contributor

bwp91 commented Dec 14, 2023

With a config of this:

    "accessories": [
        {
            "name": "Example",
            "apiroute": "1.1.1.1",
            "username": "b",
            "temperatureColdTolerance": 0.5,
            "temperatureHotTolerance": 0.5,
            "minPowerLevel": 1,
            "maxPowerLevel": 9,
            "pullInterval": 10000,
            "accessory": "EcoforestThermostat"
        }
    ],

An unhandled error is thrown:

[14/12/2023, 19:38:09] [Example] Initializing EcoforestThermostat accessory...
[14/12/2023, 19:38:09] [Example] Example 1.1.1.1
[14/12/2023, 19:38:10] TypeError: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.readFile (node:fs:389:10)
    at EcoforestThermostat.updateTemperatureFromFile (/usr/local/lib/node_modules/homebridge-ecoforest-thermostat/index.js:125:8)
    at EcoforestThermostat.refreshEcoforestThermostatStatus (/usr/local/lib/node_modules/homebridge-ecoforest-thermostat/index.js:92:10)
    at EcoforestThermostat.getServices (/usr/local/lib/node_modules/homebridge-ecoforest-thermostat/index.js:343:10)
    at BridgeService.createHAPAccessory (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:462:41)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:382:44
    at Array.forEach (<anonymous>)
    at Server.loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:299:29)
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:179:12)
[14/12/2023, 19:38:10] Got SIGTERM, shutting down Homebridge...
[14/12/2023, 19:38:10] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
    at Bridge.Accessory.setupURI (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
    at Server.setServerStatus (/usr/local/lib/node_modules/homebridge/src/server.ts:155:45)
    at Server.teardown (/usr/local/lib/node_modules/homebridge/src/server.ts:199:10)
    at signalHandler (/usr/local/lib/node_modules/homebridge/src/cli.ts:93:12)
    at process.emit (node:events:514:28)
    at process.emit (/usr/local/lib/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)
[14/12/2023, 19:38:15] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[14/12/2023, 19:38:20] [HB Supervisor] Restarting Homebridge...

Please remember that the validation in the config schema file is not enforced on the user, so they can end up with a config like mine (i did this via the plugin settings UI) so all formations of a config need to be accounted for

@bwp91 bwp91 added awaiting-changes use after review has started - awaiting user to make changes to plugin and removed pending the label given to a new verification/icon request currently-reviewing use for starting a review - adds a comment with the verification list with empty checkboxes labels Dec 14, 2023
@CyberMrProper
Copy link
Author

You are right! thanks for pointing it out, adding the fix in v1.1.6

@bwp91
Copy link
Contributor

bwp91 commented Dec 14, 2023

Nice, I have tried various weird combinations of other configs and I cannot get it to crash so thanks for fixing that one!

The other things I would maybe suggest, but not necessary for verification:

@bwp91 bwp91 added verified use when a plugin meets the criteria - adds the verified badge text and removed awaiting-changes use after review has started - awaiting user to make changes to plugin labels Dec 14, 2023
Copy link

Congratulations! Your plugin has been verified.

You can now add one of the Verified by Homebridge badges 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)

verified-by-homebridge

[![verified-by-homebridge](https://img.shields.io/badge/homebridge-verified-blueviolet?color=%23491F59&style=for-the-badge&logoColor=%23FFFFFF&logo=homebridge)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

Your plugin is now also eligible to display a ❤️ Donate button on its tile in the Homebridge UI. See https://github.com/homebridge/homebridge/wiki/Donation-Links for instructions.

If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.

Don't forget to join the official Homebridge Discord server, where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!

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

bwp91 added a commit that referenced this issue Dec 14, 2023
@CyberMrProper
Copy link
Author

Thank you!!

@bwp91
Copy link
Contributor

bwp91 commented Dec 14, 2023

Icon added too :)

@bwp91 bwp91 closed this as completed Dec 14, 2023
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