henry-spanka / homebridge-freeathome

Platform Plugin to manage free@home accessories via HomeBridge
MIT License
56 stars 10 forks source link

floorId && roomId ? floorData[floorId.getText()].rooms[roomId.getText()].name : "" #65

Closed deniskern closed 1 year ago

deniskern commented 1 year ago

Hi, i'm getting following error

`/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/XmlParser.js:111 "room": floorId && roomId ? floorData[floorId.getText()].rooms[roomId.getText()].name : "",
TypeError: Cannot read properties of undefined (reading 'name')
    at Function.parseDeviceData (/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/XmlParser.js:111:106)
    at Function.parseMasterUpdate (/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/XmlParser.js:18:21)
    at SystemAccessPoint.<anonymous> (/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/SystemAccessPoint.js:326:53)
    at Generator.next (<anonymous>)
    at /var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/SystemAccessPoint.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/SystemAccessPoint.js:4:12)
    at SystemAccessPoint.handleRpcCallResult (/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/SystemAccessPoint.js:305:16)
    at SystemAccessPoint.<anonymous> (/var/lib/homebridge/node_modules/homebridge-freeathome/node_modules/freeathome-api/dist/lib/SystemAccessPoint.js:273:26)
    at Generator.next (<anonymous>)`
henry-spanka commented 1 year ago

Hi, please make sure that each actuator and floor has a name defined.

henry-spanka commented 1 year ago

This issue was caused by a bug in the library henry-spanka/freeathome-api#45. The issue has now been resolved. Please try to update the npm dependencies to get the latest version of the freeathome-api package (>= 1.1.3).