Closed ilyavolodin closed 2 years ago
Can you please follow the instructions here (https://github.com/mezz64/pyEight/issues/12#issuecomment-612727727) to manually interact with the api and let me know what kind of responses you are receiving? Please post sanitized responses from all steps (including 1) so I can compare to my test cases.
From your original HA issue it looks like an invalid user ID is being returned. It's possible Eight has changed something in the formatting and posting the responses will help me troubleshoot.
Here're the responses requested: STEP 2:
{
"user": {
"userId": "REMOVED",
"email": "REMOVED",
"firstName": "Ilya",
"lastName": "Volodin",
"gender": "male",
"dob": "REMOVED",
"zip": 11111,
"devices": [
"REMOVED"
],
"emailVerified": true,
"sharingMetricsTo": [
"REMOVED"
],
"sharingMetricsFrom": [],
"timezone": "America/New_York",
"notifications": {
"weeklyReportEmail": true,
"sessionProcessed": true,
"temperatureRecommendation": true,
"healthInsight": true,
"sleepInsight": true,
"marketingUpdates": true,
"bedtimeReminder": true,
"alarmWakeupPush": true
},
"createdAt": "2017-12-24T00:22:10.599Z",
"experimentalFeatures": false,
"autopilotEnabled": false,
"lastReset": "1970-01-01T00:00:00.000Z",
"nextReset": "2100-01-01T00:00:00.000Z",
"features": [
"warming"
],
"currentDevice": {
"id": "REMOVED",
"side": "left"
},
"tempPreferenceUpdatedAt": "2018-04-03T12:23:32.499Z",
"hotelGuest": false
}
}
STEP 3:
{
"result": {
"deviceId": "REMOVED",
"ownerId": "REMOVED",
"leftUserId": "REMOVED (Same as ownerId and userId from step 2)",
"leftHeatingLevel": 0,
"leftTargetHeatingLevel": 0,
"leftNowHeating": false,
"leftHeatingDuration": 0,
"leftSchedule": {
"daysUTC": {
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true
},
"enabled": true,
"startUTCHour": 3,
"startUTCMinute": 30,
"durationSeconds": 2700
},
"rightUserId": "REMOVED",
"rightHeatingLevel": 0,
"rightTargetHeatingLevel": 0,
"rightNowHeating": false,
"rightHeatingDuration": 0,
"rightSchedule": {
"daysUTC": {
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true
},
"enabled": true,
"startUTCHour": 3,
"startUTCMinute": 15,
"durationSeconds": 3600
},
"lastLowWater": "2021-12-30T04:35:31.575Z",
"needsPriming": true,
"ledBrightnessLevel": 20,
"sensorInfo": {
"label": "20003-0002-B02-00002CEB",
"partNumber": "20003",
"sku": "0002",
"hwRevision": "B02",
"serialNumber": "00002CEB",
"lastConnected": "2021-12-30T04:35:31.575Z",
"skuName": "king",
"connected": true
},
"hubInfo": "20001-0001-A08-00003FA4",
"timezone": "America/New_York",
"location": [
REMOVED
],
"mattressInfo": {
"firstUsedDate": null,
"eightMattress": false,
"brand": "I don't know"
},
"firmwareCommit": "d4ccf93",
"firmwareVersion": "2.4.2.0",
"firmwareUpdated": true,
"firmwareUpdating": false,
"lastFirmwareUpdateStart": "1970-01-01T00:00:00.000+00:00",
"lastHeard": "2021-12-30T04:35:46.590Z",
"online": true,
"encasementType": null,
"leftKelvin": {
"targetLevels": [
0,
0,
0
],
"alarms": [],
"scheduleProfiles": [],
"level": 0,
"currentTargetLevel": 0,
"active": false,
"currentActivity": "off"
},
"rightKelvin": {
"targetLevels": [
0,
0,
0
],
"alarms": [],
"scheduleProfiles": [],
"level": 0,
"currentTargetLevel": 0,
"active": false,
"currentActivity": "off"
},
"features": [
"warming"
],
"modelString": "Sleep Tracker",
"hubSerial": "00003FA4",
"wifiInfo": {
"signalStrength": -46,
"ssid": "HomeNetwork",
"ipAddr": "192.168.1.14",
"macAddr": "e0:4f:43:3e:c8:b8",
"asOf": "2021-12-30T04:35:46.590Z"
}
}
}
Step 4 results are over 8000 lines long, and it's just information about last week worth of sleep data. Do you need that?
Thanks. Do either of the user id's match the one you see in the original error log?
Unable to fetch user profile data for a7547578########0e4d42d69c59f6
Yes, that profile ID matches my wife's profile ID. But that error shows up in the logs occasionally only.
I was able to reproduce this in my test setup. Give me a few days and i'll get a fix in place and submit a PR to get HASS updated.
After checking a few scenarios over a couple days I believe I've got a working solution as well as some other changes to hopefully minimize 504 errors. PR is pending to get HASS updated: https://github.com/home-assistant/core/pull/63405
I can verify that the issue has been fixed. Integration is still pretty unstable, but I think that's mostly due to eight APIs having pretty terrible uptime and eight hub having terrible wifi chip that disconnects constantly.
I'm opening a local issue as instructed in the original Home Assistant issue here: https://github.com/home-assistant/core/issues/62813 I've removed partner option from the configuration, and I'm still seeing the same errors whenever I try to turn on the heat in my eight mattress topper. I've verified that my login information is correct, and logged out and back in on my phone. Everything is working fine in the phone app, but not working through this integration. No changes has been made on my account in a very very long time. And this used to work just a few month ago. Here are the error messages I get: