leeyuentuen / localtuya

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

Tuya zigbee motion sensor unavailable #62

Closed robertrebor closed 1 year ago

robertrebor commented 1 year ago

Dear all

i tried to use this integration for my ZIgbee motion sensor. I tried to use YAML and UI configuration, but I have only unavailable status for DPs.

Is anybody here who has some zigbee device and these devices run correctly? I can't find solution how to solve my problem.

image

MY CODE

localtuya:

TUYA IOT

{ "result": { "category": "pir", "functions": [], "status": [ { "code": "pir", "dp_id": 1, "type": "Enum", "values": "{\"range\":[\"pir\",\"none\"]}" }, { "code": "battery_percentage", "dp_id": 4, "type": "Integer", "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}" } ] }, "success": true, "t": 1683102440269, "tid": "52377119e98c11ed8b506a01366d7453" }

alexualbu commented 1 year ago

@robertrebor, please enable debug logs and provide the full logs. I have similar PIRs judging by the DP list and they work fine.

robertrebor commented 1 year ago

@alexualbu can you write me short manual how I can enable debug logs? I am not familiar with debugging :(

alexualbu commented 1 year ago

@robertrebor, you should add something like this in configuration.yaml

logger: default: warning logs: custom_components.localtuya: debug

robertrebor commented 1 year ago

@alexualbu I tried to add logger and I got file in attachment

home-assistant_localtuya_2023-05-15T19-43-46.311Z.log

alexualbu commented 1 year ago

@robertrebor , my suspicion right now is that you are using the montion sensor device_id instead of the cid / node_id. Can you confirm? You can grab the node_id from the tuya developer console, api explorer, get Device Specification image

robertrebor commented 1 year ago

@alexualbu you are absolutely right. I am stupid, I used device_id. Now is everything absolutely OK. Thank you very much.

Issue can be closed.

alexualbu commented 1 year ago

@robertreborm excellent :) i think you can close it yourself