ckuburlis / homebridge-tado

16 stars 15 forks source link

Tado causing Homebridge to drop out. #35

Closed sifield closed 7 years ago

sifield commented 7 years ago

Hi, I have had homebridge running for several months, however since adding Tado it randomly drops out. It could operate ok for days and then I get an error and it drops out. Below is a copy of the error message which I don't understand, are you able to work out what the issue is?

[2/10/2017, 9:19:41 PM] [Air Conditioning] Getting target state [2/10/2017, 9:19:41 PM] [Air Conditioning] Getting target state [2/10/2017, 9:19:43 PM] [Air Conditioning] Target temperature is 25ºC [2/10/2017, 9:19:43 PM] [Air Conditioning] Room temperature is 23.91ºC [2/10/2017, 9:19:43 PM] [Air Conditioning] Target temperature is 25ºC [2/10/2017, 9:19:43 PM] [Air Conditioning] Target operating state is COOL [2/10/2017, 9:19:43 PM] [Air Conditioning] Current zone mode is COOL [2/10/2017, 9:19:43 PM] [Air Conditioning] Current power state is ON [2/10/2017, 9:19:43 PM] [Air Conditioning] Target temperature is 25ºC [2/11/2017, 5:37:13 AM] [Air Conditioning] Getting target state [2/11/2017, 5:37:13 AM] [Air Conditioning] Getting target state [2/11/2017, 5:37:13 AM] [Air Conditioning] The current temperature display unit is ºC [2/11/2017, 5:37:13 AM] [Air Conditioning] Getting target state [2/11/2017, 5:37:13 AM] [Air Conditioning] Getting target state /usr/local/lib/node_modules/homebridge-tado/index.js:210 if (obj.setting.temperature != null) { ^

TypeError: Cannot read property 'temperature' of undefined at IncomingMessage. (/usr/local/lib/node_modules/homebridge-tado/index.js:210:28) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17)

thanks!

nitaybz commented 7 years ago

seems like it's not able to read the temperature from your device. what Tado device are you using? this plugin is only for Tado AC Smart Control.... also, did you installed it from the git? sudo npm install -g https://github.com/ckuburlis/homebridge-tado.git

CrazyCreator13 commented 7 years ago

Hello,

i have this plugin not in use actually, while I don't have AC Control. But can you add support for the Thermostats? And important, for multiple Thermostats ... I have 5 pieces and can't control :(

sifield commented 7 years ago

Hi, I am using the Tado AC Smart Control, I tried uninstalling the plug in and reinstalled as per above, however it still crashes randomly, it just crashed after 3 days with no issues:

[2/21/2017, 8:05:23 AM] [Air Conditioning] Getting target state [2/21/2017, 8:05:23 AM] [Air Conditioning] Getting target state [2/21/2017, 8:05:23 AM] [Air Conditioning] Getting target state [2/21/2017, 8:05:23 AM] [Air Conditioning] Getting target state [2/21/2017, 8:05:24 AM] [Air Conditioning] Room temperature is 22.27ºC [2/21/2017, 8:05:24 AM] [Air Conditioning] Target operating state is OFF [2/21/2017, 8:05:25 AM] [Air Conditioning] Target temperature is unavailable [2/21/2017, 8:05:25 AM] [Air Conditioning] Current zone mode is undefined [2/21/2017, 8:05:25 AM] [Air Conditioning] Current power state is OFF [2/21/2017, 8:05:25 AM] [Air Conditioning] Current operating state is OFF [2/21/2017, 9:18:36 AM] [Air Conditioning] The current temperature display unit is ºC [2/21/2017, 9:18:36 AM] [Air Conditioning] Getting target state [2/21/2017, 9:18:36 AM] [Air Conditioning] Getting target state [2/21/2017, 9:18:36 AM] [Air Conditioning] Getting target state [2/21/2017, 9:18:36 AM] [Air Conditioning] Getting target state /usr/local/lib/node_modules/homebridge-tado/index.js:336 accessory.log("Room temperature is " + obj.sensorDataPoints.insideTemperature.celsius + "ºC"); ^

TypeError: Cannot read property 'insideTemperature' of undefined at IncomingMessage. (/usr/local/lib/node_modules/homebridge-tado/index.js:336:76) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17)

any further thoughts?

nitaybz commented 7 years ago

@sifield I tried to do a little fix, tel me if it works: try to install from here: sudo npm install -g https://github.com/ckuburlis/homebridge-tado.git#crash-fix

I don't have much of a way to test it, so let me know how it goes.

nitaybz commented 7 years ago

@CrazyApple This plugin only works for Tado AC Smart Control, since I don't have the thermostst I cannot resolve that issue.

CrazyCreator13 commented 7 years ago

this plugin works great: homebridge-tadoHeating but support only one thermostat at the moment. I think is a good idea to make your plugin ready for the thermostat versions too 👍 ... with support for multiple thermostats

nitaybz commented 7 years ago

The thing is that it's not my plugin :), but I took control on it lately, I moved to another fork where I present it as a tado plugin for ac only... maybe I'll make it an ultimate plugin for all... but I don't have anyway of testing it.

CrazyCreator13 commented 7 years ago

You can coding and for testing you have me :) ;)
in the link I have wrote, the developer mean the plugin is a fork from your plugin ...

nitaybz commented 7 years ago

I'm not the original creator of this plugin, that would be @ckuburlis, and the tadoHeating plugin was forked from the original, since than. the API has changed, and I adapted this plugin. I'm curious to known if the thermostat and the Heaters are working the same exactly. maybe I'll work on that soon... I want to add support for occupancy sensor as well.

CrazyCreator13 commented 7 years ago

ok ... now i understand.

have you look inside the code from homebridge-tadoHeating? can you see similarity?

and I hope you make soon is not so far ;) ...

nitaybz commented 7 years ago

@sifield Hi, I tried to solve your issue in my own fork: https://github.com/nitaybz/homebridge-tado-ac try installing that from the git and tell me if it solve the problem, it should overcome the crashing issue.

CrazyCreator13 commented 7 years ago

forget me not ;) 👍

sifield commented 7 years ago

Thanks @nitaybz , I had uninstalled it due to crashing, just reinstalled with your plugin and will let you know how it goes.

sifield commented 7 years ago

@nitaybz, unfortunately it still crashes: [3/13/2017, 6:20:29 PM] Homebridge is running on port 51826. [3/13/2017, 6:23:03 PM] [Tado] The current temperature display unit is ºC [3/13/2017, 6:23:03 PM] [Tado] Getting target state [3/13/2017, 6:23:03 PM] [Tado] Getting target state [3/13/2017, 6:23:03 PM] [Tado] Getting target state [3/13/2017, 6:23:03 PM] [Tado] Getting target state [3/13/2017, 6:23:05 PM] [Tado] Room temperature is 25.93ºC [3/13/2017, 6:23:05 PM] [Tado] Target temperature is unavailable [3/13/2017, 6:23:05 PM] [Tado] Current zone mode is undefined [3/13/2017, 6:23:05 PM] [Tado] Current power state is OFF [3/13/2017, 6:23:05 PM] [Tado] Current operating state is OFF [3/13/2017, 6:23:05 PM] [Tado] Target operating state is OFF [3/13/2017, 6:23:24 PM] [Tado] Force cooling [3/13/2017, 6:23:24 PM] [Tado] Setting new overlay [3/13/2017, 6:23:24 PM] [Tado] zone: 1, body: {"termination":{"type":"MANUAL"},"setting":{"power":"ON","type":"AIR_CONDITIONING","mode":"COOL","temperature":{"celsius":20},"fanSpeed":"AUTO"}} [3/13/2017, 6:23:39 PM] [Tado] Set target state to off [3/13/2017, 6:23:39 PM] [Tado] Setting new overlay [3/13/2017, 6:23:39 PM] [Tado] zone: 1, body: {"termination":{"type":"MANUAL"},"setting":{"power":"OFF","type":"AIR_CONDITIONING"}} [3/13/2017, 7:24:45 PM] [Tado] Getting target state [3/13/2017, 7:24:45 PM] [Tado] Getting target state [3/13/2017, 7:24:45 PM] [Tado] Getting target state [3/13/2017, 7:24:45 PM] [Tado] The current temperature display unit is ºC [3/13/2017, 7:24:45 PM] [Tado] Getting target state [3/13/2017, 7:24:46 PM] [Tado] Target temperature is unavailable [3/13/2017, 7:24:46 PM] [Tado] Room temperature is 26.21ºC [3/13/2017, 7:24:46 PM] [Tado] Target operating state is OFF [3/13/2017, 7:24:46 PM] [Tado] Current zone mode is undefined [3/13/2017, 7:24:46 PM] [Tado] Current power state is OFF [3/13/2017, 7:24:46 PM] [Tado] Current operating state is OFF [3/13/2017, 7:26:46 PM] [Tado] Getting target state [3/13/2017, 7:26:46 PM] [Tado] Getting target state [3/13/2017, 7:26:46 PM] [Tado] Getting target state [3/13/2017, 7:26:46 PM] [Tado] The current temperature display unit is ºC [3/13/2017, 7:26:46 PM] [Tado] Getting target state [3/13/2017, 7:26:47 PM] [Tado] Target temperature is unavailable [3/13/2017, 7:26:47 PM] [Tado] Target operating state is OFF [3/13/2017, 7:26:47 PM] [Tado] Room temperature is 26.32ºC [3/13/2017, 7:26:47 PM] [Tado] Current zone mode is undefined [3/13/2017, 7:26:47 PM] [Tado] Current power state is OFF [3/13/2017, 7:26:47 PM] [Tado] Current operating state is OFF [3/13/2017, 7:40:00 PM] [Tado] Getting target state [3/13/2017, 7:40:00 PM] [Tado] Getting target state [3/13/2017, 7:40:00 PM] [Tado] Getting target state [3/13/2017, 7:40:00 PM] [Tado] The current temperature display unit is ºC [3/13/2017, 7:40:00 PM] [Tado] Getting target state [3/13/2017, 7:40:01 PM] [Tado] Target operating state is OFF [3/13/2017, 7:40:01 PM] [Tado] Room temperature is 26.52ºC [3/13/2017, 7:40:01 PM] [Tado] Target temperature is unavailable [3/13/2017, 7:40:01 PM] [Tado] Current zone mode is undefined [3/13/2017, 7:40:01 PM] [Tado] Current power state is OFF [3/13/2017, 7:40:01 PM] [Tado] Current operating state is OFF [3/13/2017, 7:44:01 PM] [Tado] Getting target state [3/13/2017, 7:44:01 PM] [Tado] Getting target state [3/13/2017, 7:44:01 PM] [Tado] Getting target state [3/13/2017, 7:44:01 PM] [Tado] The current temperature display unit is ºC [3/13/2017, 7:44:01 PM] [Tado] Getting target state [3/13/2017, 7:44:02 PM] [Tado] Target temperature is unavailable [3/13/2017, 7:44:02 PM] [Tado] Target operating state is OFF [3/13/2017, 7:44:02 PM] [Tado] Room temperature is 26.65ºC [3/13/2017, 7:44:02 PM] [Tado] Current zone mode is undefined [3/13/2017, 7:44:02 PM] [Tado] Current power state is OFF [3/13/2017, 7:44:02 PM] [Tado] Current operating state is OFF [3/13/2017, 8:56:20 PM] [Tado] Getting target state [3/13/2017, 8:56:20 PM] [Tado] Getting target state [3/13/2017, 8:56:20 PM] [Tado] Getting target state [3/13/2017, 8:56:20 PM] [Tado] The current temperature display unit is ºC [3/13/2017, 8:56:20 PM] [Tado] Getting target state /usr/local/lib/node_modules/homebridge-tado-ac/index.js:373 if (obj.setting.temperature == null) { ^

TypeError: Cannot read property 'temperature' of undefined at IncomingMessage. (/usr/local/lib/node_modules/homebridge-tado-ac/index.js:373:28) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17)

nitaybz commented 7 years ago

Please try the solution I wrote last: install from here: https://github.com/nitaybz/homebridge-tado-ac

Pltnorwich commented 7 years ago

Hi All,

Ive been using the plugin without issues for weeks, then oneway i had to restart the raspberry pi and now homebridge throws up this error with tado

[4/19/2017, 4:33:27 PM] [Tado] Getting room temperature [4/19/2017, 4:33:27 PM] [Tado] getting temperature display units = 0 [4/19/2017, 4:33:27 PM] [Tado] Getting target state [4/19/2017, 4:33:28 PM] [Tado] Target temperature is 21ºC [4/19/2017, 4:33:28 PM] [Tado] Getting current state events.js:160 throw er; // Unhandled 'error' event ^

Error: getaddrinfo ENOTFOUND my.tado.com my.tado.com:443 at errnoException (dns.js:28:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

Thing is nothing had changed and now get this error.

Any help would be great.

Thanks

sifield commented 7 years ago

I don't know if its been updates or because I moved homebridge from my Mac to a Raspberry PI, however its been stable now for a few weeks so I will close this. Thanks you for you help.