Giter VIP home page Giter VIP logo

Comments (4)

benfrancis avatar benfrancis commented on July 17, 2024

Trying to debug this, I cloned and built the master branch of the zigbee-adapter repo into the add-ons folder and managed to pair and use a Zigbee smart plug without any issues. When I swap the add-on out for the 0.21.1 packaged and released version it stops working.

If I manually build the released 0.21.1 tag it keeps working.

I've not figured out what's going on yet. I have noticed the version of the gateway-addon package listed as a devDependency in the Zigbee add-on is older (1.0.0) than the one shipped with the gateway (1.2.0-alpha.1), but it should ideally be backwards compatible.

from gateway.

benfrancis avatar benfrancis commented on July 17, 2024

Notably, if I npm prune --production on the 0.21.1 checkout after building (one of the steps carried out by the packaging script) to remove the devDependencies, it seems to stop working.

This suggests to me that during development the adapter is using its own gateway-addon 1.0.0 module, but once packaged it's traversing up the tree and using the gateway's central gateway-addon 1.2.0-alpha.1 module, and not working properly with that version.

This is further supported by the fact that the Z-wave add-on also lists gateway-addon 1.0.0 as a devDependency (and is broken), but the virtual-things-adapter doesn't (and is working fine). I guess that's why we tell people never to add it as a dependency for an add-on!

Next steps:

  • Upgrade the devDependency (or remove it if possible)
  • Test the add-on with both gateway 1.2 and gateway 1.1 (to make sure it's backwards compatible)

from gateway.

benfrancis avatar benfrancis commented on July 17, 2024

Update: I've tried upgrading the gateway-addon dependency of the zigbee-adapter to the same version used in gateway 1.2.0-alpha.1, but so far that alone doesn't seem to fix the problem WebThingsIO/zigbee-adapter#333

More debugging required.

from gateway.

benfrancis avatar benfrancis commented on July 17, 2024

I think I've figured out what's going on, at least for the Zigbee add-on, and I should have realised earlier.

The Zigbee adapter is deleting all properties from Thing Descriptions that don't have a truthy visible member.

I forgot we removed support for the visible member on master but re-introduced it on the 1.1 branch (for this reason). See #3038 for a full explanation.

Ideally we should fix this in individual add-ons rather than keeping this deprecated feature around for another release, but unfortunately it doesn't like the deprecation warning we added actually gets printed to the console so add-on developers may not have noticed it.

This may require some research to find out how many add-ons use the visible feature.

from gateway.

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.