bloomkd46 / homebridge-XfinityHome

A Repository For Controlling Your Xfinity Home System and Devices
Apache License 2.0
11 stars 0 forks source link

Support Request: #7

Closed SatanOrLucifer closed 2 years ago

SatanOrLucifer commented 2 years ago

Describe Your Problem:

I am SO close to getting this working. I am just not sure what else to try. I have captured the refresh token, uninstalled the app ASAP and my logs are still just appearing as this. I really don't know what else to do

Expected behavior:

I was really hoping it'd work

Logs:

9/17/2022, 2:12:35 AMXfinityhome Bridge starting
9/17/2022, 2:12:45 AMXfinityhome BridgeLoaded plugin 'homebridge-xfinityhome'
9/17/2022, 2:12:45 AMXfinityhome BridgeLoading 2 platforms...
9/17/2022, 2:12:46 AMXfinityhome BridgeXfinityHomePlatformERRORNo Refresh Token Found
9/17/2022, 2:12:46 AMXfinityhome BridgeBridge is running on port 51846.
9/17/2022, 2:19:20 AMXfinityhome BridgeConfiguration change
9/17/2022, 2:19:20 AMxfinityhomebridge stopping
9/17/2022, 2:19:25 AMXfinityhome Bridge starting
9/17/2022, 2:19:36 AMXfinityhome BridgeLoaded plugin 'homebridge-xfinityhome'
9/17/2022, 2:19:36 AMXfinityhome BridgeLoading 2 platforms...
9/17/2022, 2:19:36 AMXfinityhome BridgeXfinityHomePlatformERRORNo Refresh Token Found
9/17/2022, 2:19:37 AMXfinityhome BridgeBridge is running on port 51846.

Config:

"accessories": [],
    "platforms": [
        {
            "platform": "XfinityHomePlatform"
        },
        {
            "platform": "Xfinity Home",
            "pin": "redacted",
            "refresh_token": "<redacted>",
            "motion_accessories": true,
            "contact_accessories": true,
            "panel_accessories": true,
            "camera_accessories": true,
            "password": "redacted",
            "email": "redacted",
            "name": "Xfinity Home",
            "system": "XFINITY_HOME"
        }
    ]
}

Operating System:

Raspberian

Node Version:

?

NPM Version:

?

Homebridge Version:

Hoobs V4.2.8

Plugin Version:

Xfinityhome 2.2.2

bloomkd46 commented 2 years ago

Did you set up the plug-in using the custom UI?

SatanOrLucifer commented 2 years ago

Did you set up the plug-in using the custom UI?

Yes, I have tried using both method. The custom UI and the advanced UI. Multiple times. Also thanks for redacting the refresh token. I didn’t know it was sensitive information 😂😅

bloomkd46 commented 2 years ago

Well, for some reason it is editing the wrong platform and using the wrong values. The config that needs to be updated is

{
    "platform": "XfinityHomePlatform"
}

Try manually filling it in using this schema:

        {
            "name": "Xfinity Home",
            "refreshToken": "<redacted>",
            "pin": "<redacted>",
            "temperatureSensors": true,
            "logLevel": 2,
            "platform": "XfinityHomePlatform"
        }
bloomkd46 commented 2 years ago

If that dose t work try uninstalling and reinstalling the plugin

SatanOrLucifer commented 2 years ago

Okay, I have fixed the error

``{ "accessories": [], "platforms": [ { "platform": "XfinityHomePlatform", "name": "Xfinity Home", "email": "", "password": "", "pin": ", "system": "XFINITY_HOME", "motion_accessories": true, "contact_accessories": true, "panel_accessories": true, "camera_accessories": true, "refresh_token": "", "temperatureSensors": true, "logLevel": 2 } ] }"

But my logs are still looking like this

9/17/2022, 1:14:17 PMXfinityhome Bridge starting 9/17/2022, 1:14:26 PMXfinityhome BridgeLoaded plugin 'homebridge-xfinityhome' 9/17/2022, 1:14:26 PMXfinityhome BridgeLoading 1 platforms... 9/17/2022, 1:14:26 PMXfinityhome BridgeXfinity HomeERRORNo Refresh Token Found 9/17/2022, 1:14:27 PMXfinityhome BridgeBridge is running on port 51846.

So maybe I'm messing up on the Refresh Token I guess? The way I'm going about trying to get the token is,

  1. Install Xfinity Home App on phone
  2. Launch Charles Proxy
  3. Log into Xfinity Home
  4. Immediately Uninstall Xfinity Home
  5. Grab refresh_token from Charles Proxy
  6. Paste into plugin

Any thoughts? Btw, thanks for the help so far. I appreciate it. I'm not the best with this stuff, but want to learn and have been frustrating myself lol

SatanOrLucifer commented 2 years ago

Woah! Might be working! After posting that last message I noticed I still have { "accessories": [], "platforms": [ { at the start. Removed those, so far no "No Refresh Token Found" error

bloomkd46 commented 2 years ago

Just try the steps below:

  1. Uninstall the plugin
  2. Delete the config file
  3. Restart the server
  4. Re-install the plugin
SatanOrLucifer commented 2 years ago

Just try the steps below:

  1. Uninstall the plugin
  2. Delete the config file
  3. Restart the server
  4. Re-install the plugin

I actually got the logs to stop giving me errors, now I'm struggling to actually get any device into Homekit :'(

SatanOrLucifer commented 2 years ago

Log isn't giving errors, trying to scan QR or enter the pin to homekit, it sees the bridge. But when I add it, it just kind of goes to the void. Doesn't give any sensors or visuals on cameras.

SatanOrLucifer commented 2 years ago
  1. Delete the config file

I'm not sure how to go about deleting the config file?

SatanOrLucifer commented 2 years ago

So I tried this

{
            "name": "Xfinity Home",
            "refreshToken": "<redacted>",
            "pin": "<redacted>",
            "temperatureSensors": true,
            "logLevel": 2,
            "platform": "XfinityHomePlatform"
        }

And I managed to load all my sensors and the pad. I have no clue how that's working but I'm amazed! I didn't give it my xfinity login info though? And I also got this massive list of logs. Is there any way to get the cameras in the app? I've got the xCam2's :(


9/18/2022, 12:33:57 AMXfinityhome BridgeXfinity HomeERRORFailed To Login With Error: {
  name: 'Error',
  message: 'Request failed with status code 500',
  request: {
    method: 'POST',
    protocol: 'https:',
    host: 'oauth.xfinity.com',
    path: '/oauth/token',
    headers: [
      'POST /oauth/token HTTP/1.1',
      'Accept: application/json, text/plain, */*',
      'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
      'Host: oauth.xfinity.com',
      'Connection: keep-alive',
      'Accept-Language: en-us',
      'Content-Length: 79',
      'Authorization: Basic WGZpbml0eS1Ib21lLWlPUy1BcHA6NzdiMzY2ZjlhMTM1YzdhYjM5MTA0NDIzNGEyNmIxZDZiMWUwOGY2Ng==',
      'User-Agent: axios/0.26.1'
    ]
  },
  response: {
    statusCode: 500,
    statusMessage: 'Server Error',
    headers: {
      date: 'Sun, 18 Sep 2022 07:33:57 GMT',
      server: 'Apache',
      'strict-transport-security': 'max-age=63072000; includeSubDomains;',
      'cache-control': 'no-store',
      pragma: 'no-cache',
      'content-type': 'application/json;charset=utf-8',
      via: '1.1 oauth.xfinity.com',
      connection: 'close',
      'transfer-encoding': 'chunked',
      'set-cookie': [Array]
    },
    data: {
      error: 'server_error',
      error_description: 'All mappers threw exceptions on load with arguments [class com.comcast.cima.oauth2.persistence.dynamodb.AuthorizationGrantDTO, null, Xfinity-Home-iOS-App]'
    }
  }
}
9/18/2022, 12:33:57 AMXfinityhome BridgeWARNINGunhandled rejection: Setup Failed
9/18/2022, 12:35:14 AMXfinityhome BridgeConfiguration change
9/18/2022, 12:35:14 AMxfinityhomebridge stopping
9/18/2022, 12:35:19 AMXfinityhome Bridge starting
9/18/2022, 12:35:28 AMXfinityhome BridgeLoaded plugin 'homebridge-xfinityhome'
9/18/2022, 12:35:28 AMXfinityhome BridgeLoading 1 platforms...
9/18/2022, 12:35:28 AMXfinityhome BridgeXfinity HomeUsing Refresh Token From Config: <redacted>
9/18/2022, 12:35:28 AMXfinityhome BridgeBridge is running on port 51847.
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeLoaded 0 Accessories From Cache
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Panel
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Motion
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeMotion: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Front Door 2
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeFront Door 2: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Front Door 1
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeFront Door 1: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Back Door
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeBack Door: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Kitchen Window1
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeKitchen Window1: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Kitchen Window2
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeKitchen Window2: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Bathroom Window
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeBathroom Window: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Zone #7
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeZone #7: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Zone #8
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeZone #8: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Bedroom Window
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeBedroom Window: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdding new accessory: Office Window
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeOffice Window: Adding Temperature Support 
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeRestored 0 Accessories
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeAdded 12 Accessories
9/18/2022, 12:35:34 AMXfinityhome BridgeXfinity HomeRemoved 0 Accessories
9/18/2022, 12:35:34 AMXfinityhome BridgeERROR(node:30264) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 shutdown listeners added to [HomebridgeAPI]. Use emitter.setMaxListeners() to increase limit
9/18/2022, 12:35:34 AMXfinityhome BridgeERROR(Use `node --trace-warnings ...` to show where the warning was created)
9/18/2022, 12:35:35 AMXfinityhome BridgeERRORError Accessing Cameras:{"name":"Error","message":"Request failed with status code 500","request":{"method":"POST","protocol":"https:","host":"xhomeapi-lb-prod.codebig2.net","path":"/client/icontrol/devices/cameras/startMultiAccess","headers":["POST /client/icontrol/devices/cameras/startMultiAccess HTTP/1.1","Accept: application/json","Content-Type: application/json","Host: xhomeapi-lb-prod.codebig2.net","Connection: keep-alive","X-Client-Features: auth4all,carousel,carousel-devicedeeplink,no-cookie,deeplinkV1","Xh-Auth: eyJ4NXUiOiJodHRwczovL3hob21lYXBpLWxiLXByb2QuYXBwcy5jbG91ZC5jb21jYXN0Lm5ldC9zZXJ2aWNlL2tleXMvZmFmOTI0MjgvY2VydCIsInZlciI6IjMiLCJraWQiOiJmYWY5MjQyOCIsImFsZyI6IlJTMjU2In0.eyJyb2xlIjoiUCIsInBhcnRuZXIiOiJjb21jYXN0IiwiaXNzIjoieGhvbWVhcGktcHJvZC1sYi5nMy5hcHAuY2xvdWQuY29tY2FzdC5uZXQiLCJhdXRoR3VpZCI6IjQ1NTQwNzkxODUzMTExMTAwMDcwNzIwMjAuSU1TIiwicG9kTmFtZSI6ImFwaTAwMDAwMDAyIiwic2l0ZUlkIjoiMTAxNDY1NTU2IiwicG9kSG9zdCI6ImFwaTAwMDAwMDAyLnhmaW5pdHlob21lLmNvbSIsImFjY291bnROdW1iZXIiOiI4NDk4MzcwMDEwNjU1Nzc2IiwiY2ltYVRva2VuIjoiMWNlMTUwZjE1Njk0YTMwNzhmZGE5YTNlY2RiYTRmYzQwYzE1YzllYmZiM2I2ZTkyMjJhZTJlZGI4OTc2OGY2NiIsImlhdCI6MTY2MzQ4NjUyOSwiY29va2llcyI6eyJKU0VTU0lPTklEIjoiNmpWUGhoRTJHNUEtMlVSZHVFeFJlQ2RyUUktOURTODM0OVFIcFhXU1dHdHpsai1yVEwtdCE5NTI4MjI0NzMiLCJQb2RCWGZpbml0eUhvbWUtNDc4NzMtcF94aHBvZGJfcG9ydGFsYXBwaW50ZXJmYWNlIjoiQk9KT0hDR0FGQUFBIn19.Ix_GTXrYmmrMn_TT5Z-CrMdTOpKisTDB8-Odu10sv_nvsjGYlkjP7jb6fxI6OfsZuvWnbsj3imDV2S_laf5dhARgqSMqXjYssu0IE7DpHBmUbeiBZiOQc27jAy15dnUbh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Ia559nQceYc01YJImxAwhVvD6wXqewaeZYQyK4q7wqX2BlNd6ZKy9rmmEAK9_Pv_Dua230tizSNgtwPQ7nvNnoKRoxeA54TGXjqppFef","Accept-Language: en-us","Accept-Encoding: gzip, deflate, br","Content-Length: 237","User-Agent: axios/0.26.1"]},"response":{"statusCode":500,"statusMessage":"Internal Server Error","headers":{"date":"Sun, 18 Sep 2022 07:35:35 GMT","content-type":"application/json;charset=UTF-8","content-length":"540","connection":"keep-alive","keep-alive":"timeout=60","cache-control":"no-cache, no-store, max-age=0, must-revalidate","expires":"0","pragma":"no-cache","strict-transport-security":"max-age=31536000 ; includeSubDomains","x-content-type-options":"nosniff","x-frame-options":"DENY","x-vcap-request-id":"777b9722-78d7-42c4-6c67-9ad1b06eafb2","x-xss-protection":"1; mode=block","xh-auth":"eyJ4NXUiOiJodHRwczovL3hob21lYXBpLWxiLXByb2QuYXBwcy5jbG91ZC5jb21jYXN0Lm5ldC9zZXJ2aWNlL2tleXMvZmFmOTI0MjgvY2VydCIsInZlciI6IjMiLCJraWQiOiJmYWY5MjQyOCIsImFsZyI6IlJTMjU2In0.eyJyb2xlIjoiUCIsInBhcnRuZXIiOiJjb21jYXN0IiwiaXNzIjoieGhvbWVhcGktcHJvZC1sYi5nMy5hcHAuY2xvdWQuY29tY2FzdC5uZXQiLCJhdXRoR3VpZCI6IjQ1NTQwNzkxODUzMTExMTAwMDcwNzIwMjAuSU1TIiwicG9kTmFtZSI6ImFwaTAwMDAwMDAyIiwic2l0ZUlkIjoiMTAxNDY1NTU2IiwicG9kSG9zdCI6ImFwaTAwMDAwMDAyLnhmaW5pdHlob21lLmNvbSIsImFjY291bnROdW1iZXIiOiI4NDk4MzcwMDEwNjU1Nzc2IiwiY2ltYVRva2VuIjoiMWNlMTUwZjE1Njk0YTMwNzhmZGE5YTNlY2RiYTRmYzQwYzE1YzllYmZiM2I2ZTkyMjJhZTJlZGI4OTc2OGY2NiIsImlhdCI6MTY2MzQ4NjUyOSwiY29va2llcyI6eyJKU0VTU0lPTklEIjoiNmpWUGhoRTJHNUEtMlVSZHVFeFJlQ2RyUUktOURTODM0OVFIcFhXU1dHdHpsai1yVEwtdCE5NTI4MjI0NzMiLCJQb2RCWGZpbml0eUhvbWUtNDc4NzMtcF94aHBvZGJfcG9ydGFsYXBwaW50ZXJmYWNlIjoiQk9KT0hDR0FGQUFBIn19.Ix_GTXrYmmrMn_TT5Z-CrMdTOpKisTDB8-Odu10sv_nvsjGYlkjP7jb6fxI6OfsZuvWnbsj3imDV2S_laf5dhARgqSMqXjYssu0IE7DpHBmUbeiBZiOQc27jAy15dnUbhRjrwa0ZcEIEY2_cBLamFc23BeT7iAT0JFuUWAu4ImC8r5aR3xeJkqhW8R6u0NG8P4VgyAjbF1vvBaBHvvnbZU1H6307jRoW6XgCvK0eGvyc2mZiY4zkiX-yKl1O-2MDRxhb9nD5kGwGzWumLlvK6mMpKaQCXiCpx1i76iKN9AcKpuJprodzqnVa5TF6S9XfGqJdWZ7qsHdHKMFz-i-eVg","xh_fingerprint":"05740f06-2804-4ad8-85e9-d1acd3dddbea","via":"1.1 CodeBig"},"data":{"timestamp":"2022-09-18T07:35:35.605Z","path":"/client/icontrol/devices/cameras/startMultiAccess","method":"POST","fingerprint":"05740f06-2804-4ad8-85e9-d1acd3dddbea","errorCode":"UNKNOWN","exception":{"type":"IcontrolServiceException","message":"HTTP Error 404 calling https://api00000002.xfinityhome.com/rest/icontrol/sites/101465556/cameraAccessMultiple?alwaysSendCameraAccessEventFlag=true&videoTokenAppKey=comcastTokenKey : Resource identified by siteId not found"},"rootCause":{"type":"HttpException","message":"HTTP 404 Not Found"}}}}```
bloomkd46 commented 2 years ago

Unfortunately I have not yet added camera support. it is one of the features I am hoping to add at a later date