[OBSOLETE] Eight Sleep (Connect) V1.0 [Eight Sleep Mattress and Cover]

The API does not expose the temperature readings you see in the app in real time. They only appear when you send the request for a sleep report. From what I can tell, all temperature readings and settings use the 0-100 scale which in the eight sleep app appears as 1-10.

I suppose one way to find out is to compare the 1-100 current heat levels in the ST activity history to the sleep report over night and see if there is a correlation that you can apply a calculation to. I’ll look into it.

No API doc was used for this. All worked out by packet sniffing the Eight Sleep app.

OK, wow this is cool. However, I hope that the official APIs will not differ too much from the ones you’re using now…

So, that’s why you don’t use oAuth2 for the authentication flow… This will definitively change later as there could be some security issues with the current APIs. …

Regards.

Couple of questions

  • I can’t seem to get any data to show up like you have in your screenshot (graph)…I just get the blue circle spinning (see screenshot)
  • Looking at my screenshot…what does the green circle and 10 stand for?

Thanks

Works great.

Now if Eight can figure out how to ignore my dog moving and messing up my sleep number.

On the other side, when I’m traveling it shows my best sleep number.

They need to be able to differentiate a 22 lb dog from a 170 lb person.

Hi all,

Please update to the latest SmartApp Eight Sleep (Connect) v1.0 BETA Release 3 and Device Handler Eight Sleep Mattress v1.0 BETA Release 4.

Specifically, could you pay close attention to the bed presence contact sensor functionality. I have refined the behaviour of this in the last 2 releases and would be interested to see if it has improved accuracy and reliability.

Happy testing.

Alex, love the app and the work you have done so far. Any thoughts on using more than one eightsleep mattress pad. As an example I have two of them but in order to use them in the eightsleep app they have to be set up under different email addresses and I have to log in and log out to switch among the beds because the eightsleep app does not recognize more than one mattress pad within the app.

Great work! The sleep detection was spot on last night and my good night routine fired as expected!

Thanks for the feedback. Good to know we’re getting there with the sleep presence accuracy. Update to the latest Release 4 and let me know if this further improves the sleeping detection. I found some inaccuracy with the “Out of Bed” event last night on Release 3.

I’m looking forward to trying this out later today.

I’ll be using CoRE to handle my desired “Goodnight!” integration. To wit:

  • If both my wife and I are at home, don’t run Goodnight until both of us are in bed.
  • If only one of us is at home (we travel), run Goodnight if that one person goes to bed.
  • If none of us are at home, don’t run Goodnight just because there are 1 to 4 cats sleeping somewhere on the bed

That last one is the hardest :slight_smile:

Although tempting, I don’t plan on using Eight Sleep to run “Good Morning!” - I already have that working reliably based off a motion sensor in the en-suite for the master bedroom.

I think there might be a way if you don’t mind being the first one to test this.

I have updated the Eight Sleep (Connect) app (Release 3b) to allow multiple instances of itself, you should be able to add multiple Eight Sleep (Connect) smart apps from the ST Marketplace for each mattress you have.

In turn, each app will create 2 devices for each side of the bed. Let me know if this works

Excellent that you added support for multiple instances at a single location - thanks!

Could we ask now that you allow us to change the name of the app, so that we can tell the difference between multiple (Connect) apps by the name?

I don’t actually have 2 Sleeps at one location, but I do have two - one each at two of the 3 locations I manage with a single user ID. When logging in the IDE, it’s helpful to have different names for each instance so I know which is which (with over 300 active devices across the 3 hubs, I need all the help I can get)

Thanks!

Good idea. I’ll add an “Assign a name” option in the connect app. Will upload a bit later.

OK, so just reviewing your code - very nice!

Particularly clever is that you seem to be checking for the warmth of the cover as the mechanism to see if someone is actually in bed. This might actually address my 3rd use case bullet above, as I doubt the cats raise the temperature of the bed very much - even if they were to all sleep next to each other (they won’t).

So, do you also compensate for the temperature rise/fall caused by the heater? We like to turn on the heat 10-15 minutes before we get in bed, and then only run it for say 2.5 hours - will the contact sensor still detect when we actually go to bed? (Like i said, I don’t care so much if it detects when we get up).

Thanks for writing this…as I’ve told the Eight folks, SmartThings integration is the missing piece of the target use case:

  1. Track sleep while my Apple watch is on the bedside charger
  2. Tell my house when we are in bed so that it will shut down and lock up

Number 2 wasn’t possible until this…nice work!!!

We do exactly that. Warm the bed an hour before we get in. It seems to detect correctly so far as it also uses the unreliable api presence attribute too which does seem to accurately react to pressure on the mattress. So if no one is near the bed, there is not chance for the presence flag to trigger.

Based on my analysis over the last 2 nights, body temperature affecting the heat level and the rate of heat level change in combination with the presence attribute coming from the API is my method of getting an accurate presence detection for this device.

Please let me know how the presence flag accuracy is for you as different ambient temperatures and climate may reduce the accuracy.

I’ll let you know tomorrow…tonight is the first test of my new CoRE routines!

YAY!

Same here I didn’t go as deep into it as you since today was my first time installing and using CoRE but we shall see.

I did something like.

If both Me & Wife are home, its between 9:00pm-4:00 am and both sensors are closed and have been closed for 15 minutes turn on good night mode.

For those lucky people with more than one Eight Sleep mattress, Eight Sleep (Connect) BETA Release 4 enables you to change the name of the app if you wish to do so.

2 Likes

Eight Sleep Mattress device handler 1.0 BETA Release 5 has an improved chart hopefully showing your sleep scores for the week.

Enjoy!

2 Likes

Just an update… Looks like my Eight Sleep might be here tomorrow.
Looking forward to testing and providing some feedback!

I was able to get my piston to fire last night based on the presence of the eight after tinkering with the rule.

I did some more adjustments and will see if the new rule fires tonight.