Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.
clach04 edited this page Jan 5, 2018 · 30 revisions

Welcome to the python-tuya wiki!

Dumping ground for things related to devices and software:

Random details

When removing a device from Jinvoo Smart App and then re-adding it, the localkey changes.

The devices register with DHCP with the name ESP_last_three_bytes_of_mac.

Looking at the FCC internal photos confirms its an ESP8266MOD device (see https://apps.fcc.gov/oetcf/eas/reports/ViewExhibitReport.cfm?mode=Exhibits&RequestTimeout=500&calledFromFrame=Y&application_id=6pPi3ddGo42B1Wg9IxSXTw%3D%3D&fcc_id=2AJ5F-SM-PW701U and then click on "Internal Photos").

Device spreadsheet https://docs.google.com/spreadsheets/d/1zMh_r9fq6Dw-pQQcjpleUle0Yj45VVUC3lbm0Js32Rw/edit?usp=sharing - list of devices and start of devid to see if this can be used to identify device types.

Protocol information

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).

SM-S0301-US

For multi switch devices like SM-S0301-US (4 separate AC switch controls and 1 for USB), the status json content looks like:

{"devId":"DEVICE_ID","dps":{"1":true,"2":false,"3":false,"4":false,"5":true,"6":0}}

dps.5 is the USB control.

NOTE dps.6 looks like a timer BUT it does not respond, setting to a value (when everything is OFF) results in nothing happening.

Clone this wiki locally