Git Product home page Git Product logo

Comments (5)

dylanfrankcom avatar dylanfrankcom commented on May 14, 2024

Hey @PeteCooney, while I can see where you're coming from I think doing so would add a layer of unnecessary complexity to the setup process, make breaking changes to the user's current config, and could introduce bugs due to how Homebridge sets up a devices characteristics.

When a device in initialized within Homebridge it is assigned characteristics based on the service type provided by the plugin, an outlet from the Meross plugin in this situation. If the user is allowed to edit this value they would be able to initialize let's say a MSS210 as a MSG100 (Garage door opener). The MSS210 would then be sending incompatible requests to the Meross server such as a setting and receiving a GarageDoorState which could result in errors.

If you would like to experiment with this you can edit line 101 in index.js and initialize the device as a different service type. Simple on/off requests should still work but setting different states of an incompatible device such as colour, luminance, or status' could result in errors.

I feel as though the goal of a plugin is to provide a simplistic interface between the device and Homebridge and let the Home.app / HomeKit handle the rest. Let me know your thoughts!

from homebridge-meross.

PeteCooney avatar PeteCooney commented on May 14, 2024

Hi @dylanfrankcom, thanks for the detailed reply, much appreciated.

Regarding some of the risks you highlight:

  1. Complexity in setup: The additional setting would be optional and only apply to outlet type devices (if it's not present, or applied to an "unsupported" device, it simply gets ignored.
  2. Break existing config: As above, making this an optional setting would not break any existing config as the fall-back position would be to treat the device as its default type.
  3. Potential for bugs: Any change carries the potential to introduce bugs, however the risk could be minimised as highlighted above.
  4. Unsupported/unexpected message types: The scenario I'm suggesting applies specifically to plug-type outlets and only to change the device type between switch & light. This would certainly minimise the risk you highlight.
  5. Colour, luminance etc: These are admittedly a little harder to avoid. My MoesGo dimmer switches, connected via the homebridge-tuya-web plugin, have this issue and HomeBridge displays an error message if you try to set the colour/temperature of these devices.

I may take you up on the idea of tinkering with the code and, if I find an elegant solution, I'll be sure to submit a pull request for review.

from homebridge-meross.

github-actions avatar github-actions commented on May 14, 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 homebridge-meross.

github-actions avatar github-actions commented on May 14, 2024

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

from homebridge-meross.

donavanbecker avatar donavanbecker commented on May 14, 2024

See #151

from homebridge-meross.

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.