Difference between revisions of "Eufy API"
Michael.mast (talk | contribs) (→API) |
Michael.mast (talk | contribs) |
||
Line 7: | Line 7: | ||
<ref>https://community.anker.com/t/open-api/70397/6</ref>I am having a hard time finding official documentation, but I did find a forum post with some information. There is also a great project on github that was able to point me in the right direction<ref>https://github.com/BnMcG/PyRobovac/blob/master/robovac/robovac.py</ref> | <ref>https://community.anker.com/t/open-api/70397/6</ref>I am having a hard time finding official documentation, but I did find a forum post with some information. There is also a great project on github that was able to point me in the right direction<ref>https://github.com/BnMcG/PyRobovac/blob/master/robovac/robovac.py</ref> | ||
===Authenticating=== | ===Authenticating=== | ||
+ | This was rather confusing. Pulling from various sources I realized that all existing projects pull from the same source. Someone had decrypted the API calls<ref>https://github.com/google/python-lakeside/blob/master/lakeside/__init__.py</ref> and hardcoded the following for headers. My guess is that Eufy uses this for most calls and it is required. | ||
+ | <pre> | ||
+ | client_id = "eufyhome-app" | ||
+ | client_secret = "GQCpr9dSp3uQpsOMgJ4xQ" | ||
+ | </pre> |
Revision as of 11:29, 29 April 2020
Purpose
To programatically work with Eufy products.
In the following example I want to turn on a smart plug that is attached to a HEPA air filter. I want this to be turned on when the PM in the air gets to a high enough level. The filter works well in filtering the air, but it can be loud and I don't want it running 24/7.
API
[1]I am having a hard time finding official documentation, but I did find a forum post with some information. There is also a great project on github that was able to point me in the right direction[2]
Authenticating
This was rather confusing. Pulling from various sources I realized that all existing projects pull from the same source. Someone had decrypted the API calls[3] and hardcoded the following for headers. My guess is that Eufy uses this for most calls and it is required.
client_id = "eufyhome-app" client_secret = "GQCpr9dSp3uQpsOMgJ4xQ"