xZetsubou / hass-localtuya

🔹 A Home Assistant integration to handle Tuya devices locally "fork from localtuya"
https://xzetsubou.github.io/hass-localtuya/
GNU General Public License v3.0
416 stars 52 forks source link

[Bug]: ZS06 IR blaster doesn't receive any learning response #350

Open teohghost opened 1 month ago

teohghost commented 1 month ago

LocalTuya Version

2024.9.0

Home Assistant Version

2024.9.2

Environment

What happened?

I have this ZigBee IR blaster ZS06, it has no issue learning my speaker code in Tuya App. now in local-tuya, I have added this IR blaster with dp=0, then it shows up a remote entity, with learn code=202. after finished, the remote can turn on or off manually.

when turn off the remote, using developer action to learn it, it won't work, when I turn on the remote entity, the developer action to do learn command can start, and pop up a notification to ask me to press the actual remote .

now the problem : no matter what remote I use (be it speaker or TV or Aircond), the learn command just doesn't response at all, and at the end time out. Also, there isn't any blinking light while learning, whereas if I use Tuya app to copy a button, it will have blue light blinking

how should I proceed?

now my workaround is to use one of the socket and trigger by timeout value to trigger scene in Tuya app. yes timeout value has very big range therefore you can custom hack lots of scene if HA doesn't work. it works but it is not how it should work. I hope fixing this can be beneficial to other users that uses same model.

Steps to reproduce.

  1. add device with send code 201, learn code 202 (using dpid 0 to show up the remote entity
  2. go to developer-action, learn command, select correct device. submit
  3. after seeing notification, point the physical remote the IR blaster, however the 'learning LED' on the IR blaster doesn't blinks
  4. no response, and will be timeout(my remote has new battery 😆)

Relevant log output

No response

Diagnostics information.

No response

xZetsubou commented 1 month ago

I can't do anything without debug logs or diagnostics

  1. enable debug for both device and integration
  2. after enable the debug, start the process learn/send
  3. after it times out, post the logs here.

Also if you use cloud api then post the Diagnostics

teohghost commented 1 month ago

hi @xZetsubou,

Thanks for response, here's what how I debug, please let me know if my steps is incorrect.

  1. enabled debug image
  2. try to learn
  3. wait till timeout
  4. Settings > System > Logs Logger: homeassistant.helpers.script.websocket_api_script Source: helpers/script.py:2026 First occurred: 1:09:36 PM (1 occurrences) Last logged: 1:09:36 PM

websocket_api script: Error executing script. Error for call_service at pos 1: Failed to learn: Power

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:820 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 1:09:36 PM (1 occurrences) Last logged: 1:09:36 PM

[281471361305760] Failed to learn: Power localtuya-c7b3fa8c1bffbf9d11d89c8465e37773-Zigbee IR Remote-f7048116a8d9939d56af26f234c7e707.json

home-assistant_localtuya_2024-09-17T05-45-18.348Z.log

xZetsubou commented 1 month ago

Re-do the process https://github.com/xZetsubou/hass-localtuya/issues/350#issuecomment-2353565059 "enable debug for both device and integration" but this time learn/send command from Tuya APP not Home Assistant then repost the logs.

teohghost commented 1 month ago

so now here's what I did

  1. enable Enable debug logging from integration, and devices
  2. go to tuya app, copy a button, and 'run' the button
  3. did not use the home assistant to learn : approximately at minute 20:57~58 my device name is "Zigbee IR Remote"

home-assistant_localtuya_2024-09-18T13-00-40.496Z.log

github-actions[bot] commented 1 day ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.