rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.87k stars 552 forks source link

Smart IR control for climate devices #159

Open SerAlbi opened 3 years ago

SerAlbi commented 3 years ago

This is more a question rather than an issue but:

Would it be possible to control climate devices created by Smart IR hubs? For example in my Tuya app i have a Smart IR hub which i setup to control my air conditioner. After the setup, an 'Air conditioner' device gets added to the tuya homepage and i can control it freely.

The newly created device shows app with its Virtual ID and Local Key if i list all my devices with the tuya-cli.

So i wonder if there is any way to control it in Home Assitant, using the Climate interface without having to flash the smart IR hub with espHome or other custom firmwares...

Thank you :)

postlund commented 3 years ago

Sounds a lot like the zigbee gateway to me. We have a request for that as well (#69). I've read over at tuyapi that these devices work a bit unreliable with the local api so far, so I'm not sure when we will get around to have something that works.

SerAlbi commented 3 years ago

Probably there are some similarities in the communications but Smart IR devices doesn't use zigbee. Basically they are wifi hubs often based on the ESP module like other tuya products. I know that they have an internal database of IR commands for different devices/manifacturer.

The use case is often as follows:

  1. You connect the Smart IR device to the home network and then to the Tuya app
  2. You select the Smart IR device inside Tuya, a configuration page opens where you can:
  1. After this configuration, a new device is added to your Tuya app. If you click on this device, the configuration page opens and you can control it (for example set the air conditioner to Hot and 30°C)

It's basically the same thing as an old IR blaster some smartphone had.

I was wondering if this newly created 'climate' interface could be locally managed. In my case this is the Smart IR i got: OWSOO WiFi IR Remote Control

postlund commented 3 years ago

As we communicate with a "gateway" that in turn expose devices, we have the same structure. So it should from a protocol perspective be very similar. Would expect that implementation are near 1:1 compatible.

SerAlbi commented 3 years ago

Hi @postlund , that's actually great news! Do you have any estimate on the time required for the development? If that's successful i think it would be the first actually working implementation of Tuya's Smart IR for Home Assistant (That doesn't require a custom FW)

postlund commented 3 years ago

@SerAlbi No estimate at all. I might look into it later, but it's not my main priority right now. I would strongly encourage someone owning such a hub to try implementing support for it!

SerAlbi commented 3 years ago

@postlund i would look in to it myself if i could but I really don't know where to start with HA development tho... i'll probably start to research something as soon as i have some free time :) In the meantime if someone has any useful knowledge about the topic, that would be really appreciated!

muttlyirl commented 3 years ago

I can't help (as I wouldn't know where to begin/understand any of this) but I would love this as well. More so for TV control but I would expect that if it works for AC then it would be just a matter of getting the IR codes for the TV.

bigretromike commented 3 years ago

I would love to have that inside here. Im using IR smart device to control tv/amp/cdplayer and configuring it and picking right device in tuya was helpful but I would like to have it here so it will work from inside network, I can understand that It could be hard to somehow import those settings from tuya app here, but if there is a way to copy-past those commands that would be a blast.

e-bacho commented 3 years ago

Any updates or ETA, or even workarounds for this (without flashing a custom FW)?

dominguesg commented 3 years ago

Hi Guys! I have a IR Hardware that works with Tuya App. But have no idea where or how should I begin to develop the compatibility of it (I'm a beginner with HA, but have a IT background). Can anyone help initiate?

stanwebber commented 3 years ago

i'm waiting for this functionality as well. frankly, i would be satisfied with an implementation that just allows you to manually type in and send individual ir codes from the emitter. i could run with it and automate from there.

albertoxamin commented 3 years ago

Any updates or ETA, or even workarounds for this (without flashing a custom FW)?

For now the only workaround is to create a tap-and-run automation in the tuyasmart app and then it will appear as a scene in homeassistant, but this has no local control.

exadeci commented 3 years ago

I would love to have this too!

On Tuya if I go to Device Debugging it gives a list of instruction sets:

F | ENUM | {   "min": 0,   "max": 3,   "scale": 0,   "step": 1,   "type": "Integer" }
-- | -- | --
M | ENUM | {   "min": 0,   "max": 4,   "scale": 0,   "step": 1,   "type": "Integer" }
PowerOff | STRING | "PowerOff"
PowerOn | STRING | "PowerOn"
T | ENUM | {   "min": 16,   "max": 30,   "scale": 0,   "step": 1,   "type": "Integer" }

F: Fan speed and auto T: Temperature Selection M: Aircon Mode (Heat/Cooling/Fan)

But I'm guessing there isn't a way to control those currently?

rdaguerre commented 2 years ago

same problem. same wish

oswaldofreitas commented 1 year ago

this feature would be so cool, I've got the same instruction set and tried to input them when adding entities but no luck

prajjwalburman commented 6 months ago

+1