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-edomoticz #23

Closed
DewGew opened this issue Apr 1, 2020 · 10 comments
Closed

homebridge-edomoticz #23

DewGew opened this issue Apr 1, 2020 · 10 comments
Labels
verified use when a plugin meets the criteria - adds the verified badge text

Comments

@DewGew
Copy link

DewGew commented Apr 1, 2020

Plugin Details
This is a Homebridge plugin for Domoticz and Homebridge Config UI X Support.

@DewGew DewGew added the pending the label given to a new verification/icon request label Apr 1, 2020
@oznu
Copy link
Member

oznu commented Apr 4, 2020

Hi @DewGew,

I just want to check the project owner, @PatchworkBoy, is happy for this to happen?

@PatchworkBoy
Copy link

Go for it... 👍

@oznu
Copy link
Member

oznu commented Apr 5, 2020

  • - The plugin must successfully install.
  • - The plugin must impliment the Homebridge Plugin Settings GUI.
  • - The plugin must not start unless it is configured.
  • - The plugin must not execute postinstall scripts that modify the users 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 it's own errors.
  • - The plugin must be published to npm and the source code available on GitHub.
  • - The plugin must run on all Active LTS versions of Node.js, at the time of writing this is Node.js v10 and v12.
  • - 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.

The plugin must not throw unhandled exceptions, the plugin must catch and log it's own errors.

If the plugin is misconfigured the following unhanlded exception is raised which kills Homebridge:

[4/5/2020, 10:38:01] [Domoticz] Initializing eDomoticz platform...
[4/5/2020, 10:38:01] TypeError: Cannot read property 'indexOf' of undefined
    at new eDomoticzPlatform (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:107:21)
[4/5/2020, 10:38:01] Got SIGTERM, shutting down Homebridge...

Config errors should be caught and logged explaining what the issue is.


Everything else looks good 😄

@oznu oznu 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 17, 2020
@donavanbecker donavanbecker changed the title Homebridge Edomoticz Plugin homebridge-edomoticz Apr 30, 2020
@stale
Copy link

stale bot commented May 17, 2020

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.

@stale stale bot added the stale used for stale issues label May 17, 2020
@stale stale bot closed this as completed May 22, 2020
@DewGew
Copy link
Author

DewGew commented Jun 10, 2020

@oznu any suggestions to fix this issue?

@oznu oznu reopened this Jun 10, 2020
@stale stale bot removed the stale used for stale issues label Jun 10, 2020
@oznu
Copy link
Member

oznu commented Jun 10, 2020

Extending the try...catch block to cover the part where the error is thrown should do it:

https://github.com/PatchworkBoy/homebridge-edomoticz/blob/master/index.js#L107

@DewGew
Copy link
Author

DewGew commented Jun 10, 2020

somthing like this maybe:

try {
        this.server = config.server;
        this.authorizationToken = false;
        if (this.server.indexOf(":") > -1 && this.server.indexOf("@") > -1) {
            var tmparr = this.server.split("@");
            this.authorizationToken = Helper.Base64.encode(tmparr[0]);
            this.server = tmparr[1];
        }
        this.ssl = (config.ssl == 1);
        this.port = config.port;
        this.room = config.roomid;
        this.api = api;
        this.apiBaseURL = "http" + (this.ssl ? "s" : "") + "://" + this.server + ":" + this.port + "/json.htm?";
        this.mqtt = false;
    } catch (e) {
        return;
    }

@oznu
Copy link
Member

oznu commented Jun 10, 2020

Yeah, maybe log the error with log.error

@oznu oznu 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 10, 2020
@DewGew
Copy link
Author

DewGew commented Jul 12, 2020

Now merged

@oznu
Copy link
Member

oznu commented Jul 12, 2020

Thanks!

@oznu oznu added verified use when a plugin meets the criteria - adds the verified badge text and removed pending the label given to a new verification/icon request labels Jul 12, 2020
@oznu oznu closed this as completed Jul 12, 2020
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

3 participants