Coder Social home page Coder Social logo

Comments (8)

aarons22 avatar aarons22 commented on August 17, 2024 1

This is fixed in 2.3.1

from homebridge-bond.

iRayanKhan avatar iRayanKhan commented on August 17, 2024

Can you please paste your config and the bond version of the plugin you are using?
I’m thinking it’s either a config typo or using the new config on an older version of the plugin.

from homebridge-bond.

dxdc avatar dxdc commented on August 17, 2024

Actually, it has nothing to do with the bond version (I don't think), but I am running the latest beta if that is useful.

The problem (I believe) is that upon loading, it assumes config.json has a bond or bonds key in the config. If you have installed the plugin via npm, but didn't add it to config.json if fails with this error.

from homebridge-bond.

dxdc avatar dxdc commented on August 17, 2024

I'll bet this is the problematic line @iRayanKhan :

if (config.bonds === undefined) {

It should be something like:

if (config === undefined || config.bonds === undefined) {

from homebridge-bond.

iRayanKhan avatar iRayanKhan commented on August 17, 2024

I mean't plugin version my bad, but you intrigued me at "beta", do you mean iOS beta?
V2.1.0 should have fixed it where if you didn't define the bond plugin in the config it gives a warning, but not a crash. I can make a fork to try out your suggestion, but I think we need some more info.

  1. Plugin Version
  2. Config (Redact personal info)
  3. Node version node -v

Edit:
Can you also run HomeBridge with the -D debug flag?

from homebridge-bond.

dxdc avatar dxdc commented on August 17, 2024

@iRayanKhan

  • Node v10.16.3
  • For config.json, you can actually try just deleting that file. That's the simplest way to reproduce it.
  • From homebridge-bond/package.json [email protected]

Keep in mind that once I edited/added config.json it worked fine. My suggestion above I think will fix it -- you're looking for the bonds property on config, but part of that assumption is that config exists. The bond plugin is the only one I've seen that produces a fatal error in the absence of config.json file.

I mean't plugin version my bad, but you intrigued me at "beta", do you mean iOS beta?

Yes, I'm running FW 2.9.1-beta using the latest bond-beta on iOS.

from homebridge-bond.

iRayanKhan avatar iRayanKhan commented on August 17, 2024

Interesting, I run over 10 instances of homebridge and it works fine. I'll make a backup of it and test it out once I get home. Some of my plugins such as Tplink-smarthome, and Tuya-Lan return a fatal error when their plugin in not defined, so I'll see what's different between this and those plugins and see if I can repro and find a root cause. I'm out rn so it'll be a bit for me before I can take a look at it.

from homebridge-bond.

dxdc avatar dxdc commented on August 17, 2024

Thanks! Not urgent... just something to note if config file is missing.

from homebridge-bond.

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.