homebridge / plugins

Information and resources for Homebridge plugins.
https://homebridge.io/w/Verified-Plugins
GNU General Public License v3.0
368 stars 17 forks source link

Verification Request: @hb-haier/homebridge-plugin #724

Closed baranwang closed 1 week ago

baranwang commented 7 months ago

Plugin Name

@hb-haier/homebridge-plugin

Link To GitHub Repo

https://github.com/baranwang/homebridge-plugin-haier

Plugin Icon (Optional)

No response

The plugin does not offer the same nor less functionality than that of any existing verified plugin.

🟢 Yes

The plugin successfully installs and does not start unless it is configured.

🟢 Yes

The plugin does not require the user to run Homebridge in a TTY or with non-standard startup parameters, even for initial configuration.

🟢 Yes

The plugin does not contain any analytics or calls that enable you to track the user.

🟢 Yes

If the plugin needs to write files to disk (cache, keys, etc.), it stores them inside the Homebridge storage directory.

🟢 Yes

The plugin does not throw unhandled exceptions, the plugin must catch and log its own errors.

🟢 Yes

More Information

No response

github-actions[bot] commented 7 months ago

🔴 The following pre-checks failed:


🟢 The following pre-checks passed:


⚠️ Please action these failures and then comment /check to run the checks again. Let us know if you need any help.

If updating your package.json and config.schema.json files, don't forget to publish a new version to NPM.

baranwang commented 7 months ago

/check

github-actions[bot] commented 7 months ago

🔴 The following pre-checks failed:


🟢 The following pre-checks passed:


⚠️ Please action these failures and then comment /check to run the checks again. Let us know if you need any help.

If updating your package.json and config.schema.json files, don't forget to publish a new version to NPM.

baranwang commented 7 months ago

/check

github-actions[bot] commented 7 months ago

🟢 The following pre-checks passed:


🎉 All pre-checks passed successfully, nice work! Your plugin and/or icon will now be manually reviewed by the Homebridge team.

bwp91 commented 6 months ago

Hi @baranwang

What are the cases when this script would need to be run? I mean which cases would these folders not already be present?

https://github.com/baranwang/homebridge-plugin-haier/blob/main/packages/plugin/scripts/generate-ui.js

github-actions[bot] commented 6 months ago
bwp91 commented 6 months ago

Also when I type in a password in the UI screen I get an error notification and then I see in the HB logs

[26/05/2024, 12:28:11] [Homebridge UI] [@hb-haier/homebridge-plugin] Incoming Request: /family
[26/05/2024, 12:28:11] [Homebridge UI] [@hb-haier/homebridge-plugin] Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/.hb-haier/token'
    at Object.mkdirSync (node:fs:1372:26)
    at get tokenPath [as tokenPath] (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/api/index.js:122:25)
    at HaierApi.getTokenInfo (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/api/index.js:227:43)
    at new HaierApi (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/api/index.js:72:10)
    at UiServer.<anonymous> (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:36:23)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:19:61
    at new Promise (<anonymous>)
    at __async (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:3:10)
    at UiServer.getFamilyList (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:35:12) {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/.hb-haier/token'
}
[26/05/2024, 12:28:27] [Homebridge UI] [@hb-haier/homebridge-plugin] Incoming Request: /family
[26/05/2024, 12:28:27] [Homebridge UI] [@hb-haier/homebridge-plugin] Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/.hb-haier/token'
    at Object.mkdirSync (node:fs:1372:26)
    at get tokenPath [as tokenPath] (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/api/index.js:122:25)
    at HaierApi.getTokenInfo (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/api/index.js:227:43)
    at new HaierApi (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/api/index.js:72:10)
    at UiServer.<anonymous> (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:36:23)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:19:61
    at new Promise (<anonymous>)
    at __async (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:3:10)
    at UiServer.getFamilyList (/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/ui-server/dist/index.js:35:12) {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/@hb-haier/homebridge-plugin/node_modules/@hb-haier/shared/dist/lib/.hb-haier/token'
}
[26/05/2024, 12:28:34] [Homebridge UI] Changes to config.json saved.

Happy that this doesn't cause the process to crash, but is there something wrong here?

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

baranwang commented 4 months ago

Sorry @bwp91 for replying so late.

Regarding the execution problem of the generate-ui.js script, it is because the @hb-haier/homebridge-plugin package does not contain custom UI code, mainly because if I build it in the package, there will be no We received feedback from users that the custom UI failed to load and the configuration page could not appear. So I put the custom UI compilation logic in two other packages as dependencies, and soft-linked them to the package after installation.

The second error problem you mentioned seems to me that there is no way to obtain user.storagePath and triggers the hidden logic to create a cache directory in the package. But, there is an error due to lack of permissions, so is it true that some users cannot obtain this user.storagePath directory?

bwp91 commented 2 months ago

/check

github-actions[bot] commented 2 months ago

🔴 The following checks failed:


🟢 The following checks passed:


⚠️ Please action these failures and then comment /check to run the checks again. Let us know if you need any help.

If updating your package.json and config.schema.json files, don't forget to publish a new version to NPM.

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 week ago

This issue has been closed as no further activity has occurred.