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

raw https calls to wyze?? #186

Open
k0jdd opened this issue Sep 30, 2024 · 1 comment
Open

raw https calls to wyze?? #186

k0jdd opened this issue Sep 30, 2024 · 1 comment

Comments

@k0jdd
Copy link

k0jdd commented Sep 30, 2024

Looked at this SDK. Very impressive and comprehensive. There must be many many hours invested.

I have a very small need I am trying to fulfill. I want to access a WYZE thermostat and read the current status (mode, fan, set point, current temp, humidity, etc...) If i ever actually need to control it i will use the WYZE app.

This SDK is overkill for my needs. I could still use the SDK but I have some obstacles.

  1. SDK says it needs Python 3.8. My Debian 10 server is running Python 3.7.3-1 which it claims is the 'newest version'.
    sudo apt upgrade python3
    python3 is already the newest version (3.7.3-1).
    I am not sure I can compile 3.8 or later from source without messing up something else...Or whether it is actually supported on Debian 10

  2. I have no experience with Python. Sure, I could learn it but that is a steep hill considering my modest requirements.

  3. I would rather be dependent on my own code when WYZE changes something - and they will, as you know.

I am not asking anyone to write code for me, What I am looking for is guidance/direction on how to construct HTTPS requests to the WYZE api so I can:

  1. Login and get the proper credentials
  2. Query the list of devices to locate the thermostat
  3. Query the thermostat status and get back a json response

I have looked all over the internet. There are lots of WYZE projects, all have reverse-engineered the WYZE api, but none of them document the underlying HTTPS calls.

So if someone can please point me to the correct place in the source code where I might find this information, or ferret it out from the code, I would be grateful. I'll even donate some $$ to support the project if that is something you are set up to do (patreon, etc...)

Best regards,
John

@k0jdd
Copy link
Author

k0jdd commented Oct 1, 2024

UPDATE: I found what I was looking for buried in the code, but it turned out to be a much, much bigger deal than I had expected or hoped for.

So I hunkered down and figured out my python versioning issues, installed the SDK, took a crash course in Python OOP, and completed what I had initially set out to do. I can read the Thermostat state very nicely. Took about 45 lines of code.

QUESTON:

I looked closely at the models and I did not see where the device reports if HOLD is enabled via the app. Perhaps it's there and I just missed it.

Best regards,
John

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

1 participant