homebridge-plugins / homebridge-resideo

The Homebridge Resideo plugin allows you to access your Resideo devices from HomeKit.
ISC License
37 stars 8 forks source link

Persistent 400 Error when updating temperature for T10Pro #543

Closed matthiasotto closed 3 years ago

matthiasotto commented 3 years ago

Describe The Bug:

Setting the heat or cool temperature using my iOS Homeapp is not reflected on my actual thermostat nor the Honeywell Home app.

To Reproduce:

  1. Install Homebridge
  2. Install Homebridge Honeywell Home plugin
  3. Create Honeywell Home Developer account as per instructions
  4. Input tokens/keys
  5. Authorize Honeywell Consumer account
  6. Change temperature in iOS Home App.

Expected behavior:

Temperature should be updated on thermostat.

Logs:

[19/08/2021, 10:39:14] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[19/08/2021, 10:39:14] [HB Supervisor] Started Homebridge v1.3.4 with PID: 10099
Initializing HAP-NodeJS v0.9.4...
[19/08/2021, 10:39:17] Loaded config.json with 0 accessories and 3 platforms.
[19/08/2021, 10:39:17] Loaded 15 cached accessories from cachedAccessories.
[19/08/2021, 10:39:17] ---
[19/08/2021, 10:39:19] Loaded plugin: homebridge-config-ui-x@4.41.2
[19/08/2021, 10:39:19] Registering platform 'homebridge-config-ui-x.config'
[19/08/2021, 10:39:19] ---
[19/08/2021, 10:39:20] Loaded plugin: homebridge-honeywell-home@9.6.0
[19/08/2021, 10:39:20] Registering platform 'homebridge-honeywell-home.HoneywellHome'
[19/08/2021, 10:39:20] ---
[19/08/2021, 10:39:21] ---
[19/08/2021, 10:39:21] Loading 3 platforms...
[19/08/2021, 10:39:21] [Config] Initializing config platform...
[19/08/2021, 10:39:21] [Config] Running in Service Mode
[19/08/2021, 10:39:21] [HoneywellHome] Initializing HoneywellHome platform...
[19/08/2021, 10:39:21] [HoneywellHome] Finished initializing platform: HoneywellHome
[19/08/2021, 10:39:21] [HoneywellHome] Using Default Refresh Rate.
[19/08/2021, 10:39:21] [HoneywellHome] Using Default Push Rate.
[19/08/2021, 10:39:21] [HoneywellHome] Config OK
[19/08/2021, 10:39:21] [HoneywellHome] Loading accessory from cache: Living Room Thermostat
[19/08/2021, 10:39:21] [HoneywellHome] Loading accessory from cache: Master Bedroom IndoorAirSensor
[19/08/2021, 10:39:22] [HoneywellHome] Executed didFinishLaunching callback
Preparing Advertiser for 'Homebridge B9E3 9A30' using bonjour-hap backend!
Setup Payload:
X-HM://0000YYYYYYYYY
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 000-00-000 │     
    └────────────┘     

Starting to advertise 'Homebridge B9E3 9A30' using bonjour-hap backend!
[19/08/2021, 10:39:22] Homebridge v1.3.4 (Homebridge B9E3) is running on port 51077.
[19/08/2021, 10:39:22] [HoneywellHome] Got access token: muahahahahahaha
[19/08/2021, 10:39:22] [HoneywellHome] New refresh token: muahahahahahaha
[19/08/2021, 10:39:22] [HoneywellHome] Homebridge config.json has been updated with new refresh token.
[19/08/2021, 10:39:23] [HoneywellHome] Total Locations Found: 1
[19/08/2021, 10:39:23] [HoneywellHome] Total Devices Found at Home : 1
[19/08/2021, 10:39:23] [HoneywellHome] Restoring existing accessory from cache: Living Room Thermostat DeviceID: LCC-B82CA04BA009
[19/08/2021, 10:39:24] [HoneywellHome] Software Revision 0 0 0 Thermostat "1.2.8.0"
[19/08/2021, 10:39:24] [HoneywellHome] Thermostat Living Room Thermostat Heat - Device is Currently:  0
[19/08/2021, 10:39:24] [HoneywellHome] Thermostat Living Room Thermostat - Device is in "Heat" mode
[19/08/2021, 10:39:24] [HoneywellHome] Thermostat Living Room Thermostat - [ 'Heat', 'Off', 'Cool', 'Auto' ]
[19/08/2021, 10:39:24] [HoneywellHome] Thermostat Living Room Thermostat - Only Show These Modes: [2,1,0,3]
[19/08/2021, 10:39:24] [HoneywellHome] Adding service
[19/08/2021, 10:39:24] [HoneywellHome] Thermostat Living Room Thermostat - Available FAN settings {"allowedModes":["On","Auto","Circulate"],"changeableValues":{"mode":"On"}}
[19/08/2021, 10:39:24] [HoneywellHome] Adding service
[19/08/2021, 10:39:24] [HoneywellHome] Thermostat UDID: Living Room-LCC-B82CA04BA009-T9-T10
[19/08/2021, 10:39:24] [HoneywellHome] Restoring existing accessory from cache: Master Bedroom IndoorAirSensor DeviceID: 114352
[19/08/2021, 10:39:24] [HoneywellHome] Only Displaying Room Sensor(s).
[19/08/2021, 10:39:24] [HoneywellHome] getCurrentSensorData Cache Thermostat T9-T10 - Living Room
[19/08/2021, 10:39:24] [HoneywellHome] Room Sensor Master Bedroom IndoorAirSensor - 21.5°c, 46%
[19/08/2021, 10:39:24] [HoneywellHome] Adding service
[19/08/2021, 10:39:24] [HoneywellHome] Adding service
[19/08/2021, 10:39:24] [HoneywellHome] Adding service
[19/08/2021, 10:39:45] [HoneywellHome] Thermostat Living Room Thermostat - Set TargetHeatingCoolingState: 3
[19/08/2021, 10:39:48] [HoneywellHome] Thermostat Living Room Thermostat - Set HeatingThresholdTemperature: 20.5
[19/08/2021, 10:39:48] [HoneywellHome] Thermostat Living Room Thermostat - Set TargetTemperature: 22.5
[19/08/2021, 10:39:48] [HoneywellHome] Thermostat Living Room Thermostat - Set CoolingThresholdTemperature: 24.5
[19/08/2021, 10:39:48] [HoneywellHome] Sending request for Living Room Thermostat to Honeywell API. mode: Auto coolSetpoint: 24.5 heatSetpoint: 20.5 thermostatSetpointStatus: PermanentHold
[19/08/2021, 10:39:48] [HoneywellHome] Thermostat Living Room Thermostat pushChanges - {"mode":"Auto","thermostatSetpointStatus":"PermanentHold","autoChangeoverActive":true,"coolSetpoint":24.5,"heatSetpoint":20.5}
[19/08/2021, 10:39:49] [HoneywellHome] "Request failed with status code 400"
[19/08/2021, 10:39:49] [HoneywellHome] Thermostat Living Room Thermostat - {"message":"Request failed with status code 400","name":"Error","stack":"Error: Request failed with status code 400\n    at createError (/usr/lib/node_modules/homebridge-honeywell-home/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/lib/node_modules/homebridge-honeywell-home/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-honeywell-home/node_modules/axios/lib/adapters/http.js:260:11)\n    at IncomingMessage.emit (events.js:412:35)\n    at endReadableNT (internal/streams/readable.js:1317:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21)","config":{"url":"https://api.honeywell.com/v2/devices/thermostats/LCC-B82CA04BA009","method":"post","data":"{\"mode\":\"Auto\",\"thermostatSetpointStatus\":\"PermanentHold\",\"autoChangeoverActive\":true,\"coolSetpoint\":24.5,\"heatSetpoint\":20.5}","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","Authorization":"Bearer wQV4s2RYUlc9Ihps3wsbGSMbqjo2","User-Agent":"axios/0.21.1","Content-Length":126},"params":{"locationId":3005609,"apikey":"AujyuQoLmOas6ZHhkKs9repsrpkO2sku"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"responseType":"json","xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1}}
(node:10099) UnhandledPromiseRejectionWarning: Error: HAP Status Error: -70408
    at new HapStatusError (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/hapStatusError.ts:15:5)
    at Thermostats.apiError (/usr/lib/node_modules/homebridge-honeywell-home/src/devices/thermostats.ts:634:11)
    at /usr/lib/node_modules/homebridge-honeywell-home/src/devices/thermostats.ts:261:16
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10099) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:10099) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[19/08/2021, 10:39:50] [HoneywellHome] Got access token: muahahahahahaha
[19/08/2021, 10:39:50] [HoneywellHome] New refresh token: muahahahahahaha
[19/08/2021, 10:39:50] [HoneywellHome] Homebridge config.json has been updated with new refresh token.

Homebridge Config:

{
    "bridge": {
        "name": "Homebridge B9E3",
        "username": "EE:BB:AA:11:BB:EE",
        "port": 51077,
        "pin": "000-00-000"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "HoneywellHome",
            "credentials": {
                "consumerKey": "AujyuQoLmOa1111111111111epsrpkO2sku",
                "consumerSecret": "zkJGtg1BBBBBBBBBBBnU",
                "accessToken": "NzZNE2NcnOYjUUUUUUUUUUUU4Dh4Hs19",
                "refreshToken": "GZlAxasJJJJJJJJJJJJJGGmKkhgGmEZB"
            },
            "platform": "HoneywellHome"
        },
        {
            "platform": "PowerView",
            "name": "PowerView",
            "host": "192.168.0.201"
        }
    ]
}

Device & Model:

T10 Pro (THX321WFS2001W)

Environment:


Thank you!

donavanbecker commented 3 years ago

Can you try the latest beta?

matthiasotto commented 3 years ago

@donavanbecker I didn't get around to trying the beta, but just updated to 10.0.0 and tried again:

[22/08/2021, 12:09:28] [HoneywellHome] Thermostat Living Room Thermostat - Set CoolingThresholdTemperature: 23.5
[22/08/2021, 12:09:28] [HoneywellHome] Thermostat Living Room Thermostat - Set TargetTemperature: 22.3
[22/08/2021, 12:09:28] [HoneywellHome] Thermostat Living Room Thermostat - Set HeatingThresholdTemperature: 21.1
[22/08/2021, 12:09:28] [HoneywellHome] Send thermostatSetpointStatus
[22/08/2021, 12:09:28] [HoneywellHome] T9-T10
[22/08/2021, 12:09:28] [HoneywellHome] set autoChangeoverActive
[22/08/2021, 12:09:28] [HoneywellHome] T9-T10
[22/08/2021, 12:09:28] [HoneywellHome] Sending request for Living Room Thermostat to Honeywell API. mode: Auto coolSetpoint: 23.5 heatSetpoint: 21.1 thermostatSetpointStatus: PermanentHold
[22/08/2021, 12:09:28] [HoneywellHome] Thermostat Living Room Thermostat pushChanges - {"mode":"Auto","thermostatSetpointStatus":"PermanentHold","autoChangeoverActive":true,"coolSetpoint":23.5,"heatSetpoint":21.1}
[22/08/2021, 12:09:29] [HoneywellHome] "Request failed with status code 400"
[22/08/2021, 12:09:29] [HoneywellHome] Thermostat Living Room Thermostat - {"message":"Request failed with status code 400","name":"Error","stack":"Error: Request failed with status code 400\n    at createError (/usr/lib/node_modules/homebridge-honeywell-home/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/lib/node_modules/homebridge-honeywell-home/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-honeywell-home/node_modules/axios/lib/adapters/http.js:260:11)\n    at IncomingMessage.emit (events.js:412:35)\n    at endReadableNT (internal/streams/readable.js:1317:12)\n    at processTicksAndRejections (internal/process/task_queues.js:82:21)","config":{"url":"https://api.honeywell.com/v2/devices/thermostats/LCC-B82CA0400009","method":"post","data":"{\"mode\":\"Auto\",\"thermostatSetpointStatus\":\"PermanentHold\",\"autoChangeoverActive\":true,\"coolSetpoint\":23.5,\"heatSetpoint\":21.1}","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","Authorization":"Bearer jwjJDM9QmAAAAAAAAAAAAAAAAAAA","User-Agent":"axios/0.21.1","Content-Length":126},"params":{"locationId":3005609,"apikey":"AujyuQoLmOas6ZHHHHHHHHHHHHHH"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"responseType":"json","xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1}}
donavanbecker commented 3 years ago

can you try v10.1.0?

matthiasotto commented 3 years ago

Works! Thank you @donavanbecker

donavanbecker commented 3 years ago

awesome!