Coder Social home page Coder Social logo

Comments (5)

Supereg avatar Supereg commented on August 19, 2024 1

The problem is this line

thisChar.emit('change', {
oldValue:thisChar.value,
newValue:getOutputMapping(newValue),
context:null });
}
.

A plugin MUST NOT fire the change event manually. This is NOT public API.
For such scenarios where you want to push an updated value to HomeKit, use characteristic.updateValue(...).

from homebridge-bigassfans.

jmissig avatar jmissig commented on August 19, 2024

I saw the same issue, thanks for reporting

from homebridge-bigassfans.

mlamoure avatar mlamoure commented on August 19, 2024

The problem is this line

thisChar.emit('change', {
oldValue:thisChar.value,
newValue:getOutputMapping(newValue),
context:null });
}

.
A plugin MUST NOT fire the change event manually. This is NOT public API.
For such scenarios where you want to push an updated value to HomeKit, use characteristic.updateValue(...).

Understand the plugin is calling a private event here. Is there a way to mitigate where this does not cause a crash of Homebridge, or has the private event changed since prior to 1.3 and now the crash is because it's being called incorrectly despite never being intended to being called by a plugin in the first place?

Does anyone know if this plugin is actively maintained? I see a number of outstanding PR's for the motion sensor and no recent commits.

from homebridge-bigassfans.

Supereg avatar Supereg commented on August 19, 2024

[...] has the private event changed since prior to 1.3 and now the crash is because it's being called incorrectly despite never being intended to being called by a plugin in the first place?

That is exactly what is happening. I see if I may be able to mitigate that.

EDIT: Indeed latest beta should not crash anymore, as of this.

However the plugin MUST still change that, as emitting a change event does not properly persist the value in the characteristic cache.

from homebridge-bigassfans.

mlamoure avatar mlamoure commented on August 19, 2024

@Supereg confirmed beta 41 does not crash. thank you.

from homebridge-bigassfans.

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.