ckuburlis / homebridge-tado

16 stars 15 forks source link

Can't access the measured temperature and homebridge crash #44

Closed mattnsr closed 7 years ago

mattnsr commented 7 years ago

Hi everyone,

I installed the plugin a few days ago. Everything went well but after a few days, when I check in homekit the accessory, homekit can't find Tado anymore and I have this in the log :

[2017-7-19 20:20:40] [Clim salon] The current temperature display unit is ºC /usr/local/lib/node_modules/homebridge-tado-ac/index.js:175 accessory.log("Current zone mode is " + obj.setting.mode); ^

TypeError: Cannot read property 'mode' of undefined at IncomingMessage. (/usr/local/lib/node_modules/homebridge-tado-ac/index.js:175:64) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

Just after that, homebridge shut down it self. Any idea ? All my system is up to date...

Thanks

macbook pro screenshot 2017-07-19 at 20 21 12
Arrbe commented 7 years ago

I've had the same problem: /opt/nodejs/lib/node_modules/homebridge-tado-ac/index.js:175 accessory.log("Current zone mode is " + obj.setting.mode); ^

TypeError: Cannot read property 'mode' of undefined at IncomingMessage. (/opt/nodejs/lib/node_modules/homebridge-tado-ac/index.js:175:64) at emitNone (events.js:110:20) at IncomingMessage.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1045:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

I've got 2 TADO modules: AC and Heater. I didn't understand how to set the zones but I didn't want the heater to be controlled (since not supported). The cooler only. However, the old API returns the measured temperature from the heater (thermostat) only. How can the pluging select the right accessory (the cooler) and ignore the the heater not supported? Through the zones?

I did just few tests by changing the zones and/or adding two different TADO accessories in the config.json. When I inverted the accessories' zone, the error changed into:

[Clima Soggiorno] Target temperature is unavailable /opt/nodejs/lib/node_modules/homebridge-tado-ac/index.js:239 if (JSON.stringify(obj.setting.power).match("OFF")) { ^

TypeError: Cannot read property 'power' of undefined at IncomingMessage. (/opt/nodejs/lib/node_modules/homebridge-tado-ac/index.js:239:43) at emitNone (events.js:110:20) at IncomingMessage.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1045:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

In fact, the heater (thermostat) was OFF.

Thanks in advance for your great work!

Arrbe