Python package for communicating with wyze cameras over the local network
Project description
wyzecam
Features
- Send local commands (via
WyzeIOTC
class) - Support for all wyze camera types (including wyzecam v3!)
- Uses the tutk protocol for communicating over the local network.
Usage
import wyzecam
import cv2
import os
path_to_libiotc = "./libIOTCAPIs_ALL.dylib" # see instructions
cred = wyzecam.login(os.environ["WYZE_EMAIL"], os.environ["WYZE_PASSWORD"])
account = wyzecam.get_user_info(cred)
cams = wyzecam.get_camera_list(cred)
cam = cams[0]
with wyzecam.WyzeIOTC(path_to_libiotc) as wyze_iotc:
with wyze_iotc.connect_and_auth(account, cam) as sess:
session_info = sess.session_check()
print(f"{sess.state}, session_info = {session_info}")
for frame, frame_info, video_stats in sess.recv_video_frame_ndarray_with_stats():
cv2.imshow('Video Feed', frame)
cv2.waitKey(1)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
Installation
pip install -U wyzecam
You will then need a copy of the shared library libIOTCAPIs_ALL
. You will need
to download this SDK, unzip it, then convert the
appropriate copy of the library to a shared library, and copy the resultant .so
or .dylib
file to somewhere
convenient.
On Mac:
unzip TUTK_IOTC_Platform_14W42P1.zip
cd Lib/MAC/
g++ -fpic -shared -Wl,-all_load libIOTCAPIs_ALL.a -o libIOTCAPIs_ALL.dylib
cp libIOTCAPIs_ALL.dylib zg
On Linux:
unzip TUTK_IOTC_Platform_14W42P1.zip
cd Lib/Linux/x64/
g++ -fpic -shared -Wl,-whole-archive libAVAPIs.a libIOTCAPIs.a -o libIOTCAPIs_ALL.so
cp libIOTCAPIs_ALL.so /usr/local/lib/
Note: you will need to pick the appropriate architecture.
🛡 License
This project is licensed under the terms of the MIT
license.
See LICENSE for more details.
📃 Citation
@misc{wyzecam,
author = {kroo},
title = {Python package for communicating with wyze cameras over the local network},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/kroo/wyzecam}}
}
Credits
Special thanks to the work by folks at nblavoie/wyzecam-api, without which this project would have been much harder.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wyzecam-1.0.1.tar.gz
(26.9 kB
view hashes)
Built Distribution
wyzecam-1.0.1-py3-none-any.whl
(27.6 kB
view hashes)