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-inkbird-wifi-gateway #537

Closed
richierockskool opened this issue Apr 21, 2023 · 61 comments
Closed

homebridge-inkbird-wifi-gateway #537

richierockskool opened this issue Apr 21, 2023 · 61 comments
Labels
awaiting-user-reply use after review has started - awaiting user to reply to a comment pending the label given to a new verification/icon request

Comments

@richierockskool
Copy link

Link To GitHub Repo

https://github.com/richierockskool/homebridge-inkbird-wifi-gateway

Link To NPM Package

https://www.npmjs.com/package/homebridge-inkbird-wifi-gateway

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

The following pre-checks failed:

❌ Failed to import plugin: Cannot find module '/workspace/test-area/node_modules/homebridge-inkbird-wifi-gateway/src/index.js' imported from /workspace/index.ts

Comment /check to run checks again.

@richierockskool
Copy link
Author

Any help here would be greatly appreciated...
ichjagger@Rich-and-Ritas-Mac-mini Hombridge-Inkbird-Wifi-Gateway % /check
zsh: no such file or directory: /check

@bwp91
Copy link
Contributor

bwp91 commented Apr 24, 2023

To start with, just had a look at your package json file and it looks absolutely wild! (maybe it works, but the formatting is wild!)

https://github.com/richierockskool/homebridge-inkbird-wifi-gateway/blob/master/package.json

It would be a lot easier to make a start of looking at the plugin if this was sorted into a nice formatted format

@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 labels Apr 25, 2023
@bwp91
Copy link
Contributor

bwp91 commented Apr 25, 2023

stick your package json file into a formatter like this:
https://jsonformatter.curiousconcept.com/

@bwp91
Copy link
Contributor

bwp91 commented Apr 27, 2023

@richierockskool
there is no need to create a new issue everytime, just comment here with /check and it will run the checks again

@richierockskool
Copy link
Author

Okay, We have run all the bug checks and there is nothing, except... No plugin was found for the platform "HomebridgeInkbirdWifiGateway" in your config.json. Please make sure the corresponding plugin is installed correctly.

It is driving us crazy!

@bwp91
Copy link
Contributor

bwp91 commented Apr 27, 2023

I see you took my initial advice to format your package json
https://github.com/richierockskool/homebridge-inkbird-wifi-gateway/blob/master/package.json
🙃?

@bwp91
Copy link
Contributor

bwp91 commented Apr 27, 2023

the formatting obviously doesn't affect anything functionality-wise, but can really help if others look to see what could be causing any issues

@richierockskool
Copy link
Author

I hope so, because there are no issues with package-json

@bwp91
Copy link
Contributor

bwp91 commented Apr 27, 2023

no but i will repeat:

but can really help if others look to see what could be causing any issues

i for one cannot review this plugin if your package json file is all on one line

@richierockskool
Copy link
Author

richierockskool commented Apr 27, 2023 via email

@richierockskool
Copy link
Author

fixed now...wait 10 minutes

@bwp91
Copy link
Contributor

bwp91 commented Apr 27, 2023

Not sure if you are on the homebridge discord channel but happy to message on there, my username is bwp91

@richierockskool
Copy link
Author

discord RichieRockskool#7717

@bwp91
Copy link
Contributor

bwp91 commented May 26, 2023

how are we going with this plugin and verification?

@richierockskool
Copy link
Author

richierockskool commented May 31, 2023 via email

@richierockskool
Copy link
Author

/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 Jun 12, 2023
@github-actions
Copy link

The following pre-checks failed:

❌ Failed to test plugin.
❌ Command failed: docker run --rm -e HOMEBRIDGE_PLUGIN_NAME=homebridge-inkbird-wifi-gateway -v /home/runner/work/verified/verified/precheck/results:/results check

Comment /check to run checks again.

@bwp91
Copy link
Contributor

bwp91 commented Jun 12, 2023

First of all I would look through your dependencies and see which ones you actually need. In the package.json file you currently have this (I have added some comments):

  "devDependencies": {
    "@types/node": "^16.10.9",
    "@typescript-eslint/eslint-plugin": "^5.0.0",
    "@typescript-eslint/parser": "^5.0.0",
    "eslint": "^8.0.1",
    "homebridge": "^1.3.9",
    "nodemon": "^1.3.3",
    "rimraf": "^3.0.2",
    "ts-node": "^10.3.0",
    "typescript": "^4.4.4"
  },
  "dependencies": {
    "@abandonware/noble": "^1.9.2-21",
    "chokidar": "^3.5.3",  <- what is this and is it needed?
    "homebridge-inkbird-wifi-gateway": "^1.2.0", <- you should NOT have your own plugin listed here
    "latest-version": "^7.0.0",  <- what is this and is it needed?
    "module-name": "^0.0.1-security",  <- what is this and is it needed?
    "my-package": "^0.0.0",  <- what is this and is it needed?
    "node-fetch": "^2.6.1", <- is this needed?
    "npm": "^9.7.1",  <- what is this and is it needed?
    "npm-run-path": "^5.1.0",  <- what is this and is it needed?
    "resolve-url": "^0.2.1",  <- what is this and is it needed?
    "source-map-resolve": "^0.6.0",  <- what is this and is it needed?
    "source-map-url": "^0.4.1",  <- what is this and is it needed?
    "urix": "^0.1.0"  <- what is this and is it needed?
  },

@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 Jun 12, 2023
@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

Your plugin does not need to also be inside this folder

@richierockskool
Copy link
Author

When I take it out I get this error:

npm ERR! explore It doesn't look like npm is installed.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/richjagger/Documents/GitHub/homebridge-inkbird-wifi-gateway/node_modules/npm/package.json
npm ERR! errno -2
npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/Users/richjagger/Documents/GitHub/homebridge-inkbird-wifi-gateway/node_modules/npm/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

do you still have npm in that list too?

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

okay, and how are you trying to install the plugin? or how do you run it in dev, and where does this error come from?

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

why are you running this command?

normally is just npm install inside your plugin folder

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

/check

@github-actions
Copy link

The following pre-checks failed:

❌ Failed to test plugin.
❌ Command failed: docker run --rm -e HOMEBRIDGE_PLUGIN_NAME=homebridge-inkbird-wifi-gateway -v /home/runner/work/verified/verified/precheck/results:/results check

Comment /check to run checks again.

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

So i would look at addressing this 😊

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

Does your plugin rely on bluetooth to work? I mean, if a user installed the plugin who didn’t have a bluetooth module, would the plugin be useless?

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jun 16, 2023

So you need to design the plugin to account for anything going wrong.

  1. what happens if a user is on a machine that can't install the abandonware/noble dependency?
  2. what happens if a user can install the abandonware/noble dependency but doesn't have a ble module?
  3. what happens if a user doesnt have an Inkbird Wifi Gateway IBSM1S?

This is not a full list, but in any case that a user doesn't have anything to make the plugin work, the plugin should just log an warning in the homebridge log and 'stop' without crashing the node process.

@richierockskool
Copy link
Author

richierockskool commented Jun 16, 2023 via email

@richierockskool
Copy link
Author

/check

1 similar comment
@bwp91
Copy link
Contributor

bwp91 commented Jun 18, 2023

/check

@github-actions
Copy link

The following pre-checks failed:

❌ Failed to test plugin.
❌ Command failed: docker run --rm -e HOMEBRIDGE_PLUGIN_NAME=homebridge-inkbird-wifi-gateway -v /home/runner/work/verified/verified/precheck/results:/results check

Comment /check to run checks again.

@richierockskool
Copy link
Author

I have to update src

@bwp91
Copy link
Contributor

bwp91 commented Jun 18, 2023

The issue here is the bluetooth package (noble) being listed in the dependencies section. As it can’t be installed on the github environment, so it fails.

ideally you should put this into an “optionalDependencies” section of the package json, like i have with my govee plugin:

https://github.com/bwp91/homebridge-govee/blob/4fe51fe47f782e53367ce8bda10f6f68950b3338/package.json#L65

@bwp91 bwp91 removed the pending the label given to a new verification/icon request label Jul 13, 2023
@bwp91
Copy link
Contributor

bwp91 commented Jul 17, 2023

Hi @richierockskool any update on this?

@richierockskool
Copy link
Author

richierockskool commented Jul 18, 2023 via email

@bwp91
Copy link
Contributor

bwp91 commented Jul 26, 2023

Closing as not ready, will defer to richierockskool/homebridge-inkbird-wifi-gateway#24

@bwp91 bwp91 closed this as completed Jul 26, 2023
@richierockskool
Copy link
Author

/check

@github-actions github-actions bot added the pending the label given to a new verification/icon request label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-reply use after review has started - awaiting user to reply to a comment pending the label given to a new verification/icon request
Projects
None yet
Development

No branches or pull requests

2 participants