-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Able to read status. But cannot turn on smart plug #506
Comments
Can you share the data you get back from |
DEBUG:decrypted 3.x payload='{"dps":{"1":false,"9":0,"18":0,"19":0,"20":2214,"21":1,"22":591,"23":24585,"24":13476,"25":3090,"26":0,"38":"memory","39":false,"40":"relay","41":false,"42":"","43":"","44":""}}' |
Wow, that's a big list for a smart plug! Did you run the setup wizard? If so, you should have a
This is the wrong arguments for d.set_value(1, True)
d.set_value(39, True)
d.set_value(41, True) |
I got same status, |
Dp 20 value is volt. So reading is correct |
Try this: import tinytuya
import time
tinytuya.set_debug(True)
d = tinytuya.OutletDevice(DEVICEID, DEVICEIP, DEVICEKEY)
d.set_version(3.3)
# Show status of device
data = d.status()
print('\nCurrent Status of Plug: %r' % data)
# Power Control Test
print('\nPower Control Test')
print(' Turn off')
d.set_value(1, False)
# Show status of device
data = d.status()
print('\nCurrent Status of Plug: %r' % data)
time.sleep(2)
print(' Turn on')
d.set_value(1, True)
# Show status of device
data = d.status()
print('\nCurrent Status of Plug: %r' % data) You can also try to pull latest dev version and try again.
|
Same here, |
Maybe this device doesn't allow local control. Have you tried pulling the plug to remove power for 10s or so and then try again? Every smart plug I have (all 60 of them) works with that simple script. What do you get with: python -m tinytuya scan Would be good to confirm the device version. That could cause a problem if you are selecting the wrong one. I would also still recommend looking at the devices.json file to see if it reveals anything clever about the plug DPS. |
After I manually turned on, |
I understand that. Unfortunately, without any more information (e.g. scan results or devices.json) I'm not able to help further. You might try tuyapi or local_tuya to see if you have more success. |
I am not in home . I am using a remote connector to connect my home lan. So udp is not accessible. I will the scan after reaching home (mostly this weekend) and update you. |
It would be helpful to see:
|
Here is what I got. Unknown v3.3 Device Product ID = keyjup78v54myhan [Valid Broadcast]: |
ice.active&et=1&t=109&uuid=2M81Krr1iyiI&v=4.4&sign=e6a86de76fe68eb518c1e39abbbbd783', version='HTTP/1.1', remote_ip='10.42.42.40') i got above from tuya cutter. key masked |
I was able to solve it by using i was able to solve it by using antela-spl-w-ty-pm-fr-ry-plug-with-energy-monitoring-cb2s-v1.1.8 profile in tuya cloud cutter |
I have 16 a smart plug. I have used tuya cutter and gor local keys. I can read status.
d.set_socketPersistent(True)
d.turn_on()
d.set_value(True,1,False)
data=d.status()
print(data)
print (data)
But the dp 1 value is always false.
The text was updated successfully, but these errors were encountered: