Skip to content
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

New device - Universal Remote Control #203

Closed
Der-Nax opened this issue Jul 19, 2022 · 13 comments
Closed

New device - Universal Remote Control #203

Der-Nax opened this issue Jul 19, 2022 · 13 comments

Comments

@Der-Nax
Copy link

Der-Nax commented Jul 19, 2022

I added new device:

`name: Universal Remote Control
products:

  • id: whs3cty93fzrqkpt
    primary_entity:
    entity: sensor
    dps:
    • id: 101
      name: sensor
      type: integer
      unit: C
      range:
      min: 0
      max: 80
      mapping:
      • scale: 10
        secondary_entities:
  • entity: sensor
    class: humidity
    name: Humidity
    dps:
    • id: 102
      type: integer
      name: sensor
      unit: "%"
      class: measurement
      readonly: true`
@Der-Nax
Copy link
Author

Der-Nax commented Jul 19, 2022

@Der-Nax
Copy link
Author

Der-Nax commented Jul 19, 2022

Please add it in a new release.

There is additional functionality - subdevice. Do you have plans to support subdevices?

Information about subdevice:
{
"result": {
"active_time": xxx,
"category": "infrared_ac",
"category_name": "Infrared air conditioner",
"create_time": xxx,
"gateway_id": "xxx",
"icon": "smart/icon/001453365846342fhj9e/11c62df7bd89c10f43d3e5ee8d13b4f4.png",
"id": "xxx",
"ip": "",
"lat": "xxx",
"local_key": "xxx",
"lon": "xxx",
"model": "",
"name": "XXX",
"node_id": "xxx",
"online": true,
"owner_id": "xxx",
"product_id": "qzktzhehinzsz2je",
"product_name": "Air Conditioning",
"sub": true,
"time_zone": "xx",
"update_time": xxx,
"uuid": "xxx"
},
"success": true,
"t": XXX,
"tid": "XXX"
}

{
"result": {
"category": "infrared_ac",
"functions": [
{
"code": "F",
"type": "ENUM",
"values": "{"min":0,"max":3,"scale":0,"step":1,"type":"Integer"}"
},
{
"code": "M",
"type": "ENUM",
"values": "{"min":0,"max":4,"scale":0,"step":1,"type":"Integer"}"
},
{
"code": "PowerOff",
"type": "STRING",
"values": "PowerOff"
},
{
"code": "PowerOn",
"type": "STRING",
"values": "PowerOn"
},
{
"code": "T",
"type": "ENUM",
"values": "{"min":16,"max":30,"scale":0,"step":1,"type":"Integer"}"
}
],
"status": [
{
"code": "wind",
"type": "ENUM",
"values": "{"min":0,"max":3,"scale":0,"step":1,"type":"Integer"}"
},
{
"code": "mode",
"type": "ENUM",
"values": "{"min":0,"max":4,"scale":0,"step":1,"type":"Integer"}"
},
{
"code": "power",
"type": "BOOLEAN",
"values": "{}"
},
{
"code": "temp",
"type": "ENUM",
"values": "{"min":16,"max":30,"scale":0,"step":1,"type":"Integer"}"
}
]
},
"success": true,
"t": XXX,
"tid": "XXX"
}

@make-all
Copy link
Owner

Currently subdevices are not handled by the underlying tinytuya library, but when they are I would like to add support (as requested previously in #70, and required for #170 as well as this device). However I think IR blasters are different in that they do not return any data, only allow commands to be sent, so further changes are also needed to enable that, since current support assumes a simple mapping to data points that can always be read, and some can be also set (previously rejected in #120 as it deviates too much from the current feature set, but maybe one day...).

@make-all make-all added new device Unsupported device enhancement New feature or request labels Jul 20, 2022
@make-all make-all added partially working Needs more work to complete unreleased Will be in next release and removed new device Unsupported device labels Jul 24, 2022
@Der-Nax
Copy link
Author

Der-Nax commented Jul 26, 2022

Could you add basik device in next realese? It work as temperature and humidity sensor.

@make-all
Copy link
Owner

make-all commented Jul 26, 2022

This is exactly what the commit above is for - just the two sensors. So actually you can try it already by going to the tuya-local integration in HACS, selecting "Redownload" from the menu, and select "main" as the version to install.

@Der-Nax
Copy link
Author

Der-Nax commented Jul 28, 2022

I updated integration. But device was not working. I will need to add my files to device folder.
I have not time to undestand the problem. Sorry.
Could you please provide name of file which you add? I'll try to check.

@make-all
Copy link
Owner

The file is ir_remote_sensors.yaml.

You can see the change here: c4ff146#diff-20448fbcc4d0159e0d0caefe8d4ed8937071f29d20ef4b85ec45119c62a49e09

If you previously had it working with a different filename, you may need to remove the old device and re-add it.

@make-all make-all removed the unreleased Will be in next release label Aug 7, 2022
@Der-Nax Der-Nax closed this as completed Aug 15, 2022
@make-all make-all removed enhancement New feature or request partially working Needs more work to complete labels Aug 15, 2022
@make-all make-all reopened this Dec 3, 2022
@make-all make-all added the enhancement New feature or request label Dec 3, 2022
@make-all make-all added subdevice Requires subdevice support and removed enhancement New feature or request labels Feb 18, 2023
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Apr 29, 2023
@make-all
Copy link
Owner

Although this issue contains tuya portal info for a sub device, local info is missing, so this issue will be closed when the general subdevice support is added without implementing that specific device.

@make-all make-all removed awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release subdevice Requires subdevice support labels May 7, 2023
@make-all make-all closed this as completed May 7, 2023
make-all added a commit that referenced this issue Dec 30, 2023
Modify existing "ir_remote_sensors.yaml" config to include IR support.

Completes Issue #203
@stijnb1234
Copy link

@make-all How to know which codes / commands to send (what to use for the command field)?

@make-all
Copy link
Owner

make-all commented Jan 1, 2024

You can use the remote.learn_command service to learn the commands and they will be filed against a subdevice and command name that you specify. The send command will then use the same details. Otherwise you need to send raw codes prefixed with b64: but the way Tuya represents their codes is different than broadlink and others, so you'll need a Tuya specific source for those codes.

@christianzappa
Copy link

@make-all I have managed to work out how to learn and I can see the codes in the file outputted in .storage but how do I now send these! Sorry for the dumb question, I'm a noob to IR part of HA.

@make-all
Copy link
Owner

Use the remote.send_command service with the same device and command that you recorded the remote code against.

@christianzappa
Copy link

Use the remote.send_command service with the same device and command that you recorded the remote code against.

Gotcha. I worked it out in the end.

By my device is a S06Pro WR3E, seems to be working nicely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants