t0bst4r / matterbridge-home-assistant

Apache License 2.0
36 stars 2 forks source link

Bug: Only supported EndpointInterface implementation is Endpoint #59

Closed andrea689 closed 3 weeks ago

andrea689 commented 3 weeks ago

Hi, I start with "Manual Setup" and I receive these errors:

[10:35:25.732] [HomeAssistantPlatform] Failed to register device: light.luce_cucina 
[10:35:25.732] [HomeAssistantPlatform] Error: Only supported EndpointInterface implementation is Endpoint 
t0bst4r commented 3 weeks ago

Yes, i have seen that as well building the docker image. This is related to how NPM installs peer dependencies for global modules.

I'll fix that, but before I have other bugs to fix and features to build 😁 .

Workaround

As a workaround you could do the following:

  1. Create an app directory wherever you want. This directory is used to store the node_modules.
  2. Create a package.json file in your app dir with the following content:
    {
    "name": "my-matterbridge",
    "scripts": {
    "preserve": "matterbridge -add ./node_modules/matterbridge-home-assistant",
    "serve": "matterbridge -bridge"
    },
    "dependencies": {
    "matterbridge": "1.2.22",
    "matterbridge-home-assistant": "0.3.0"
    }
    }
  3. run npm install in your app directory
  4. Run npm run serve in your app directory
andrea689 commented 3 weeks ago

Many thanks, it works now!

For posterity, the globally installed plugin must first be removed:

matterbridge -remove matterbridge-home-assistant