tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

Accessory information settings are not working #22

Closed luisiam closed 7 years ago

luisiam commented 8 years ago

Pretty minor stuff but adding itemManufacturer, itemModel, itemSerialNumber in config.json is not doing anything. I still get Default-Manufacturer, etc. in the accessory information service.

tannebil commented 8 years ago

I've noticed the same thing. The only value that passes into my HomeKit apps (Eve, Home) is the value for ItemName.

Also, ContactItem isn't listed in the README as a valid value for itemType but appears in the Items .js files. I'm not sure what it's supposed to do as I don't see any difference in the HomeKit app when I set it.

gramineo commented 8 years ago

I was able to get the manufacturer, model, and serial number to work by adding the some lines to items/AbstractItem.js .

In the first function which starts off with:

    var AbstractItem = function(widget,platform,homebridge) {

I added the following lines after the initial variable declarations:

    this.manufacturer = widget.manufacturer;
    this.model = widget.model;
    this.serialNumber = widget.serialNumber;

After restarting HomeBridge, I immediately saw all of my manufacturer, model, and serial number customAttrs which I had defined in my config.json .