-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
homebridge-helios-kwl #704
Comments
✅ Pre-checks completed successfully. |
Comment
|
Please ensure to validate the configuration. A config of: {
"platform": "HeliosKwlHomebridgePlugin"
} crashes and restarts the process:
|
@bwp91 : Thank you for your feedback. I have fixed this with release 0.1.1 |
It is important to catch all errors that the plugin may throw. For example with this config: {
"name": "@ubreu/homebridge-helios-kwl",
"heliosHost": " ",
"heliosPort": 0,
"platform": "HeliosKwlHomebridgePlugin"
} It is crashing and restarting:
|
@bwp91 : Isn't it sufficient to set the format and the required flag in the config.schema.json? ![]() |
Hi @ubreu It shows these validation warnings but it does not prevent you from clicking on save. also there are still many users that prefer to configure plugins using json directly. |
Here: I would suggest adding some basic config validation like (feel free to amend as you wish) if(!config.heliosHost || typeof config.heliosHost !== 'string' || !config.heliosPort || !Number.isInteger(config.heliosPort) || config.heliosPort < 0) {
this.log.error('heliosHost and heliosPort have to be configured properly.');
return;
} But also your function is called asynchronously, so any errors that are thrown inside it will cause the bridge process to crash and restart. For example, even with a valid configuration (host
Please consider using a try/catch in this function to catch errors that are thrown and log them without crashing. Something like this: async addAccessory(config: HeliosVentilationPlatformConfig) {
try {
this.hv = new HeliosVentilation(config.heliosHost, config.heliosPort, this.log);
...
} catch (error) {
this.log.error(`An error occurred: ${error.message}`);
}
} |
@bwp91 Thanks for your feedback! Good points, I created a new release. |
/check |
The following pre-checks failed: ❌ More keywords apart from "homebridge-plugin" should be added in package.json. Comment |
@ubreu please take the above as a suggestion, I have been improving the check script for future plugin verification requests and used your verification request as a test here |
can you ask the user in your issue ubreu/homebridge-helios-kwl#1 to update to 0.1.2 of the plugin and to post their logs after updating? It is exactly these log entries which we are trying to avoid:
|
@bwp91 : the user was using an old version of the appliance which doesn't support websockets at all. That error is now caught in the try/catch block. |
/check |
/check |
/check |
🟢 The following pre-checks passed:
🔴 The following pre-checks failed:
|
Congratulations! Your plugin has been verified! You can now add one of the Verified by Homebridge badges to your plugin's README:
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! As a verified plugin, you can request a channel in the Discord server to discuss your plugin with users and other developers. Just ask in the #plugin-development channel. Thank you for your contribution to the Homebridge community.
|
Hi @ubreu thanks for making the changes to your plugin. i have mark it as verified now! Please consider adding more keywords to your package json file. |
Plugin Name
@ubreu/homebridge-helios-kwl
Link To GitHub Repo
https://github.com/ubreu/homebridge-helios-kwl
Link To NPM Package
https://www.npmjs.com/package/@ubreu/homebridge-helios-kwl
Plugin Icon (Optional)
No response
The text was updated successfully, but these errors were encountered: