Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Innr Plug not shown in overview #53

Open
vekunz opened this issue Nov 28, 2019 · 4 comments
Open

Innr Plug not shown in overview #53

vekunz opened this issue Nov 28, 2019 · 4 comments

Comments

@vekunz
Copy link

vekunz commented Nov 28, 2019

Hi, I bought an outlet from Innr, the Innr Smart Plug. I connected it to my Homebridge, and in the log output I can see that it connected successfully, and regularly it pings my outlet. But I can neither see the outlet in the web view not in the Home-App. I use the latest Homebridge, latest homebridge-zigbee and Node 10.

@vekunz vekunz changed the title Outlets not shown in overview Innr Plug not shown in overview Nov 28, 2019
@vekunz
Copy link
Author

vekunz commented Nov 28, 2019

I've now added this code locally to the devices list in .../node_modules/homebridge-zigbee/lib/devices as innr.smart_plug.js (after a bit of reverse engineering)

const HomeKitDevice = require('../HomeKitDevice')

class InnrSmartPlug extends HomeKitDevice {
  static get description() {
    return {
      model: 'SP 120',
      manufacturer: 'innr',
      name: 'Innr Smart Plug',
    }
  }

  getAvailbleServices() {
    return [{
      name: 'Outlet',
      type: 'Outlet',
    }]
  }

  onDeviceReady() {
    this.mountServiceCharacteristic({
      endpoint: 1,
      cluster: 'genOnOff',
      service: 'Outlet',
      characteristic: 'On',
      reportMinInt: 1,
      reportMaxInt: 2,
      reportChange: 1,
      parser: 'onOff',
    })
  }
}

module.exports = InnrSmartPlug

Now the plug is listed in Homebridge. The problem with this code is that it ignores the capability of the plug to measure energy consumption, but I have no idea how to add this to the code.

@BobbyT
Copy link

BobbyT commented Dec 16, 2019

You probably need to add the characteristic for energy consumption.
Check your zigbee.db, your device should have endpoints.clusters, one of them should be for that purpose.
Also take a look at lib/devices/lumi.ctrl_86plug.js which seems to have support for energy consumption.

@vekunz
Copy link
Author

vekunz commented Dec 17, 2019

I've noticed a problem. The official npm version 1.3.0 does not support energy consumption. The GitHub Version does, but the maintainer did not release a new version since then.

@vekunz
Copy link
Author

vekunz commented Dec 17, 2019

I managed to "use" the latest git version. But I saw that homebridge-zigbee doesn't have the right parser. I try to build one, but first I have to understand the technique behind it. Hopefully I manage to create a correct implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants