Giter Site home page Giter Site logo

homebridge-edomoticz about verified HOT 10 CLOSED

homebridge avatar homebridge commented on June 21, 2024
homebridge-edomoticz

from verified.

Comments (10)

oznu avatar oznu commented on June 21, 2024

Hi @DewGew,

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

from verified.

PatchworkBoy avatar PatchworkBoy commented on June 21, 2024

Go for it... 👍

from verified.

oznu avatar oznu commented on June 21, 2024
  • - 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 😄

from verified.

stale avatar stale commented on June 21, 2024

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.

from verified.

DewGew avatar DewGew commented on June 21, 2024

@oznu any suggestions to fix this issue?

from verified.

oznu avatar oznu commented on June 21, 2024

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

from verified.

DewGew avatar DewGew commented on June 21, 2024

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;
    }

from verified.

oznu avatar oznu commented on June 21, 2024

Yeah, maybe log the error with log.error

from verified.

DewGew avatar DewGew commented on June 21, 2024

Now merged

from verified.

oznu avatar oznu commented on June 21, 2024

Thanks!

from verified.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.