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

Update device aygrochy_inline_wifi_air_vent product data #2920

Merged
merged 3 commits into from
Feb 8, 2025

Conversation

enyineer
Copy link
Contributor

@enyineer enyineer commented Feb 5, 2025

I tried to add my Aygrochy Inline Fan Controller to tuya-local and it was found, but it did not suggest the correct device type:

Screenshot 2025-02-05 at 18 46 32

Screenshot 2025-02-05 at 18 46 45

Screenshot 2025-02-05 at 18 47 26

I tried to understand why this happens even though it was listed as a compatible device, and am currently thinking that this is because no product is configured in aygrochy_inline_wifi_air_vent.yaml's products data. Is that correct?

If it helps, I updated the Aygrochy Inline WIFI Air Vent Product Data according to Tuya Cloud Data.

Screenshot 2025-02-05 at 18 41 47

Screenshot 2025-02-05 at 18 41 53

This is the data I got from the "Query Things Data Model". I'm not that deep into the tuya-local definitions of devices, so if anyone could check whether this still matches the configured model in aygrochy_inline_wifi_air_vent.yaml would be great.

{
  "modelId": "000003h4wa",
  "services": [
    {
      "actions": [],
      "code": "",
      "description": "",
      "events": [],
      "name": "默认服务",
      "properties": [
        {
          "abilityId": 1,
          "accessMode": "rw",
          "code": "switch",
          "description": "",
          "extensions": { "iconName": "icon-dp_power2", "attribute": "1024" },
          "name": "开关",
          "typeSpec": { "type": "bool" }
        },
        {
          "abilityId": 2,
          "accessMode": "rw",
          "code": "mode",
          "description": "",
          "extensions": { "iconName": "icon-dp_mode", "attribute": "1024" },
          "name": "Work Mode",
          "typeSpec": {
            "type": "enum",
            "range": ["ON", "OFF", "TIMER", "AUTO", "ALARM"]
          }
        },
        {
          "abilityId": 8,
          "accessMode": "ro",
          "code": "humidity_indoor",
          "description": "",
          "extensions": { "iconName": "icon-shidu", "attribute": "1024" },
          "name": "humidity",
          "typeSpec": {
            "type": "value",
            "max": 255,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
        {
          "abilityId": 9,
          "accessMode": "ro",
          "code": "temp_indoor",
          "description": "",
          "extensions": { "iconName": "icon-dp_temp", "attribute": "1024" },
          "name": "Temperature",
          "typeSpec": {
            "type": "value",
            "max": 255,
            "min": -40,
            "scale": 0,
            "step": 1,
            "unit": "°F"
          }
        },
        {
          "abilityId": 101,
          "accessMode": "rw",
          "code": "BKLED",
          "description": "",
          "name": "Brightness",
          "typeSpec": {
            "type": "value",
            "max": 4,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        },
        {
          "abilityId": 102,
          "accessMode": "rw",
          "code": "FAN_SET",
          "description": "",
          "name": "Fan Speed Setting",
          "typeSpec": {
            "type": "value",
            "max": 10,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        },
        {
          "abilityId": 103,
          "accessMode": "ro",
          "code": "New_Fan",
          "description": "",
          "name": "Running Speed",
          "typeSpec": {
            "type": "value",
            "max": 10,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": ""
          }
        },
        {
          "abilityId": 104,
          "accessMode": "rw",
          "code": "time",
          "description": "",
          "name": "Countdown",
          "typeSpec": {
            "type": "value",
            "max": 36000,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "s"
          }
        },
        {
          "abilityId": 105,
          "accessMode": "ro",
          "code": "alarm",
          "description": "",
          "name": "Alarm triggered",
          "typeSpec": {
            "type": "enum",
            "range": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16"
            ]
          }
        },
        {
          "abilityId": 106,
          "accessMode": "rw",
          "code": "AUTO_HIGH_TEMP",
          "description": "",
          "name": "Auto-High Temp",
          "typeSpec": {
            "type": "value",
            "max": 194,
            "min": 32,
            "scale": 0,
            "step": 1,
            "unit": "°F"
          }
        },
        {
          "abilityId": 107,
          "accessMode": "rw",
          "code": "AUTO_HIGH_HUMID",
          "description": "",
          "name": "Auto-High Humid",
          "typeSpec": {
            "type": "value",
            "max": 100,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
        {
          "abilityId": 108,
          "accessMode": "rw",
          "code": "AUTO_LOW_TEMP",
          "description": "",
          "name": "Auto-Low Temp",
          "typeSpec": {
            "type": "value",
            "max": 194,
            "min": 32,
            "scale": 0,
            "step": 1,
            "unit": "°F"
          }
        },
        {
          "abilityId": 109,
          "accessMode": "rw",
          "code": "AUTO_LOW_HUMID",
          "description": "",
          "name": "Auto-Low Humid",
          "typeSpec": {
            "type": "value",
            "max": 100,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
        {
          "abilityId": 110,
          "accessMode": "rw",
          "code": "ALARM_HIGH_TEMP",
          "description": "",
          "name": "Alarm-High Temp",
          "typeSpec": {
            "type": "value",
            "max": 194,
            "min": 32,
            "scale": 0,
            "step": 1,
            "unit": "°F"
          }
        },
        {
          "abilityId": 111,
          "accessMode": "rw",
          "code": "ALARM_HIGH_HUMID",
          "description": "",
          "name": "Alarm-High Humid",
          "typeSpec": {
            "type": "value",
            "max": 100,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
        {
          "abilityId": 112,
          "accessMode": "rw",
          "code": "ALARM_LOW_TEMP",
          "description": "",
          "name": "Alarm-Low Temp",
          "typeSpec": {
            "type": "value",
            "max": 194,
            "min": 32,
            "scale": 0,
            "step": 1,
            "unit": "°F"
          }
        },
        {
          "abilityId": 113,
          "accessMode": "rw",
          "code": "ALARM_LOW_HUMID",
          "description": "",
          "name": "Alarm-Low Humid",
          "typeSpec": {
            "type": "value",
            "max": 100,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
        {
          "abilityId": 114,
          "accessMode": "rw",
          "code": "lock",
          "description": "",
          "name": "Child Lock",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 115,
          "accessMode": "rw",
          "code": "unit",
          "description": "",
          "name": "Unit",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 116,
          "accessMode": "rw",
          "code": "high_temp_on_off",
          "description": "",
          "name": "Auto-High temp switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 117,
          "accessMode": "rw",
          "code": "high_huid_on_off",
          "description": "",
          "name": "Auto-High humid switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 118,
          "accessMode": "rw",
          "code": "low_temp_on_off",
          "description": "",
          "name": "Auto-Low temp switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 119,
          "accessMode": "rw",
          "code": "low_huid_on_off",
          "description": "",
          "name": "Auto-Low humid switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 120,
          "accessMode": "rw",
          "code": "alarm_hight_on_off",
          "description": "",
          "name": "Alarm-High temp switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 121,
          "accessMode": "rw",
          "code": "alarm_huid_on_off",
          "description": "",
          "name": "Alarm-High humid switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 122,
          "accessMode": "rw",
          "code": "alarm_lowt_on_off",
          "description": "",
          "name": "Alarm-Low temp switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 123,
          "accessMode": "rw",
          "code": "alarm_lowhu_on_off",
          "description": "",
          "name": "Alarm-Low humid switch",
          "typeSpec": { "type": "enum", "range": ["0", "1"] }
        },
        {
          "abilityId": 124,
          "accessMode": "rw",
          "code": "temp_revise",
          "description": "",
          "name": "Temp calibration",
          "typeSpec": {
            "type": "value",
            "max": 108,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "°F"
          }
        },
        {
          "abilityId": 125,
          "accessMode": "rw",
          "code": "huid_revise",
          "description": "",
          "name": "Humid calibration",
          "typeSpec": {
            "type": "value",
            "max": 108,
            "min": 0,
            "scale": 0,
            "step": 1,
            "unit": "%"
          }
        },
        {
          "abilityId": 126,
          "accessMode": "ro",
          "code": "aoto_trigger_data",
          "description": "",
          "name": "Auto triggered",
          "typeSpec": {
            "type": "enum",
            "range": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16"
            ]
          }
        }
      ]
    }
  ]
}

Update the Aygrochy Inline WIFI Air Vent Product Data according to Tuya Cloud Data
@make-all
Copy link
Owner

make-all commented Feb 7, 2025

Product id is available in two places (for some devices they are different ids):

  1. From the cloud API: functions that return the local key (such as Query Device Properties) generally also return the product id.
  2. From local discovery broadcasts: you can see these using python -m tinytuya scan

@enyineer
Copy link
Contributor Author

enyineer commented Feb 7, 2025

Will look into it and update when I'm back home tomorrow. Thanks for the advice 🙏

@enyineer
Copy link
Contributor Author

enyineer commented Feb 8, 2025

@make-all I updated the JSON data. I'd appreciate it if you could have a look at it :)

Query Device Details data for this Product:

{
  "result": {
    "active_time": 1738670925,
    "bind_space_id": "223878109",
    "category": "xfj",
    "create_time": 1716808011,
    "custom_name": "",
    "icon": "smart/icon/bay1634003854363NjDl/ddaaca01b1ed92a4128c511d4cdf1705.png",
    "id": "bfa6958a160d31f713s2to",
    "ip": "[REDACTED]",
    "is_online": true,
    "lat": "[REDACTED]",
    "local_key": "[REDACTED]",
    "lon": "[REDACTED]",
    "model": "Ec-v1.0",
    "name": "Fan Controller",
    "product_id": "hqldzgqpsyr1pw8c",
    "product_name": "Fan Controller",
    "sub": false,
    "time_zone": "+01:00",
    "update_time": 1738670928,
    "uuid": "d687884a65824125"
  },
  "success": true,
  "t": 1739023704679,
  "tid": "292b2999e62611efa76ab217c6c149bc"
}

- follow HA naming convention
- don't duplicate name as model_id.

PR #2920
@make-all make-all merged commit d535f08 into make-all:main Feb 8, 2025
4 checks passed
make-all added a commit that referenced this pull request Feb 8, 2025
@enyineer enyineer deleted the patch-1 branch February 8, 2025 16:55
@enyineer
Copy link
Contributor Author

enyineer commented Feb 8, 2025

Thank you! 🎉

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

Successfully merging this pull request may close these issues.

2 participants