forked from shauntarves/wyze-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
225 lines (215 loc) · 12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Getting Started with Wyze SDK — Wyze SDK 1.2.3 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Web Client" href="wyze_sdk.api.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="wyze_sdk.api.html" title="Web Client"
accesskey="N">next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">Wyze SDK 1.2.3 documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">Getting Started with Wyze SDK</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="toctree-wrapper compound">
</div>
<section id="getting-started-with-wyze-sdk">
<h1>Getting Started with Wyze SDK<a class="headerlink" href="#getting-started-with-wyze-sdk" title="Permalink to this headline">¶</a></h1>
<p>A modern Python client for controlling Wyze devices.</p>
<p>Whether you’re building a custom app, or integrating into a third-party service like Home Assistant, Wyze Developer Kit for Python allows you to leverage the flexibility of Python to get your project up and running as quickly as possible.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 58%" />
<col style="width: 22%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>Feature</p></td>
<td><p>What its for</p></td>
<td><p>Package</p></td>
</tr>
<tr class="row-even"><td><p>Web Client</p></td>
<td><p>Send data to or query data from Wyze using a variety of device-specific sub-clients.</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Bulb Client</p></td>
<td><p>Control Wyze Bulb and Wyze Bulb Color</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.bulbs</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Entry Sensor Client</p></td>
<td><p>Interact with Wyze Sense Entry Sensors</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.entry_sensors</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Camera Client</p></td>
<td><p>Control Wyze Cameras</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.cameras</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Event Client</p></td>
<td><p>Manage Wyze alarm events</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.events</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Lock Client</p></td>
<td><p>Control Wyze Lock</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.locks</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Motion Sensor Client</p></td>
<td><p>Interact with Wyze Sense Motion Sensors</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.motion_sensors</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Plug Client</p></td>
<td><p>Control Wyze Plug and Wyze Plug Outdoor</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.plugs</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Scale Client</p></td>
<td><p>Control Wyze Scale</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.scales</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Thermostat Client</p></td>
<td><p>Control Wyze Thermostat</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.thermostats</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Vacuum Client</p></td>
<td><p>Control Wyze Robot Vacuum</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.client.vacuums</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>Request Signature Verification</p></td>
<td><p>Sign outgoing requests for the Wyze API servers.</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.signature</span></code></p></td>
</tr>
<tr class="row-even"><td><p>Models</p></td>
<td><p>Pythonic class objects to model Wyze devices.</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">wyze_sdk.models</span></code></p></td>
</tr>
</tbody>
</table>
<p><strong>Disclaimer: This repository is for non-destructive use only. WyzeLabs is a wonderful company providing excellent devices at a reasonable price. I ask that you do no harm and be civilized.</strong></p>
<p><strong>As this repository is entirely reverse-engineered, it may break at any time. If it does, I will fix it to the best of my ability.</strong></p>
<section id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>This package supports Python 3.8 and higher. I recommend using <a class="reference external" href="https://pypi.python.org/pypi">PyPI</a> to install Wyze SDK</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip install wyze_sdk
</pre></div>
</div>
<p>Of course, you can always pull the source code directly into your project:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/shauntarves/wyze-sdk.git
</pre></div>
</div>
<p>And then, save a few lines of code as <code class="docutils literal notranslate"><span class="pre">./test.py</span></code>.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># test.py</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="c1"># Load the local source directly</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s2">"./wyze-sdk"</span><span class="p">)</span>
<span class="c1"># Enable debug logging</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">logging</span><span class="o">.</span><span class="n">basicConfig</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">DEBUG</span><span class="p">)</span>
<span class="c1"># Verify it works</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">wyze_sdk</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">email</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s1">'WYZE_EMAIL'</span><span class="p">],</span> <span class="n">password</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s1">'WYZE_PASSWORD'</span><span class="p">])</span>
<span class="n">api_response</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_test</span><span class="p">()</span>
</pre></div>
</div>
<p>You can run the code this way.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python test.py
</pre></div>
</div>
</section>
<section id="getting-help">
<h2>Getting Help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h2>
<p>If you get stuck, I’m here to help. The following are the best ways to get assistance working through your issue:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/shauntarves/wyze-sdk/issues">GitHub Issue Tracker</a> for questions, feature requests, bug reports and general discussion related to this package.</p></li>
</ul>
<section id="indices-and-tables">
<h3>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Getting Started with Wyze SDK</a></li>
<li class="toctree-l1"><a class="reference internal" href="wyze_sdk.api.html">Web Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="wyze_sdk.models.html">Data Models</a></li>
<li class="toctree-l1"><a class="reference internal" href="wyze_sdk.errors.html">Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="wyze_sdk.signature.html">Request Signature Verification</a></li>
<li class="toctree-l1"><a class="reference internal" href="wyze_sdk.logging.html">Logging</a></li>
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="wyze_sdk.api.html"
title="next chapter">Web Client</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="wyze_sdk.api.html" title="Web Client"
>next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">Wyze SDK 1.2.3 documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">Getting Started with Wyze SDK</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2021-2022, Shaun Tarves.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.2.
</div>
</body>
</html>