seydx / homebridge-tado-platform

Homebridge plugin for controlling Tado devices
MIT License
126 stars 66 forks source link

[BUG] - Hot Water showing "no response" since 5.0 update #18

Closed mylesagray closed 5 years ago

mylesagray commented 5 years ago

Updated the plugin from 4.x to 5.0 and since then the boiler hot water has been showing "no response" in HomeKit.

The hot water is working fine in the Tado app and does trigger on and off correctly.

The plugin is pulling back the correct ID for the boiler and everything, but for some reason is triggering a battery warning in Eve as well (this is obviously an object which has no battery).

mylesagray commented 5 years ago

I have noted - this only happens when the hot water is OFF in Tado, when it's on, the object responds and works as expected, once turned off in the Tado app, it stops responding in HomeKit.

rossco57 commented 5 years ago

My hot water is permanently on but still show no response

Sent from Ross Hendrie's iPhoneX

On 15 Apr 2019, at 20:28, Myles Gray notifications@github.com wrote:

I have noted - this only happens when the hot water is OFF in Tado, when it's on, the object responds and works as expected, once turned off in the Tado app, it stops responding in HomeKit.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

seydx commented 5 years ago

Hot Water is a known bug, working on this, is a little bit hard because i dont have a device for hot water... will push a new update du debug more

mylesagray commented 5 years ago

I can pull whatever logs you need - let me know.

seydx commented 5 years ago

v5.0.3 is online with additional log functionality for HOT_WATER devices

update and restart homebridge pls and post the output here

mylesagray commented 5 years ago

Doesn't seem any more verbose than normal - just the usual on startup:

[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Office RU1838221824
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Office VA0104664064
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Office Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Living Room VA0020777984
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Living Room VA0097978880
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Living Room VA1245514752
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Living Room Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master Wardrobe RU4110879744
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master Wardrobe VA2766408448
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master Wardrobe Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Hallway VA3984657408
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Hallway Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Spare Bedroom VA2759920640
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Spare Bedroom Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Utility Room VA3319597824
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Utility Room Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Main Bathroom VA0601688832
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Main Bathroom Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master Bedroom VA2849966848
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master Bedroom Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master En-suite VA3789490944
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Master En-suite Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Office En-suite VA3554740992
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Office En-suite Window
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Hot Water BU3344960000
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Myles iPhone
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Anyone
[4/17/2019, 7:28:41 PM] [Tado] [INFO] Configuring accessory Central Switch

When states for the TRVs change, then it logs to console - but nothing when I change the Hot Water.

Aside from the initial discovery of the device, it doesn't show any logs for it at all now.

seydx commented 5 years ago

Hmm, it seems that the zone type from Hot Water is not initialised as HOT_WATER for some readon, will check this, rhx

seydx commented 5 years ago

@mylesagray @rossco57

Pushed v5.0.4 for HOTWATER debugging, can you update and restart homebridge and post the log pls

mylesagray commented 5 years ago

Nothing showing in the logs - but I dug into the API for my HOT_WATER on and off states and these are the outputs at API address: https://my.tado.com/api/v2/homes/{{home}}/zones/0/state

Off:

{
    "tadoMode": "HOME",
    "geolocationOverride": false,
    "geolocationOverrideDisableTime": null,
    "preparation": null,
    "setting": {
        "type": "HOT_WATER",
        "power": "OFF",
        "temperature": null
    },
    "overlayType": null,
    "overlay": null,
    "openWindow": null,
    "nextScheduleChange": {
        "start": "2019-04-22T14:00:00Z",
        "setting": {
            "type": "HOT_WATER",
            "power": "ON",
            "temperature": null
        }
    },
    "nextTimeBlock": {
        "start": "2019-04-22T14:00:00.000Z"
    },
    "link": {
        "state": "ONLINE"
    },
    "activityDataPoints": {},
    "sensorDataPoints": {}
}

On:

{
    "tadoMode": "HOME",
    "geolocationOverride": false,
    "geolocationOverrideDisableTime": null,
    "preparation": null,
    "setting": {
        "type": "HOT_WATER",
        "power": "ON",
        "temperature": null
    },
    "overlayType": "MANUAL",
    "overlay": {
        "type": "MANUAL",
        "setting": {
            "type": "HOT_WATER",
            "power": "ON",
            "temperature": null
        },
        "termination": {
            "type": "TIMER",
            "typeSkillBasedApp": "TIMER",
            "durationInSeconds": 900,
            "expiry": "2019-04-22T12:59:39Z",
            "remainingTimeInSeconds": 894,
            "projectedExpiry": "2019-04-22T12:59:39Z"
        }
    },
    "openWindow": null,
    "nextScheduleChange": {
        "start": "2019-04-22T14:00:00Z",
        "setting": {
            "type": "HOT_WATER",
            "power": "ON",
            "temperature": null
        }
    },
    "nextTimeBlock": {
        "start": "2019-04-22T14:00:00.000Z"
    },
    "link": {
        "state": "ONLINE"
    },
    "activityDataPoints": {},
    "sensorDataPoints": {}
}
mylesagray commented 5 years ago

Update - launched with DEBUG=* set - very verbose, but found the error (removed sensitive info):

TadoPlatformApi [Tado Debug]: api request 156: get /api/v2/homes/{{my home id}}/zones/0/state - {} - {"id":0,"name":"Hot Water"} +104ms
  follow-redirects options { maxRedirects: 21,
  maxBodyLength: 10485760,
  protocol: 'https:',
  path: '/api/v2/homes/{{my home id}}/zones/0/state',
  method: 'get',
  headers:
   { Accept: 'application/json, text/plain, */*',
     'Content-Type': 'application/json',
     Authorization:
      'Bearer ',
     'User-Agent': 'axios/0.18.0',
     'Content-Length': 2 },
  agent: undefined,
  auth: undefined,
  hostname: 'my.tado.com',
  port: null,
  nativeProtocols:
   { 'http:':
      { _connectionListener: [Function: connectionListener],
        METHODS: [Array],
        STATUS_CODES: [Object],
        Agent: [Function],
        ClientRequest: [Function: ClientRequest],
        IncomingMessage: [Function: IncomingMessage],
        OutgoingMessage: [Function: OutgoingMessage],
        Server: [Function: Server],
        ServerResponse: [Function: ServerResponse],
        createServer: [Function: createServer],
        get: [Function: get],
        request: [Function: request],
        maxHeaderSize: [Getter],
        globalAgent: [Getter/Setter] },
     'https:':
      { Agent: [Function: Agent],
        globalAgent: [Agent],
        Server: [Function: Server],
        createServer: [Function: createServer],
        get: [Function: get],
        request: [Function: request] } } } +329ms
  TadoPlatformApi [Tado Debug]: api request 156: Ok +485ms
  TadoPlatform Hot Water BU3344960000: An error occured while getting new state +10s
  TadoPlatform Can not find zone with ID: undefined +1ms
seydx commented 5 years ago

@mylesagray

v5.0.5 is online, can u update, reinstall and post the log AND your config.json pls after restart

seydx commented 5 years ago

Hot Water should be fixed with 5.0.7

seydx commented 5 years ago

@mylesagray

v5.1.1 is online with major improvements, Please follow the instructions below before updating the plugin

seydx commented 5 years ago

Closing issue, feel free to reopen if you have still issues

mylesagray commented 5 years ago

Followed above instructions - it has created all the tstats and such and the hot water is now no-longer showing "not responding".

However, get and set of temperature on the Hot Water isn't working with the below logs:

[Tado] [INFO] Hot Water BU3344960000: Auto Mode
[4/24/2019, 10:56:21 AM] [Tado] [INFO] Hot Water BU3344960000: Heat Mode
[4/24/2019, 10:56:22 AM] [Tado] [ERROR] Hot Water BU3344960000: An error occured while setting new state!
[4/24/2019, 10:56:22 AM] [Tado] [INFO] Hot Water BU3344960000: Auto Mode
[4/24/2019, 10:56:23 AM] [Tado] [INFO] Hot Water BU3344960000: Heat Mode
[4/24/2019, 10:56:23 AM] [Tado] [ERROR] Hot Water BU3344960000: An error occured while setting new state!
[4/24/2019, 10:56:28 AM] [Tado] [INFO] Hot Water BU3344960000: Setting new temperature: 62
[4/24/2019, 10:56:28 AM] [Tado] [ERROR] Hot Water BU3344960000: An error occured while setting new temp!
[4/24/2019, 10:56:28 AM] [Tado] [INFO] Hot Water BU3344960000: Setting new temperature: 65
[4/24/2019, 10:56:29 AM] [Tado] [ERROR] Hot Water BU3344960000: An error occured while setting new temp!

Also - if I turn on hot water in the Tado app, this is not reflected in HomeKit - the plugin never detects the change.

mylesagray commented 5 years ago

I can't re-open the issue as I didn't close it - you'd have to reopen it.

seydx commented 5 years ago

Can you start in Debug mode pls @mylesagray

With

DEBUG=TadoPlatform,TadoPlatformApi

mylesagray commented 5 years ago

Okay found the error on get:

TadoPlatform Hot Water BU3344960000: An error occured while getting new state +30s
  TadoPlatform TypeError: Cannot read property 'celsius' of null
  TadoPlatform     at thermostat_Accessory.getState (/usr/local/lib/node_modules/homebridge-tado-platform/src/accessories/thermostat.js:307:141) +0ms

Hot Water has no temperature setting - it's binary on or off. So you can't set the temp or get it, just set state to on or off.

When setting through HomeKit I find that it does a get of state first and fails here:

https://github.com/SeydX/homebridge-tado-platform/blob/d20a8d7f3d49a387cb99d68cea27369e0250edbe/src/accessories/thermostat.js#L307

Because in the "on" state of Hot water - it is listed as "temperature": null but "power": "ON",:

{
    "tadoMode": "HOME",
    "geolocationOverride": false,
    "geolocationOverrideDisableTime": null,
    "preparation": null,
    "setting": {
        "type": "HOT_WATER",
        "power": "ON",
        "temperature": null
    },
    "overlayType": "MANUAL",
    "overlay": {
        "type": "MANUAL",
        "setting": {
            "type": "HOT_WATER",
            "power": "ON",
            "temperature": null
        },
.
.
.
seydx commented 5 years ago

@mylesagray

ah thats a different type of HOT_WATER

i have only seen HOT_WATER with temperature adjustment, but yours is only on/off (without temperature adjustment)

will fix this, thx

seydx commented 5 years ago

@mylesagray

Sooo, v5.1.2 is online

I added a new Accessory Type (valve/faucet) for Hotwater without temp adjustment possibility

Hope it will works fine

seydx commented 5 years ago

@mylesagray

Please follow again these instructions to re add the devices to HomeKit

https://github.com/SeydX/homebridge-tado-platform#troubleshooting

adavison007 commented 5 years ago

Hi @SeydX The hot water button is awesome, I have done it and one issue... when I turn the hot water on or off in Tado app, it mirrors correctly in Homekit... when I turn the water off in home kit it also turns off in Tado... BUT when turning on in homekit it turns straight back off again after a few seconds..... I have rebuild the confidence per your instructions, ideas?

seydx commented 5 years ago

@adavison007

Do you have hotwater with temperature adjustment (thermostat service) or without temperature adjustment (faucet service) ?

Does it happen every time? Any errors in the log? Does it switch over again by itself?

adavison007 commented 5 years ago

I have the faucet service and it appears as a tap icon... haven't left it long enough to see what happens on next auto change..... let me grab logs

adavison007 commented 5 years ago

OK, not able to get logs, I cannot find where they are on my PI, and whenever I enable logs in homebridge UI it breaks my permissions.... It does happen every time, and only on turning on, all other functions work... or if you can assist with finding logs I am happy to give it a go...

seydx commented 5 years ago

@adavison007

v5.1.3 is online, can you update and try again pls

adavison007 commented 5 years ago

@SeydX Hi, thanks, just updated, restarted homekit and not working, same as last time, I did not do the config rebuild on this build, I did on previous one ??

seydx commented 5 years ago

@adavison007

Can you record your screen and post the GIF here from the problem pls?

adavison007 commented 5 years ago

@SeydX Two Screen Shots, one showing it on and turning it off successfully, the other with it off and not turning it on as it self turns off... (keep watching, it takes a while for on to fail)

IMB_0TNhPF

IMB_7Y3cRS

seydx commented 5 years ago

@adavison007

Should be fixed with v5.1.4

adavison007 commented 5 years ago

@SeydX sorry to be a pain, i get an error when updating...

pi@spinney:~ $ sudo npm install -g homebridge-tado-platform@latest

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated joi@13.7.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated hoek@5.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-c267cd3a': Permission denied npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-04-25T09_04_43_594Z-debug.log

mylesagray commented 5 years ago

Can confirm @SeydX - it’s working perfectly now, on off is reflected from Tado App and if started in HomeKit reflects in Tado too,

Awesome thank you so much man!

Do you have a donate link? :)

Sent from mobile

On 25 Apr 2019, at 10:05, adavison007 notifications@github.com wrote:

@SeydX sorry to be a pain, i get an error when updating...

pi@spinney:~ $ sudo npm install -g homebridge-tado-platform@latest

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated joi@13.7.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated hoek@5.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it! npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-c267cd3a': Permission denied npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-04-25T09_04_43_594Z-debug.log

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

adavison007 commented 5 years ago

@SeydX yep, after I completely destroyed my homebridge with permissions (not sure how) I've rebuilt it and can also confirm hot water working, nice job man

seydx commented 5 years ago

@mylesagray @adavison007

Im glad to help you

Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NP4T3KASWQLD8

Closing this issue now :)