Giter Site home page Giter Site logo

Comments (10)

bwp91 avatar bwp91 commented on July 25, 2024 1

Hi @jasper-seinhorst

With a config of

        {
            "platform": "PorscheTaycan",
            "_bridge": {
                "username": "0E:32:1E:09:65:1B",
                "port": 34366
            }
        }

It is sending (i have the plugin as a child bridge) it into a crash loop:

[31/03/2023, 22:45:46] [homebridge-porsche-taycan] Child bridge process ended
[31/03/2023, 22:45:46] [homebridge-porsche-taycan] Process Ended. Code: 1, Signal: null
[31/03/2023, 22:45:53] [homebridge-porsche-taycan] Restarting Process...
[31/03/2023, 22:45:55] [homebridge-porsche-taycan] Launched child bridge with PID 4529
[31/03/2023, 22:45:55] Registering platform 'homebridge-porsche-taycan.PorscheTaycan'
[31/03/2023, 22:45:55] [homebridge-porsche-taycan] Loaded homebridge-porsche-taycan v0.9.0 child bridge successfully
TypeError: Cannot read properties of undefined (reading 'toString')
    at PorscheConnectVehicle.buildPostFormBody (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/porsche-connect/PorscheConnectBase.ts:36:30)
    at PorscheConnectVehicle.loginToRetrieveCookies (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/porsche-connect/PorscheConnect+Auth.ts:37:27)
    at PorscheConnectVehicle.auth (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/porsche-connect/PorscheConnect+Auth.ts:30:16)
    at PorscheConnectVehicle.authIfRequired (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/porsche-connect/PorscheConnect+Auth.ts:23:18)
    at PorscheConnectVehicle.getFromApi (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/porsche-connect/PorscheConnect.ts:82:29)
    at PorscheConnectVehicle.getVehicles (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/porsche-connect/PorscheConnect.ts:16:28)
    at PorscheTaycanPlatform.discoverVehicles (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/Platform.ts:35:52)
    at PorscheTaycanPlatform.initialise (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/Platform.ts:26:16)
    at HomebridgeAPI.<anonymous> (/usr/local/lib/node_modules/homebridge-porsche-taycan/src/Platform.ts:17:12)
    at HomebridgeAPI.emit (node:events:513:28)
[31/03/2023, 22:45:56] [homebridge-porsche-taycan] Child bridge process ended
[31/03/2023, 22:45:56] [homebridge-porsche-taycan] Process Ended. Code: 1, Signal: null

which does not meet the criteria of:

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

I would recommend that in the code you check for an 'empty' config and simply return (ideally with a log warning saying the plugin needs to be properly configured)

Also I may as well recommend now (although outside of the 'verified' criteria) this comment I am referring to a lot (!) about adding a name property in the config to allow users to change how the plugin name appears in the log:

from verified.

bwp91 avatar bwp91 commented on July 25, 2024 1

thanks for making the changes to catch config errors 👍

from verified.

github-actions avatar github-actions commented on July 25, 2024

Pre-checks completed successfully.

from verified.

jasper-seinhorst avatar jasper-seinhorst commented on July 25, 2024

/check

from verified.

github-actions avatar github-actions commented on July 25, 2024

Pre-checks completed successfully.

from verified.

github-actions avatar github-actions commented on July 25, 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.

jasper-seinhorst avatar jasper-seinhorst commented on July 25, 2024

/check

from verified.

github-actions avatar github-actions commented on July 25, 2024

Pre-checks completed successfully.

from verified.

github-actions avatar github-actions commented on July 25, 2024
  • - 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 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.
  • - GitHub releases 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.js v16 and v18.
  • - 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!

from verified.

github-actions avatar github-actions commented on July 25, 2024

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/oznu/homebridge-config-ui-x/wiki/Developers:-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.

Thank you for your contribution to the Homebridge Community.
https://homebridge.io

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.