From 00913cbeb8f2f73919b76d9d4faf1fd9aae17d32 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 28 Oct 2024 21:43:42 -0700 Subject: [PATCH] Adding mitm directions to readme and updating hacs version --- README.md | 16 ++++++++++++++-- custom_components/eight_sleep/manifest.json | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ed368d..dbf4002 100644 --- a/README.md +++ b/README.md @@ -122,11 +122,23 @@ Further information about the alarms are available under attributes: - Add icons.json file ## FAQS ## -- Can I use this integration without an Eight Sleep subscription? +- **Can I use this integration without an Eight Sleep subscription?** - I believe you can use this integration without a subscription. This integration uses the same calls as the app. And I believe the app allows the calls the integration is using, even when not having a subscription. I don't have any way to test it out though, because I have a grandfathered account. -- Can I use this integration to get a reliable, current bed presence? +- **Can I use this integration to get a reliable, current bed presence?** - No. Presence is calculated retroactively by Eight Sleep based on sensor data. It's neither reliable, nor real-time. +- **How do I capture the Eight Sleep app traffic?** + - To get the client_id and client_secret you can setup a packet capture and a mitm CA to get the unencrypted traffic from your app. You can also decompile the APK to get the values. + - The process I used was: + - Open pcapdroid and install PCAPDroid mitm + - download and install rootAVD https://github.com/newbit1/video-files/blob/master/rootAVD_Windows.gif + - 2 ways to root an AVD (android studio); Magisk (rootAVD) and SuperSU + - Should auto install magisk + - Run the avd root install steps then open a cmd in ..\rootavd\rootAVD + - Install the mitm cert (mitmproxy-ca-cert.cert) + - https://emanuele-f.github.io/PCAPdroid/tls_decryption the MagiskTrustUserCerts module, and then install the hashed certificate (replace mitmproxy-ca-cert.cer with the PCAPdroid certificate name) as a system certificate. + - Run the app and capture date in pcapdroid. + - Make sure you capture the data during an app login session. The data should be in the POST request from the app to auth-api.8slp.net ### Credits ### Thanks to @mezz64 and @raman325 for developing the previous Eight Sleep integration. diff --git a/custom_components/eight_sleep/manifest.json b/custom_components/eight_sleep/manifest.json index f108a09..304ea68 100644 --- a/custom_components/eight_sleep/manifest.json +++ b/custom_components/eight_sleep/manifest.json @@ -9,6 +9,6 @@ "issue_tracker": "https://github.com/lukas-clarke/eight_sleep/issues", "loggers": ["pyEight"], "requirements": ["httpx", "aiohttp"], - "version": "1.0.18" + "version": "1.0.19" } \ No newline at end of file