tommasomarchionni / homebridge-openHAB

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

Issue with CurrentRelativeHumidity #15

Closed redhell closed 8 years ago

redhell commented 8 years ago

Homebridge crashes:

Feb 17 18:16:20 pichief homebridge[6073]: /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:71 Feb 17 18:16:20 pichief homebridge[6073]: throw new Error("Cannot add a Characteristic with the same UUID as another Characteristic in this Service: " + existing.UUID); Feb 17 18:16:20 pichief homebridge[6073]: ^ Feb 17 18:16:20 pichief homebridge[6073]: Error: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: 00000010-0000-1000-8000-0026BB765291 Feb 17 18:16:20 pichief homebridge[6073]: at Service.addCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:71:13) Feb 17 18:16:20 pichief homebridge[6073]: at ThermostatItem.updateCurrentRelativeHumidity (/usr/local/lib/node_modules/homebridge-openhab/items/ThermostatItem.js:283:10) Feb 17 18:16:20 pichief homebridge[6073]: at WebSocket. (/usr/local/lib/node_modules/homebridge-openhab/libs/WSListener.js:27:14) Feb 17 18:16:20 pichief homebridge[6073]: at emitTwo (events.js:87:13) Feb 17 18:16:20 pichief homebridge[6073]: at WebSocket.emit (events.js:172:7) Feb 17 18:16:20 pichief homebridge[6073]: at Receiver.ontext (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/WebSocket.js:816:10) Feb 17 18:16:20 pichief homebridge[6073]: at /usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:477:18 Feb 17 18:16:20 pichief homebridge[6073]: at Receiver.applyExtensions (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:364:5) Feb 17 18:16:20 pichief homebridge[6073]: at /usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:466:14 Feb 17 18:16:20 pichief homebridge[6073]: at Receiver.flush (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:340:3)

Config is: { "itemName":"rweHumidityBad", "itemLabel": "Humidity Bad", "itemManufacturer": "RWE Effizienz", "itemModel": "Humidity Sensor", "itemType": "ThermostatItem", "itemSubType":"CurrentRelativeHumidityItem", "itemUniqueAggregationId":1, "skipItem": false },

obartelt commented 8 years ago

I think the problem is, that in updateCurrentRelativeHumidity addCharacteristic is called (instead of getCharacteristic like in updateCurrentTemperature)...

redhell commented 8 years ago

Changed it and it hasn't crashed since then. #16 solves it.

DNAngelX commented 8 years ago

Hey, can you explain what to do to fix that issue?

I have the same one,... everytime when the temperature is changing in one room, Homebridge is crashing with the same issue!

My Config´s are the same like your´s.

Thanks

Jan