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-RedAlertViaKumta #577

Closed
DanZBo opened this issue Oct 11, 2023 · 17 comments
Closed

homebridge-RedAlertViaKumta #577

DanZBo opened this issue Oct 11, 2023 · 17 comments
Labels
verified use when a plugin meets the criteria - adds the verified badge text

Comments

@DanZBo
Copy link

DanZBo commented Oct 11, 2023

Link To GitHub Repo

https://github.com/DanZBo/homebridge-RedAlertViaKumta

Link To NPM Package

https://www.npmjs.com/package/homebridge-red-alert-via-kumta

@DanZBo DanZBo added the pending the label given to a new verification/icon request label Oct 11, 2023
@github-actions
Copy link

✅ Pre-checks completed successfully.

@sobelman
Copy link

Hi verification team,

Would appreciate fast handling,

This plugin is used to getting emergency alerts on rockets for Israel citizens.

thank you very much

Keep safe 🇮🇱

@bwp91
Copy link
Contributor

bwp91 commented Oct 11, 2023

Hi @sobelman and @DanZBo

Please fix the issue where a user has clicked Save on the settings ui without entering any info, which leads to a config of:

        {
            "platform": "RedAlertViaKumta"
        }

and leads to a homebridge restart:

[11/10/2023, 18:40:17] Registering platform 'homebridge-red-alert-via-kumta.RedAlertViaKumta'
[11/10/2023, 18:40:17] [homebridge-red-alert-via-kumta] Loaded homebridge-red-alert-via-kumta v2.1.0 child bridge successfully
TypeError: Cannot read properties of undefined (reading 'split')
    at new TelegramPlatform (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/src/TelegramPlatform.ts:29:38)
    at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:150:42)
[11/10/2023, 18:40:17] [homebridge-red-alert-via-kumta] Child bridge process ended

I would also update the node version in the package json to also support node 20, as many users will now be updating to this.

from

node": "^18.16.0",

to

node": "^18.16.0 || ^20.8.0",

There are a couple of other requests too, I'll post these in a follow up comment!

@bwp91
Copy link
Contributor

bwp91 commented Oct 11, 2023

Also if incorrect info is supplied in the config, it leads to a crash loop too

[11/10/2023, 18:43:29] [homebridge-red-alert-via-kumta] Loading accessory from cache: ds
[11/10/2023, 18:43:29] [homebridge-red-alert-via-kumta] Loading accessory from cache: Telegram Connection
[11/10/2023, 18:43:30] [homebridge-red-alert-via-kumta] Error: Your API ID or Hash cannot be empty or undefined
    at new TelegramBaseClient (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/node_modules/telegram/client/telegramBaseClient.js:62:19)
    at new TelegramClient (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/node_modules/telegram/client/TelegramClient.js:69:9)
    at TelegramPlatform.connect (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/src/TelegramPlatform.ts:47:27)
    at TelegramPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/src/TelegramPlatform.ts:125:10)
    at HomebridgeAPI.<anonymous> (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/src/TelegramPlatform.ts:36:12)
    at HomebridgeAPI.emit (node:events:514:28)
    at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/homebridge/src/api.ts:275:10)
    at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:189:14)
TypeError: Cannot read properties of undefined (reading 'connected')
    at TelegramPlatform.updateTelegramAccessoryState (/usr/local/lib/node_modules/homebridge-red-alert-via-kumta/src/TelegramPlatform.ts:155:28)
    at /usr/local/lib/node_modules/homebridge-red-alert-via-kumta/src/TelegramPlatform.ts:127:12

One of the requirements of verification is that plugin errors are caught and nicely logged to the homebridge log rather than being unhandled and terminating/restarting the node process.

@sobelman
Copy link

Got it.
Thank you very much🙏

Will commit a new fixed version by tomorrow.

@bwp91
Copy link
Contributor

bwp91 commented Oct 11, 2023

Given the nature of this plugin (I think is a first for Homebridge, so I discussed this with the team!):

We would like to see some form of disclaimer (1) on the plugin readme and (2) on the plugin settings screen (ideally in hebrew and english) just calling out that the plugin should be used along with the main source of notifications - in this case telegram.

We would not like to have a situation where a user is 100% reliant on this plugin - and let's say another plugin is causing homebridge to restart without the user knowing - and so the user never receives a homebridge notification in a critical case.

Many users may assume that 'homebridge verified' means 'definitely works'. Since I personally cannot test that the plugin works (but also not trying to insinuate that it doesn't).

We just want users to continue to still rely on the telegram notifications, but use this homebridge plugin as a helpful extra.

In an ideal world we should never need a plugin like this in the first place.

@sobelman
Copy link

Given the nature of this plugin (I think is a first for Homebridge, so I discussed this with the team!):

We would like to see some form of disclaimer (1) on the plugin readme and (2) on the plugin settings screen (ideally in hebrew and english) just calling out that the plugin should be used along with the main source of notifications - in this case telegram.

We would not like to have a situation where a user is 100% reliant on this plugin - and let's say another plugin is causing homebridge to restart without the user knowing - and so the user never receives a homebridge notification in a critical case.

Many users may assume that 'homebridge verified' means 'definitely works'. Since I personally cannot test that the plugin works (but also not trying to insinuate that it doesn't).

We just want users to continue to still rely on the telegram notifications, but use this homebridge plugin as a helpful extra.

In an ideal world we should never need a plugin like this in the first place.

Will be handled as well, fully understood,

@bwp91 bwp91 added awaiting-user-reply use after review has started - awaiting user to reply to a comment and removed pending the label given to a new verification/icon request labels Oct 11, 2023
@bwp91
Copy link
Contributor

bwp91 commented Oct 11, 2023

please reply on here when a new version is ready with the above changes and i'll get to it as soon as i can 😃

@sobelman
Copy link

please reply on here when a new version is ready with the above changes and i'll get to it as soon as i can 😃

Hi @bwp91 , done. Hopefully everything is working and written as expected

Thank you very much 🙏

@sobelman
Copy link

Hi @bwp91
Is the code passed all tests and requirements?

Thanks
Assaf

@donavanbecker
Copy link
Contributor

/check

@github-actions github-actions bot added the pending the label given to a new verification/icon request label Oct 15, 2023
@github-actions
Copy link

✅ Pre-checks completed successfully.

@bwp91 bwp91 added reviewed and removed pending the label given to a new verification/icon request awaiting-user-reply use after review has started - awaiting user to reply to a comment labels Oct 16, 2023
@github-actions
Copy link

  • - 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 be of type dynamic platform.
  • - The plugin must not offer the same nor less functionality than that of any existing verified plugin.
  • - 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.
  • - A GitHub release 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 v18 and v20.
  • - 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.

Everything Looks Good!

@bwp91 bwp91 added verified use when a plugin meets the criteria - adds the verified badge text and removed reviewed labels Oct 16, 2023
@github-actions
Copy link

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 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
Copy link
Contributor

bwp91 commented Oct 16, 2023

You should add some keywords in the package json file so that users can search for the plugin better in the UI

https://github.com/DanZBo/homebridge-RedAlertViaKumta/blob/da740f0a1ae77d7decaa43ef2fdd831339ad2b80/package.json#L25

@bwp91
Copy link
Contributor

bwp91 commented Oct 16, 2023

Also, thanks for making the changes and the disclaimer.

Very happy to verify this plugin.

One last thing I would like to request in the case of this plugin, is that if the alert systems that the plugin uses ever stop working permanently (ie are closed down) then it would also be important to reflect this in the disclaimer and plugin readme!

@sobelman
Copy link

Hi,
Thank you very much for the verification 🙏

We will handle all stuff mentioned here tomorrow morning and will release new version.

Thank you all verification team 🙏🇮🇱⚔️

@bwp91 bwp91 closed this as completed Oct 25, 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

4 participants