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

:slight_smile: Yup, that was the problem. Thanks for the quick reply.

BUG REPORT:

I am seeing constant (every 5 minutes) INFINITE LOOP / DIVIDE BY ERRORS in the IDE at line 610 for the Mattress Device.

Apparently days.size() is returning 0, and the implied loop is 0…-1 - I temporarily added a if (days.size() > 0) around everything starting at line 607, but you’ll probably want to figure out why you’re getting an empty Map/List container…

I have added the defensive code check to Release 8c. I’ll keep an eye on this but can’t recreate days.size() returning 0. This would return 0 if you have been on holiday for the past 7 days and haven’t been in the bed so good to add the code in.

Ah, ok, that explains it. I have 2 mattress covers, one at home and one at my other property - it is in fact that one that is generating the divide by zero errors, since I have been there in a few weeks…

Thanks!

Announcing the end of the BETA. Many thanks all for your feedback and being pioneers with this device. No major changes from the last BETA release just a relabelling exercise as it seems frequent code changes are not required anymore.

As always, please do report any further bugs, suggestions and feedback.

3 Likes

Thanks for all your work on this. It works great so far for me. Works well inputting two Eightsleep mattress covers. I was able to configure both of them and have them both show up in the app and distinguish between them even though Eightsleep requires them to be configured with separate emails and cannot view both of them in the same app so your smartapp enables me to be able to do that. Great work!

You’re my hero! I’ve been waiting for this integration. Will try it tonight.

Please update to Eight Sleep (Connect) v1.0b that fixes a crippling bug around token renew.

I got the feeling that the contact sensor should update realtime, mine doesn’t seem to be. Been lying in my bed about ten minutes and the device type still shows ā€œOut of Bedā€. Any idea?

Thanks again for this Amazing integration!

It doesn’t update in realtime. There are some calculations that occur before the app determines you’re actually in bed. I find within 10 - 15 minutes it updates to ā€˜in bed’.

I believe that this would require effort on Eight app side.

My dog causes my sleep numbers to be wrong especially when I’m traveling, it shows my best night sleep.

I was thinking that if i was able to tie the Eight presence routine to only show when my Presence device iPhone was also present.

Thoughts?

Hello,

is it possible to expose the temp sensor and presence as devices ?

thanks

There is no temperature provided from 8sleep in the api. It’s a value of 1-100 as a heat level indicator. The temeprature you see in the app is post processed information. I suppose an option would be to set this value as a temperature capability so other apps can use it but note it’s neither C or F. Is that what you were asking for?

As for presence, the ā€œin bedā€ indicator is a contact sensor that is available for use in other smart apps to build rules.

Hope that helps.

Thanks for the info Alex.

I assumed there is a room temperature sensor built into the hub since it seems to accurately show the room temperatures in the eight app (in Farenheit). So I was wondering if that can be used as a room temp sensor device in ST with your app.

Use case example: If room temperature detected by eight hub is less than 71degree, then increase heating level.

Thanks for the tip on the contact sensor.

It does look like there is a room temperature sensor somewhere on the device. As of yet this reading is not exposed in the real time API that I’m using. I’m sure it will be as they evolve the mobile app. Once it is, I’ll add it in. There is no official documentation for the API and I’m relying on what functionality the current Eight Sleep mobile app is using.

2 Likes

I received a notification that my Eight Sleep Mattress has only 13% battery remaining.

I think my sleep score was 13% so it must be mapping sleep score to battery.

Is that correct?

Dude! Get some sleep!

Yes. This is correct.
It was added a couple weeks ago.

Here is the quote from the dev:

I made a core piston to turn on the mattress heating if my outdoor sensor and thermostat are below certain temperatures. This time of year in a Texas can see nights that are 70 degrees or 40 degrees, so it’s nice to automate if we need the heat when going to sleep.

2 Likes