leeyuentuen / localtuya

local handling for Tuya devices
GNU General Public License v3.0
71 stars 17 forks source link

Switching a Bluetooth device to on (dps 1) requires to first set the timer (dps 11) #71

Open caco3 opened 1 year ago

caco3 commented 1 year ago

using 3.7.0-beta10 and a we are only able to switch the valve off, but not on again.

I traced it down to the issue that the timer first needs to be set before it can be switched on.

See https://github.com/TuyaAPI/cli/issues/162#issuecomment-1612002727 and https://github.com/leeyuentuen/localtuya/issues/70#issuecomment-1612003666

Gyosa3 commented 12 months ago

Hi, in my setup I have a switch on DP 105 and a countdown on DP 106. When I use the Tuya app, countdown is set to '10' (minutes I believe) and switch is set to 'on'. I tried to mimic the same in localTuya and it does not work for me, but it may be for the other reason that people can read entities but not change them so far in protocol 3.4. Weirdly enough, this is a 2-way water timer, and the other water line, with DP 104 for switch 2 and DP 103 for countdown 2 is not reacting the same with the Tuya app, the switch goes to 'on' but the countdown remains at 0. But this could be anything, a bad reading from localtuya, a bad API view, a bad app code...

caco3 commented 12 months ago

I also only could get it working with protocol 3.3!