0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
206 stars 58 forks source link

Curtain Module unsupported device #442

Open miqueelamorin opened 5 months ago

miqueelamorin commented 5 months ago

Prerequisite

Cache

Version

1.6.0

Device Infomation JSON File

[
  {
    "active_time": 1706434870,
    "biz_type": 18,
    "category": "tdq",
    "create_time": 1706434870,
    "icon": "smart/icon/ay1533257659316XGZOd/9a78e5d3a0db2cd5f770ff5e82d60bb0.jpg",
    "id": "bfbd06328cc795cfdf2yak",
    "ip": "92.178.55.117",
    "lat": "41.3800",
    "local_key": "Q$`tqmj[rP6mZfu0",
    "lon": "2.0900",
    "model": "",
    "name": "Blinds",
    "online": true,
    "owner_id": "181627231",
    "product_id": "igtakqsfhbr7qsp7",
    "product_name": "1CH Wi-Fi Curtain Module",
    "status": [
      {
        "code": "control",
        "value": "stop"
      },
      {
        "code": "control_back",
        "value": "back"
      },
      {
        "code": "cur_calibration",
        "value": "end"
      },
      {
        "code": "elec_machinery_mode",
        "value": "rock"
      },
      {
        "code": "percent_control",
        "value": 100
      },
      {
        "code": "quick_calibration_1",
        "value": 25
      }
    ],
    "sub": false,
    "time_zone": "+01:00",
    "uid": "eu1706119345449UqxrJ",
    "update_time": 1706436133,
    "uuid": "67ed18eb51cb57b4",
    "schema": [
      {
        "code": "control",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "open",
            "stop",
            "close",
            "continue"
          ]
        }
      },
      {
        "code": "control_back",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "forward",
            "back"
          ]
        }
      },
      {
        "code": "cur_calibration",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "start",
            "end"
          ]
        }
      },
      {
        "code": "elec_machinery_mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "push",
            "rock"
          ]
        }
      },
      {
        "code": "percent_control",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "min": 0,
          "max": 100,
          "step": 1,
          "unit": "%",
          "scale": 0
        }
      },
      {
        "code": "quick_calibration_1",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "min": 0,
          "max": 900,
          "step": 1,
          "unit": "s",
          "scale": 0
        }
      }
    ]
  }
]

Device Control Mode

Standard Instruction

Logs

[28/01/2024, 22:33:45] [TuyaPlatform] [Blinds] Missing one of the required schema: [ 'switch', 'switch_1' ]
[28/01/2024, 22:33:45] [TuyaPlatform] [Blinds] Existing schema: [
  {
    code: 'control',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ 'open', 'stop', 'close', 'continue', [length]: 4 ] }
  },
  {
    code: 'control_back',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ 'forward', 'back', [length]: 2 ] }
  },
  {
    code: 'cur_calibration',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ 'start', 'end', [length]: 2 ] }
  },
  {
    code: 'elec_machinery_mode',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ 'push', 'rock', [length]: 2 ] }
  },
  {
    code: 'percent_control',
    mode: 'rw',
    type: 'Integer',
    property: { min: 0, max: 100, step: 1, unit: '%', scale: 0 }
  },
  {
    code: 'quick_calibration_1',
    mode: 'rw',
    type: 'Integer',
    property: { min: 0, max: 900, step: 1, unit: 's', scale: 0 }
  },
  [length]: 6
]
[28/01/2024, 22:33:45] [TuyaPlatform] Unsupported device: Blinds.

Other Infomations

I configured the curtain module as expected but it says not supported. I changed the deviceOverrides but it doesn't solve the problem.

xrust83 commented 5 months ago

Make it so that you do not need plugins and third-party programs other than homekit. My videos are in Ukrainian, but you can watch them with subtitles

MyHomeKitHome - Managment TuyaMCU from HAA / Керування TuyaMCU з НАА без Мостів

https://youtu.be/wSopCDhy8rs

MyHomeKitHome - Two-way data exchange betwen MCU and HAA / Двосторонній обмін даними TuyaMCU з НАА

https://youtu.be/sGAP4qEoSWs

MyHomeKitHome - Zemismart ZM25TQ Reverse Engineering / Зворотній інженерінг рулонної штори

https://youtu.be/PeY7vvexAGA

j-aguiar commented 3 months ago

Sorry for joining late to the party. Had the same issue with one device here. Issue is with a misconfiguration on the category. It shouldn't be tdq (switch), but cl (curtains) instead.

Quickly solve it by adding the following to the configuration:

{
  "options": {
    // ...
    "deviceOverrides": [
      {
        "id": "${deviceId}", // on your case should be bfbd06328cc795cfdf2yak
        "category": "cl"
      }
    ]
  }
}

@miqueelamorin - See if it works for you as well 👍

Aransh commented 2 months ago

@raiuga Just installed a curtain module and your tip worked for me, thanks!