-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bluetooth water timer: #64
Comments
@mikeinblue, my suggestion would be to set-up the devices via the UI. Nevertheless, the selected log is too limited to infer anything. Can you try and provide the entire log from the moment the water timer is set-up? Right now, assuming 6c7..zsx is the devid for the GW we can only deduce that the GW set-up is working and the integration is communicating fine with it. |
hi,@alexualbu, I tried switch on the switch,and find the log below as you suggested: Device 6c7984edb1087dd187ozsx is the bluetooth GW. And I had another try,the log is below: |
@mikeinblue, is this the plug or the water timer ? node_id / cid 180821a9c6616407 ? |
Sorry. How can I check the node id/cid? But there is only one valve under the GW. |
I tried to link the info with "Device Specification Attribute" |
In the config you have added the cid or in the ui. However it's masked. So It wasn't clear if that was the sub-device.
So if the sub-device is
|
Thx,bro,I put "180821a9c6616407" in the "device_id",it worked. |
Sorry to reopen .But I found I can't controll the swith through homeassistant. |
Here is my operation,switch on ,and set "count down"("dp=11") = 300. (FYI:"device_id"=6c590cd0d6bb635288s1nk,"cid":"180821a9c6616407") |
@mikeinblue , when you say "app" do you mean "Smart Life" and when you say "touch" do you mean "Home assistant"? |
Yes,exactly.
Yes,this valve should switch on with a time countdown,or it will do nothing.I don't know how to do the command in localTuya. |
|
@mikeinblue, follow the guide in the documentation to try and set the switch first just with dp 1 and then try setting dp 11 first to see if it just work with the switch, then if it works by setting the timer first and after the switch (it will be something like tuya-cli set --id <gw_Dev_id> --local_ley <gw_local_key> --cic <sub_Device_cid> --ip <gw_ip> --dps 1 --set true) |
**> tuya-cli set --id <gw_Dev_id> --local_ley <gw_local_key> --cic <sub_Device_cid> --ip <gw_ip> --dps 1 --set true) I tried it as you said,but my valve didi noting,cli displayed succeeded.** _C:\Users\mike>tuya-cli set --id 6c7984edb1087dd187ozsx --key 4bb6097007f416e1 --cid 180821a9c6616407 --dps 1 --set true) C:\Users\mike>tuya-cli set --id 6c7984edb1087dd187ozsx --key 4bb6097007f416e1 --cid 180821a9c6616407 --dps 1 --set true --dps 11 --set 300) C:\Users\mike>_ |
@mikeinblue , can you try now with 2 sets (first command with dp 11 and then dp 1) ? |
logs: C:\Users\mike>tuya-cli set --id 6c7984edb1087dd187ozsx --key 4bb6097007f416e1 --cid 180821a9c6616407 --dps 1 --set true) |
@mikeinblue , you could try that sequence again - it's weird the dp 1 set failed, but it seem tuyacli is also not able to sent 2 dps at once so we can't confirm 100%. In any event, I assume both dp11 and 1 need to be set for the device to actually start in which case I don't believe we now have such an entity in Localtuya that would be able to accomplish it. |
Thank you for your time on this issue.Maybe the only way to automate it is through cloud . |
@mikeinblue , given that the automation does 2 actions - set switch on, set timer value - i would expect it works if you do the same. so you could try some more combinations in tuya cli with the 2 set commands, first 1 then 11, first 11 then 1, vary the timing in between and it might work. |
I can switched off the device use cli or api webside,but can't switch off with localtuya.I don't know what's wrong with it. |
so you can switch off the device with tuyaapi-cli? |
Yes,the status changed very soon after swited on,but I can't controll with HA. the logs: 2023-05-16 17:52:53.234 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Got status update |
thanks, @mikeinblue , it seems there might be some issue with controlling sub - devices - #35 (comment) |
@alexualbu ,you are welcome. |
Is there news on this issue? I have a https://www.amazon.de/dp/B09P3VRVVB/ref=pe_27091401_487027711_TE_SCE_dp_2 which I can't get working. |
Hi, same issue here, I have purchased this product with a wifi>bluetooth gateway: I've just installed integration 3.7.0 beta 10. The integration works with a smart bulb as a simple test device. The integration finds and creates a gateway device. The dongle seems to work with protocol 3.4 so I set it up accordingly. Same test with an older Zigbee gateway: The integration finds and creates a gateway device. The dongle seems to work with protocol 3.3 so I set it up accordingly. All devices work correctly in tuya app. EDIT: OK! thanks to the other issue mentioned just above I managed to make all subdevices work by using the node_id instead of the device_id in the configuration dialog called "deviceID". So now I am in the same situation that the dual water timer is well registered in HA, all DPs are updated correctly but they cannot trigger the device from HA. I have tried to manually switch on both water outputs, and one was just triggering the switch entity, while the other was also setting a countdown timer of 10 minutes. So not sure which function actually triggers the timer. The endpoints I have found for my device are:
|
Hi, |
"category": "sfkzq",
"model": "SOP10",
"name": "水阀控制器",
imglink: https://images.tuyacn.com/ecommerce/16119137706294d7a3b33.jpg?x-oss-process=image/format,webp
The problem
When I added this watering timer ,it shows Unavailable. I have set the pd correctly.
Maybe caused "Data point detection failed. Type in a number to add a data point, or 0 to finish or cancel."
When I added A wifi plug, it works pefectly.
Environment
Configuration
configuration.yaml
orconfig_flow
DP dump
{
"result": {
"category": "sfkzq",
"functions": [
{
"code": "switch",
"dp_id": 1,
"type": "Boolean",
"values": "{}"
},
{
"code": "time_use",
"dp_id": 9,
"type": "Integer",
"values": "{"unit":"s","min":0,"max":2592000,"scale":0,"step":1}"
},
{
"code": "weather_delay",
"dp_id": 10,
"type": "Enum",
"values": "{"range":["cancel","24h","48h","72h"]}"
},
{
"code": "countdown",
"dp_id": 11,
"type": "Integer",
"values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}"
},
{
"code": "smart_weather",
"dp_id": 13,
"type": "Enum",
"values": "{"range":["sunny","cloudy","rainy"]}"
}
],
"status": [
{
"code": "switch",
"dp_id": 1,
"type": "Boolean",
"values": "{}"
},
{
"code": "battery_percentage",
"dp_id": 7,
"type": "Integer",
"values": "{"unit":"%","min":0,"max":100,"scale":0,"step":1}"
},
{
"code": "time_use",
"dp_id": 9,
"type": "Integer",
"values": "{"unit":"s","min":0,"max":2592000,"scale":0,"step":1}"
},
{
"code": "weather_delay",
"dp_id": 10,
"type": "Enum",
"values": "{"range":["cancel","24h","48h","72h"]}"
},
{
"code": "countdown",
"dp_id": 11,
"type": "Integer",
"values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}"
},
{
"code": "work_state",
"dp_id": 12,
"type": "Enum",
"values": "{"range":["auto","manual","idle"]}"
},
{
"code": "smart_weather",
"dp_id": 13,
"type": "Enum",
"values": "{"range":["sunny","cloudy","rainy"]}"
},
{
"code": "use_time_one",
"dp_id": 15,
"type": "Integer",
"values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}"
}
]
},
"success": true,
"t": 1683860130158,
"tid": "748ba074f07011ed8819c6e890e871c6"
}
Provide Home Assistant taceback/logs
2023-05-12 08:08:57.522 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Sending command 9 (device type: v3.4)
2023-05-12 08:08:57.522 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Sending payload: b'{"gwId":"6c7984edb1087dd187ozsx","devId":"6c7984edb1087dd187ozsx"}'
2023-05-12 08:08:57.522 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] final payload for cmd 9: b'{"gwId":"6c7984edb1087dd187ozsx","devId":"6c7984edb1087dd187ozsx"}'
2023-05-12 08:08:57.522 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Dispatching sequence number -100
2023-05-12 08:08:57.522 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] payload b"\x00\x00U\xaa\x00\x00\xda\x06\x00\x00\x00\t\x00\x00\x00tS\xca\xfcv>\xc2\x92\x02\x86U\xe5\x8c[\x7f\xdc\xbd\x02\x99\xf6u\x85K\x8c}\xe4\x0f\xb7\xd4\xcc.Ib\x7f]\xe6\x14\xa68\xe7'\xe7\x08w\x1fb\xc0\x11\xc9bu\x7f\xf2\x1b\x9e\x8463\xfdx\xd1\xfb\xa7\xf3\xf9\x07'\xacw;\x010\xb4)\xb7\xb7#\x18\xa5\xed1\xcdb\xda\xd1\xa6\xb3\x8cm\x87G/N\x84\xf2\x99z\x97\x03\x0b\x8c\x08aj\xb0\xed\x02T\x19O}PG\x00\x00\xaaU" - MessagePayload(cmd=9, payload=b'{"gwId":"6c7984edb1087dd187ozsx","devId":"6c7984edb1087dd187ozsx"}')
2023-05-12 08:08:57.522 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Command 9 waiting for sequence number -100
2023-05-12 08:08:57.558 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Dispatching message CMD 9 TuyaMessage(seqno=55814, cmd=9, retcode=0, payload=b'', crc=b'\xb5\xa8\xf1\xb8\xaaM-I\xb5t\xf3\xcd\xe8(\xf6\x15\xe3\xbb\x01\xac\x03\xf8\x1d\x10\xb1h\xeb\x90Jy\x93\xb7', crc_good=True)
2023-05-12 08:08:57.558 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] Got heartbeat response
2023-05-12 08:08:57.558 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6c7...zsx] ACK received for command 9: ignoring it
Additional information
The text was updated successfully, but these errors were encountered: