ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
66 stars 27 forks source link

Save Fibaro device name in SerialNumber to identify device #116

Closed Krillle closed 5 years ago

Krillle commented 5 years ago

Fibaro saves the device ID in the default device name. In HomeKit this name is usually replaced by a more speaking name, often same name for same type of device in different rooms, like "ceiling lamp". Renamed to same same names the relation to the respective Fibaro device is only maintained by the room the device is in. If the room is messed up by mistake, it is hard to figure out the related Fibaro device again. Saving the Fibaro device name in the SerialNumber solves this issue. This SerialNumber is visible in the HomeKit device properties.

(I hope I figured out the right change for that.)

Krillle commented 5 years ago

Example screen from Homebridge plugin https://github.com/Krillle/homebridge-signalk

img_633688860281-1

lboue commented 5 years ago

Did your devices returns the SerialNumber by the REST HC2 API? Mine doesn't do it.

...
"saveLogs": "true",
"serialNumber": "",
"showEnergy": "true",
"smsNotificationID": "0",
"smsNotificationType": "0",
"updateVersion": "",
"useTemplate": "true",
"userDescription": "",
"value": "false"
},

Try a URL like this in your browser: http://@HC2/api/devices/

Regards

Krillle commented 5 years ago

No, they don't. My proposal is to store in the field SerialNumber the original device name which is used in Fibaro HC, the name where the UUID is generated from. Means the name which is returned as "name" by the REST API.

ilcato commented 5 years ago

I asked @lboue to include your change included in the #120 PR. You change is not valid since it's in the .js file not the .ts.