Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for multiple pods in one account? #39

Open
gforums opened this issue Aug 9, 2024 · 8 comments
Open

support for multiple pods in one account? #39

gforums opened this issue Aug 9, 2024 · 8 comments

Comments

@gforums
Copy link

gforums commented Aug 9, 2024

Hello,

I have two pods now under my account but I don't know how to tell the py script, which Pod to use. I can switch between user 1 and 2 or left/right side, but this seems to always control the current selected pod.

Any option to use temperature control in guest mode for a second linked pod?

thank you,
Christian

@lukas-clarke
Copy link
Owner

This would be a little difficult for me to look into since I don't have 2 pods, and I would need that setup to even check what the API looks like. What happens if you put the pods on 2 separate accounts?

@gforums
Copy link
Author

gforums commented Aug 9, 2024

That would work, but then controlling from one smartphone would be difficult. Just thought it could already be implemented. Would also will to borrow you my account for testing purposes if that would help?

@lukas-clarke
Copy link
Owner

@gforums, are you still seeing this issue?

@gforums
Copy link
Author

gforums commented Sep 17, 2024

@gforums, are you still seeing this issue?

You mean controlling a second Eight Sleep cover? Did you change something with the code to try? Otherwise, yes I still have two covers and controlling both within one account would still be desired

@lukas-clarke
Copy link
Owner

Yes, controlling a second Eight Sleep cover in the same account should work (at least I think so). I haven't actually tested an account with 2 active covers, but there should be a device_id per pod, and it should populate in HA.
If it's not too much trouble, could you try deleting the integration, and re-setting it up. Make sure both pods are connected and not in away mode when they are set up.

@gforums
Copy link
Author

gforums commented Sep 17, 2024

Hi Lukas,
As I don't have HA (using Openhab), I only use parts of the py script directly on command line. As soon as I find some time I can see whether I can obtain and set device IDs somehow, but for now I only used the script very basically to set temp like this. There's no device ID, I could pass to the script?

I can check for a new version and make some tests...?

`from pyeight.eight import EightSleep
import time
import asyncio
import sys
temperature = sys.argv[1]
async def test_device_temperature():
eight = EightSleep("email", "password", "0894c7f33bb94800a03f1f4df13a4f3
8", "f0954a3ed5763ba3d06834c73731a32f15f168f47d4f164751275def86db0c76")

await eight.start()
await eight.set_heating_level(temperature, "left")
time.sleep(5) # pause to check dev`

@binarylogic
Copy link

I also have 2 pods on my account. I can confirm that this is not working. Only a single pod is imported into HA.

Make sure both pods are connected and not in away mode when they are set up.

I deleted the integration and tried to set it up again. First, it is not possible to disable away mode on both pods at the same time from the perspective of a single user account. Eight Sleep forces you to choose a bed and puts the other one in away mode when you do.

but there should be a device_id per pod

Why do you think this? It looks like the code completely ignores the fact that there are multiple devices: [0] is hardcoded when a device list is returned.

@lukas-clarke
Copy link
Owner

@binarylogic , ah I see. I was imagining that there is a "initial" pod with login(s) for the regular users. And a "guest" pod that is controlled by a guest account(s). For example there is 1 pod with assigned sides and your normal login, as well as a guest pod with the side(s) assigned to the guest account(s).
If you add an EightSleep device in HA with your normal login, it should create the pod and the users that are on that pod. Then if you setup another EightSleep device in HA with the guest login it should add the new device and user.
Can you verify the above?

As you mentioned, this still wouldn't support a single user switching between pods. For this assign_users (or some derivation of it) would need to be called regularly. However, since I don't have 2 pods to test with, it would be difficult for me to verify my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants