mezz64 / pyEight

Python library to interface with the Eight Sleep API
MIT License
59 stars 15 forks source link

[Feature Request] Add support for enabling and disabling "Away Mode" #33

Closed d-walsh closed 1 year ago

d-walsh commented 2 years ago

It would be great to be able to enable and disable "Away Mode" through pyEight.

maddox commented 1 year ago

🙏

mezz64 commented 1 year ago

I'm looking into this. Eight has increased the minimum android version on the app so my old dev setup to proxy and sniff the traffic doesn't work anymore. Once I work past that this is easy to add as long as it goes through the rest API.

mezz64 commented 1 year ago

Finally get setup with an alternative dev setup so I could look at the traffic. Unfortunately, the api call for away mode is passed through a different end-point that uses OAuth authentication. They appear to use a hardcoded client-id and secret to allow generation of the bearer token and that information is not something I would want to publish without their authorization. Especially since it's possible the app is generating those values locally based on device/user identifiers, making the values I see unique to me.

I'm afraid there isn't really a suitable path to add this functionality at this time.