Open vekunz opened 4 years ago
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.
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.
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.
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.
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.