This repository has been archived by the owner on Sep 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Home
clach04 edited this page Dec 3, 2017
·
30 revisions
Welcome to the python-tuya wiki!
Dumping ground for things related to devices and software:
- https://github.com/codetheweb/tuyapi/issues/5 information on some of the protocol that is not yet implemented as code
- https://wikidevi.com/wiki/Xenon_SM-PW701U device that this project can control (works on 110V and 240V)
-
https://bitbucket.org/xoseperez/espurna/overview replacement firmware for ESP8266 based smart devices/switches
- https://bitbucket.org/xoseperez/espurna/pull-requests/36/add-support-for-xenon-sm-pw702u-wifi-smart/diff support for Xenon_SM-PW701U
For single switch devices like SM-PW701U, the status json content looks like:
{"devId":"DEVICE_ID","dps":{"1":false,"2":0}}
NOTE all keys are strings.
dps.1 - is the switch status for ON(True)/OFF(False. dps.2 appears to be a timer specified in seconds. This reports the timeout that was set, 0 means stay on forever. This number does NOT go down, so if a time off of 10 secs has been set, querying status 5 secs later still shows 10.
dps.1 and dps.2 can be set. Setting dps.2 will change the state from the current state that many seconds later (i.e. if OFF, it will be turn on and vice-versa).