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

Request support for HRV KCvents VT501-W #1349

Open
bepluy opened this issue Nov 27, 2023 · 13 comments · Fixed by #2450
Open

Request support for HRV KCvents VT501-W #1349

bepluy opened this issue Nov 27, 2023 · 13 comments · Fixed by #2450
Labels
awaiting confirmation Wating for confirmation the issue is solved new device Unsupported device unreleased Will be in next release

Comments

@bepluy
Copy link

bepluy commented Nov 27, 2023

Log Message

DPS: {"1": true, "101": false, "102": true, "103": false, "104": false, "105": false, "106": false, "107": false, "108": 778, "109": 158, "111": false, "112": false, "113": true} ``` 2023-11-27 14:59:23.180 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches sh07_sprinkler_controller with quality of 54%. DPS: {"updated_at": 1701086357.0082805, "1": true, "101": false, "102": true, "103": false, "104": false, "105": false, "106": false, "107": false, "108": 778, "109": 158, "111": false, "112": false, "113": true} 2023-11-27 14:59:23.181 WARNING (MainThread) [custom_components.tuya_local.config_flow] Report this to https://github.com/make-all/tuya-local/issues/ 2023-11-27 15:16:24.371 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 662, "full_poll": false} 2023-11-27 15:16:26.846 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch new pending updates: {"1": {"value": false, "updated_at": 1701087386.8463442, "sent": false}} 2023-11-27 15:16:26.851 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch sending dps update: {"1": false} 2023-11-27 15:16:26.976 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"1": false, "full_poll": true} 2023-11-27 15:16:27.093 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"1": false, "101": false, "102": true, "103": false, "104": false, "105": false, "106": false, "107": false, "108": 662, "109": 183, "111": false, "112": false, "113": true, "full_poll": false} 2023-11-27 15:16:27.208 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"113": false, "full_poll": false} 2023-11-27 15:16:27.324 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"102": false, "full_poll": false} 2023-11-27 15:16:27.554 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 650, "full_poll": false} 2023-11-27 15:16:29.585 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch new pending updates: {"1": {"value": true, "updated_at": 1701087389.5852993, "sent": false}} 2023-11-27 15:16:29.593 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch sending dps update: {"1": true} 2023-11-27 15:16:29.725 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"1": true, "full_poll": true} 2023-11-27 15:16:29.849 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"1": true, "101": false, "102": false, "103": false, "104": false, "105": false, "106": false, "107": false, "108": 650, "109": 183, "111": false, "112": false, "113": false, "full_poll": false} 2023-11-27 15:16:29.968 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"113": true, "full_poll": false} 2023-11-27 15:16:30.088 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"102": true, "full_poll": false} 2023-11-27 15:16:30.544 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 641, "full_poll": false} 2023-11-27 15:16:33.540 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 636, "full_poll": false} 2023-11-27 15:16:33.658 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"109": 184, "full_poll": false} 2023-11-27 15:16:36.633 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 628, "full_poll": false} 2023-11-27 15:16:36.754 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"109": 183, "full_poll": false} 2023-11-27 15:16:39.722 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 614, "full_poll": false} 2023-11-27 15:16:42.792 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 598, "full_poll": false} 2023-11-27 15:16:45.790 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 584, "full_poll": false} 2023-11-27 15:16:48.872 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 574, "full_poll": false} 2023-11-27 15:16:51.957 DEBUG (MainThread) [custom_components.tuya_local.device] Simple switch received {"108": 567, "full_poll": false} ```
{
  "result": {
    "properties": [
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 1,
        "time": 1701038599041,
        "value": true
      },
      {
        "code": "speed_one",
        "custom_name": "",
        "dp_id": 101,
        "time": 1701034713524,
        "value": false
      },
      {
        "code": "speed_two",
        "custom_name": "",
        "dp_id": 102,
        "time": 1701038599281,
        "value": true
      },
      {
        "code": "speed_three",
        "custom_name": "",
        "dp_id": 103,
        "time": 1701033408235,
        "value": false
      },
      {
        "code": "sleep_mode",
        "custom_name": "",
        "dp_id": 104,
        "time": 1701033366512,
        "value": false
      },
      {
        "code": "huimidity_one",
        "custom_name": "",
        "dp_id": 105,
        "time": 1701033367380,
        "value": false
      },
      {
        "code": "huimidity_two",
        "custom_name": "",
        "dp_id": 106,
        "time": 1701033368610,
        "value": false
      },
      {
        "code": "huimidity_three",
        "custom_name": "",
        "dp_id": 107,
        "time": 1700814338139,
        "value": false
      },
      {
        "code": "huimi",
        "custom_name": "",
        "dp_id": 108,
        "time": 1701038674130,
        "value": 327
      },
      {
        "code": "temper",
        "custom_name": "",
        "dp_id": 109,
        "time": 1701038674148,
        "value": 216
      },
      {
        "code": "in_mode",
        "custom_name": "",
        "dp_id": 111,
        "time": 1701033369321,
        "value": false
      },
      {
        "code": "out_mode",
        "custom_name": "",
        "dp_id": 112,
        "time": 1700938380962,
        "value": false
      },
      {
        "code": "auto_mode",
        "custom_name": "",
        "dp_id": 113,
        "time": 1701038599198,
        "value": true
      }
    ]
  },
  "success": true,
  "t": 1701038674379,

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"00000338x2\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\"},\"name\":\"ON/OFF\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"speed_one\",\"description\":\"\",\"name\":\"Low Speed\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":102,\"accessMode\":\"rw\",\"code\":\"speed_two\",\"description\":\"\",\"name\":\"Medium Speed\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":103,\"accessMode\":\"rw\",\"code\":\"speed_three\",\"description\":\"\",\"name\":\"High Speed\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"sleep_mode\",\"description\":\"\",\"name\":\"Sleep mode\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":105,\"accessMode\":\"rw\",\"code\":\"huimidity_one\",\"description\":\"\",\"name\":\"Low Humidity\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"huimidity_two\",\"description\":\"\",\"name\":\"Medium Humidity\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"huimidity_three\",\"description\":\"\",\"name\":\"High Humidity\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":108,\"accessMode\":\"ro\",\"code\":\"huimi\",\"description\":\"\",\"name\":\"humidity\",\"typeSpec\":{\"max\":10000,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":109,\"accessMode\":\"ro\",\"code\":\"temper\",\"description\":\"\",\"name\":\"temperature\",\"typeSpec\":{\"max\":10000,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"\"}},
{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"in_mode\",\"description\":\"\",\"name\":\"Fresh Air Mode\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":112,\"accessMode\":\"rw\",\"code\":\"out_mode\",\"description\":\"\",\"name\":\"Exhausted Air Mode\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":113,\"accessMode\":\"rw\",\"code\":\"auto_mode\",\"description\":\"\",\"name\":\"Regenerate Mode\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}}]}]}"
  },
  "success": true,
  "t": 1701087659661,
  "tid": "6c4176628d1f11eeb675fa6037e836b7"

Product ID

{
  "result": [
    {
      "active_time": 1687353365,
      "category": "xfj",
      "create_time": 1687353365,
      "custom_name": "HRV",
      "icon": "smart/icon/bay16159719729188XMP/0695dc84d3c32b9a87acfd08d54ea028.png",
      "id": "bfaad9eb32d9507f89avzo",
      "ip": "xxxxxxxxxx",
      "is_online": true,
      "lat": "xxxx",
      "local_key": "",
      "lon": "xxxx",
      "model": "",
      "name": "Heat Recovery Ventilator",
      "product_id": "5p0togo3y3yzgp2p",
      "product_name": "Heat Recovery Ventilator",
      "sub": false,
      "time_zone": "+03:00",
      "update_time": 1701033539,
      "uuid": "065212efd4579d2e"
    }
  ],
  "success": true,
  "t": 1701087730267,
  "tid": "966afcf68d1f11ee98a1b60f6f2e1cb1"
}
@bepluy bepluy added the new device Unsupported device label Nov 27, 2023
@make-all make-all added the full_info All info needed was provided label Nov 27, 2023
@make-all make-all moved this to 🔖 Ready in Tuya Local Nov 27, 2023
@make-all make-all added the enhancement New feature or request label Jan 5, 2024
@make-all make-all moved this from 🔖 Ready to 📋 Backlog in Tuya Local Jan 5, 2024
@make-all
Copy link
Owner

make-all commented Jan 5, 2024

The way this device splits its settings across multiple dps makes it difficult to support, unless that rather dipswitch like control interface is just simply copied instead of trying to integrate it as native Home Assistant entities..

@bepluy
Copy link
Author

bepluy commented Jan 5, 2024

Dps 108 and 109 are just temp. and hum. sensors. Others are like dipswitches - on/off. Global switch - id 1, others are speed, vent. modes. And probably if you set "code": "speed_three" - to true, then other speeds become false.
So i think it's ok to integrate this device just with switches - and use it in scenes or automations.
Or we need to make it suitable for fan or climate integration ?

@perimos
Copy link
Contributor

perimos commented Oct 26, 2024

I would also welcome the support of the HRV KCvents and have tried my hand at a device configuration. Due to this special distribution to individual dipswitches, I was unable to work out a nice solution.

@make-all: are you planning to support this special behavior at some point or have I overlooked how to do it? It would need something like that:

ID 104 ID 101 ID 102 ID 103 speed percentage
1 x x x 0%
0 1 0 0 33%
0 0 1 0 67%
0 0 0 1 100%

Without this functionality, the device would look like this (ugly, but works in general):

Screenshot 2024-10-26 172951

@make-all
Copy link
Owner

No, I don't have any plan to cater to this type of multi-boolean instead of integer encoding in the short-medium term.
If you want to add an ugly config based on what is possible, then I will include it.

@perimos
Copy link
Contributor

perimos commented Oct 27, 2024

Thank you for your feedback. I will test a little more and open a pull request in the next few days.

@make-all
Copy link
Owner

I might suggest instead of Speed 0,1,2,3, you could use Speed 1, 2, 4, 8 which gives some hint that you can add them to create speeds up to 15.

@perimos
Copy link
Contributor

perimos commented Oct 27, 2024

No, unfortunately it is not the case that the fan offers 15 levels. It only has 3 levels (33%, 67%, 100%) and the sleep mode (0%). However, I have seen in the meantime that the device overwrites the other modes in sleep mode and sets the bit at 33% for speed.
I therefore suggest adding sleep mode to the other modes:

Screenshot 2024-10-27 091036

@make-all
Copy link
Owner

make-all commented Oct 27, 2024

In that case you might be able to use value_redirect to chain the values. I thought they had to be all added, which would make it impossible with the current capabilities of the integration.

Something like:

  - id: 101
    type: boolean
    name: speed
    mapping:
      - dps_val: true
        value: 33
      - dps_val: false
        value_redirect: speed2
  - id: 102
    type: boolean
    name: speed2
    mapping:
      - dps_val: true
        value: 66
      - dps_val: false
        value_redirect: speed3
  - id: 103
    type: boolean
    name: speed3
    mapping:
      - dps_val: true
        value: 100
      - dps_val: false
        value: 0

I'm not 100% sure this will work, as I haven't chained value_redirects in any previous config, but if it does it might allow a better interface (a fan entity rather than a group of switches)

@perimos
Copy link
Contributor

perimos commented Oct 27, 2024

Thanks for the suggestion. It correctly shows the speed in HomeAssistant when I set it in the app. However, it is not possible to control the speed from HomeAssistant.

Do you see any other solution with more options? Or would the options 66% and 100% already have to be “announced” in ID 101?

Unfortunately, it's my only fan in my system, so I don't have a working example to make comparisons. But perhaps interesting: in the developer tools it shows the attribute “percentage_step: 100”. Shouldn't that be set to 33% for the 3 possible states?

@make-all
Copy link
Owner

Maybe they need to be announced in the speed dp, as you say. I don't know if it will be possible to do this, as using dummy values will lead to incorrect behaviour. The current code only really deals with two linked dps, any more just makes things exponentially more complex so I didn't implement it.

@perimos
Copy link
Contributor

perimos commented Oct 27, 2024

I'll play around a bit and get back to you as soon as I have time. But thank you very much so far.

@perimos
Copy link
Contributor

perimos commented Oct 27, 2024

The following seems to work:

    - id: 101
      type: boolean
      name: speed
      default: false
      mapping:
        - dps_val: true
          value: 33
        - dps_val: dummy_speed1
          value: 66
          value_redirect: speed2
        - dps_val: dummy_speed2
          value: 100
          value_redirect: speed3
        - dps_val: false
          value_redirect: speed2
    - id: 102
      type: boolean
      name: speed2
      default: false
      mapping:
        - dps_val: true
          value: 66
        - dps_val: false
          value_redirect: speed3
      hidden: true
    - id: 103
      type: boolean
      name: speed3
      default: false
      mapping:
        - dps_val: true
          value: 100
        - dps_val: false
          value: 0
      hidden: true

Is there anything against it? If not, I would do the same for the modes during the next week.

@make-all
Copy link
Owner

If it works and does not result in the dummy values being sent to the device when setting any of the options (which might cause problems), then it should be OK.

@make-all make-all moved this from 🔖 Ready to 👀 In review in Tuya Local Nov 4, 2024
@make-all make-all removed the enhancement New feature or request label Nov 4, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Tuya Local Nov 9, 2024
@make-all make-all reopened this Nov 9, 2024
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog in Tuya Local Nov 9, 2024
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release and removed full_info All info needed was provided labels Nov 9, 2024
@make-all make-all moved this from 📋 Backlog to ✅ Done in Tuya Local Nov 9, 2024
make-all added a commit that referenced this issue Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting confirmation Wating for confirmation the issue is solved new device Unsupported device unreleased Will be in next release
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants