issues icon indicating copy to clipboard operation
issues copied to clipboard

Incorrect button behavior and data feedback with tuya MCU

Open Zouljiin opened this issue 1 year ago • 1 comments

The problem

have a Zemismart curtain motor BCM300D-TY with a TYWE1S that is connected and powered over a non-standard usb plug. I have it flashed and communicating with tuya MCU but the buttons are wrong. clicking "open" spins counter-clockwise. clicking "stop" reverses direction, clicking "close" stops the motor.

the feedback from the mcu also seems to not be updating for datapoint 101

more detail can be found in the conversation i had with a dev is in this discord thread. https://discord.com/channels/429907082951524364/1344400266438512690

Which version of ESPHome has the issue?

current, cant find version number

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2025.2.1

What platform are you using?

ESP8266

Board

esp8266

Component causing the issue

tuya

YAML Config

esphome:
  name: theater-curtain
  friendly_name: Theater Curtain

esp8266:
  board: esp01_1m

# Enable logging
logger:
  # important because we are using uart0 to communicate with Tuya MCU
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption_key

ota:
  - platform: esphome
    password: "redacted"
#  reboot_timeout: 24h

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true
  manual_ip:
    static_ip: 192.168.20.13
    gateway: 192.168.20.1
    subnet: 255.255.255.0  

# Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Theater-Curtain Fallback Hotspot"
    password: "redacted"

captive_portal:

web_server:

button:
  - platform: restart
    name: "Theater Curtain Restart"
    entity_category: DIAGNOSTIC
    disabled_by_default: False

uart:
  - id: com_1
    rx_pin: GPIO13
    tx_pin: GPIO15
    baud_rate: 9600
  
# Register the Tuya MCU connection
tuya:

external_components:
  - source:
      type: local
      path: components

cover:
  platform: tuya
  name: "Theater Curtain"
  device_class: curtain
  position_datapoint: 101
  control_datapoint: 102
  direction_datapoint: 103
#  position_report_datapoint: # Not Used
#  invert_position: True #works but not known if needed yet
   


# data is from an output provided by a dev for this productid '8wq8cNNPt1bbXgYC1.0.0'
# "abilityId": 101,"code": "position","type": "value",
# "abilityId": 102,"code": "mach_operate","type": "enum",
# "abilityId": 103,"code": "opposite","type": "bool"

Anything in the logs that might be useful for us?


Additional information

No response

Zouljiin avatar Feb 27 '25 02:02 Zouljiin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 28 '25 02:06 github-actions[bot]