[RELEASE] Eight Sleep (Community)

For me 3.0.1 gives the following error, when i roll back the app to 3.0.0 the error goes away. Like @dand, I’m fairly certain 3.0.1 was causing 500 errors in my log too. After support pushed out patch 2.2.6.150 to fix the 500 error is when i saw this app was not a happy camper and rolled back to 3.0.0 to fix.

[error](http://xxx.xxx.xxx.xx/installedapp/configure/418)org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.String, org.codehaus.groovy.runtime.GStringImpl) values: [debug, getEightSleepAccessToken: eightSleepAccessToken=3279164b92e2482795868039d3febc42-14f98cc15814187e6e45bf129b039a32] Possible solutions: wait(), any(), trim(), grep(), split(), next() (credentialsPage)

Thanks for reporting, was able to narrow down the bug. Fix is out in v3.0.2

1 Like

Been working quite well -- thanks again.

I noticed this in logs and figured I'd drop it here in case you have any ideas or a fix?

(So that it's searchable:
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.Error: handleAsyncResponse: Error status=408, errorMessage=Read timed out, errorData=null (method handleBedResponse))

Is it expected I'd be getting so many read timeouts?

Thanks for calling that out. I also seem to have several throughout the day, so it seems like it's not just you. I don't remember seeing so many timeout errors before, so maybe something's changed or I haven't noticed it before. I'll play around with increasing the hubitat timeout setting and see if that helps.

1 Like

Pushed v4.0.1 which now has 30s timeout set on http calls. That seems to have fixed all my timeout issues.

Is anyone having a similar issue as mine where the "presence" state seems not to work? No matter if I am in the bed or off, the presence never changes and is always "present".

If I create a child presence for bed presence, that one seems to always be stuck in "not present".

So I have the parent device showing always present and the child presence always set as not present.

image

I see the same thing, but i dont use presence. Sleepstage seams to be fairly accurate and i use it in several automations instead.

Waiting on my Eight to ship, but really curious on what automations you have running/written for yours.

Also, I know slightly off topic, but curious if anyone has input/experience on their shipping times. My order said it would ship between 1 to 3 days ago and it hasn't yet.

I pretty much just use the status of sleepstage as one off the triggers in my wake / sleep automations.

Thanks, i’m trying it right now. Been laying in the bed for about five minutes and so far nothing has changed. I take it that setting will toggle once it is detected that you are asleep? That might be a little slow for me. I was hoping to have it detect when I lay in bed so that you can turn off the lights. If it doesn’t toggle until I go to sleep, then I would have to sleep with the lights on at the beginning. :rofl:

One of the bullet points in the first post is that the presence detection could be an hour delayed.

* Get whether there is a person in the bed (up to an hour delayed)

The presence on the eight sleep mattress is actuallly for the connectivity. It indicates that we got a response from the API for the mattress.

As others have said sleep stage should be used for being in-bed presence and is delayed.

Any way to get some of these refresh() calls out of the logs? I'm seeing them every 5 minutes for each side of the bed.

image

EDIT: just submitted a PR: https://github.com/amosyuen/hubitat/pull/5

Merged the change

1 Like

Eight Sleep introduced a new feature in the pod called Away mode. You can set yourself away and it will disable the sleep and wake timers. I don't know if this is controllable within their API's, but it would be amazing to have this feature within this app. If my controller goes into "Vacation" mode, then set the Eight Sleep Away mode to yes.

I've now moved over to HA, so I'm no longer maintaining this. If somebody want to take ownership that would be appreciated.

1 Like

Anyone interested in taking over the Eight Sleep app? I'm not a developer, but I'm happy to test updates against my Eight Sleep

I would also love to see this continue to be developed. It's not in my wheelhouse though. I tried to set it up, but can't seem to get it working.

Maybe this is the incorrect way, but I know these few community members have experience coding and working with API's. Maybe @thebearmay or @snell would be interested in helping and taking over the driver/app?

Not much for the app side of things unfortunately. I actually HAVE an Eight Sleep pad (got a couple of them way back when I think Walmart had a mis-pricing, they were each like $20). Do not really use it too much though even in the winter. I started writing my own driver for it way back but got too side-tracked with my OTHER drivers at the time.