RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.72k stars 357 forks source link

Relay/button for tuya switch not properly working #2214

Closed ferbulous closed 8 months ago

ferbulous commented 8 months ago

Detailed steps to reproduce it Hi, new to flashing HAA. I modified the script based on the pinout on my tuya switch here

image

The device is connected to the wifi network and added to homeassistant. I can toggle the switch just fine from HA but relay doesn't seem to work? Same thing when I physically toggle the button, additionally the LED indicator doesn't seem to lit up as well ( tried invert and non invert)

Probably I need some correction with the script? This was generated from https://glumb.github.io/haa-configurator/

MEPLHAA Script

{
  "c": {
    "l": 13,
    "b": [
      {
        "g": 0,
        "t": 5
      }
    ],
    "i": 1
  },
  "a": [
    {
      "0": {
        "r": [
          {
            "g": 4
          }
        ]
      },
      "1": {
        "r": [
          {
            "g": 4,
            "v": 1
          }
        ]
      },
      "b": [
        {
          "g": 14,
          "t": 1
        },
        {
          "g": 14,
          "t": 5
        }
      ],
      "s": 5
    }
  ]
}

Used device Tuya switch

HAA version 12.11.4

iOS/iPadOS version 17.1

Logs A .txt file with logs. Read how to capture logs from your device

Screen-shots or videos showing issue

xrust83 commented 8 months ago

Yes, haa configurator does not support MEPLHAA scripts of the 12 series, in which the parameter is entered (more precisely, it works with it, but does not add it itself), I advise you to take a ready-made script for sonoff basic from the device database to replace the gpio numbers 13,12,0 with your own

ferbulous commented 8 months ago

Yes, haa configurator does not support MEPLHAA scripts of the 12 series, in which the parameter is entered (more precisely, it works with it, but does not add it itself), I advise you to take a ready-made script for sonoff basic from the device database to replace the gpio numbers 13,12,0 with your own

Thanks, I wasn't aware of that. Is there another configurator that works with 12 series? I needed to add hold press action for the button to go to setup