jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
868 stars 157 forks source link

Can we receive IR signal. I want to build 2 way control for my AC #392

Open duongvanba opened 11 months ago

duongvanba commented 11 months ago

I see that we can control our IR device well. But if we can find solution to receive ir signal i think we can sync remote state with hass So can we do it, and how to do it Thank so much

jasonacox commented 11 months ago

I'm not following, but assume are you requesting an enhancement for a particular IR device?

uzlonewolf commented 11 months ago

I'm not sure but it sounds to me like he wants to put the IR blaster next to the A/C unit so when you use the remote control to change the A/C the blaster will also pick up and report the signal.

The blasters really are not designed to receive continuously like that, but I don't see why you couldn't fake it by creating a loop that puts it back into 'learn' mode every time it receives something. Running the learned signal through IRRemoteControlDevice.pulses_to_nec(...) or IRRemoteControlDevice.pulses_to_hex(...) should get you a usable code you can match against.

duongvanba commented 11 months ago

So does it have local api for receiving hex signal ?