mezz64 / pyEight

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

Did the new app update break things #35

Open bhaktatejas922 opened 1 year ago

bhaktatejas922 commented 1 year ago

Hey, there was an update to the app last week and I'm seeing a 404 when trying to set a temperature. I had not used the pyeight API before, so I'm not sure if it was working and doesn't work now because of the update

Error puting Eight data. 404, message='Not Found', url=URL(
mezz64 commented 1 year ago

I'm not seeing any issues on my end. The known url is working as expected.

bhaktatejas922 commented 1 year ago

do you have an example of setting the temperature? Here's what I'm trying

timezone = "America/Los_Angeles"
eight = EightSleep(user, password, timezone, None)
eightuser_left = EightUser(eight, user, "left")
eightuser_right = EightUser(eight, user, "right")

# await eight.start()

# # Update mattress data, 1min interval recommended
# await eight.update_device_data()

# # Update user data, 5min interval recommended
# await eight.update_user_data()

async def main():
    await eight.start()
    await eight.update_device_data()
    await eight.update_user_data()
    print(vars(eight), "\n\n")
    # call room_temperature to get the current room temperature
    print(eight.room_temperature)

    # user set_heating_level to set the heating level
    await eightuser_left.set_heating_level(-45)
    await eightuser_right.set_heating_level(-45)
    await eight.stop()

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

What am I doing wrong?