Open darth-aragoth opened 1 year ago
maybe check the value in tuya iot. so we can see which commands are allowed to send to that tuya device
Could you tell me please, where exactly can I find it? I'm searching Tuya IOT but I locate it.
https://iot.tuya.com/
Cloud -> api explorer
then see screenshot below:
general device capabilities -> general device management -> get device specification
search for your device_id
OR see screenshot below to get the dps: general device capabilities -> smart home device system-> device control -> Get device specification and search for the device id
I checked there, but there are no functions:
{
"result": {
"category": "clkg",
"functions": [],
"status": []
},
"success": true,
"t": 1681826952504,
"tid": "9842cdd3ddf211edb86062d11cecfbc6"
}
I'm sure that possible values for my controllers are 1, 2 and 3. I can't discover, which value means lowering and raising, probably 3 means 'stop'. Maybe you can find it in rospogrigio's integration? There were also other command sets (open_close_stop) for other controller models:
- platform: cover
friendly_name: Device Cover
id: 2
commands_set: # Optional, default: "on_off_stop"
["on_off_stop","open_close_stop","fz_zz_stop","1_2_3"]
positioning_mode: ["none","position","timed"] # Optional, default: "none"
currpos_dp: 3 # Optional, required only for "position" mode
setpos_dp: 4 # Optional, required only for "position" mode
position_inverted: [True,False] # Optional, default: False
span_time: 25 # Full movement time: Optional, required only for "timed" mode
Hello, are there any news in adding support for these covers? I noticed that the covers can now be controlled (they open and close), but every time I open or close the cover I get the "set_position_dp" error. So maybe it would be simpler to start by directly controlling these covers, without setting the desired position?
I've just done a quick lock, i think your parameters aren't correctly these are the value for the cover
CONF_COMMANDS_SET = "commands_set" CONF_POSITIONING_MODE = "positioning_mode" CONF_CURRENT_POSITION_DP = "current_position_dp" CONF_SET_POSITION_DP = "set_position_dp" CONF_POSITION_INVERTED = "position_inverted" CONF_SPAN_TIME = "span_time"
so your config should be like this
- platform: cover
friendly_name: Device Cover
id: 2
commands_set: # Optional, default: "on_off_stop"
["on_off_stop","open_close_stop","fz_zz_stop","1_2_3"]
positioning_mode: ["none","position","timed"] # Optional, default: "none"
current_position_dp: 3 # Optional, required only for "position" mode
set_position_dp: 4 # Optional, required only for "position" mode
position_inverted: [True,False] # Optional, default: False
span_time: 25 # Full movement time: Optional, required only for "timed" mode
your current_position_dp and set_position_dp was not set correctly
No, my config is correct. My cover controllers have 'timed' positioning and doesn't have 'current position' and 'set position' DP's. As you can see, these DPs are required only for 'position' mode - there are controllers, that can directly set cover position. My can't, I need to provide span_time in configuration, so HA knows, how long it should take to set desired cover position - cover position is shomehow calculated.
Everything works fine in rospogrigio's integration. At the beginning, there were also problems with this controllers, but then 'timed' positioning was added and controllers started to work.
Please see this issue: https://github.com/rospogrigio/localtuya/issues/105#issuecomment-713408491 https://github.com/rospogrigio/localtuya/pull/103
Hi @leeyuentuen, did you manage to check the possibility of controlling covers with timed positioning?
Please add support for time-based positioning in cover controllers.
My cover controllers have only one DP with value 1, 2 or 3 (move up, move down, stop, I don't know in what order). In config I have time-based positioning mode and "1_2_3" command set - that works fine with rospogrigio's localtuya version. At the beginning, I had to measure time needed to full-close each cover.
In config.yaml:
In SmartLife config:
My cover controllers are similar to the one in the picture:
They only control the motor that raises and lowers the cover, but they have no feedback about the position of the cover, so it has to be time-controlled.