esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Web server showing no controls for Tuya devices #5793

Closed justlikeef closed 3 months ago

justlikeef commented 4 months ago

The problem

After upgrade to 2024.5.0, no controls appear on the web page for devices with Tuya integration

Before: image

After: image

Which version of ESPHome has the issue?

2024.5.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP8266

Board

No response

Component causing the issue

tuya?

Example YAML snippet

substitutions:
  device_name: "hall-bath-counter-lights-dimmer"
  friendly_name: Hall Bathroom Counter Lights Dimmer
  icon: "mdi:light-switch"

esphome:
  name: ${device_name}
  friendly_name: ${friendly_name}

bk72xx:
  board: cb3s

# Enable logging
logger:

web_server:
  auth:
    username: !secret web_server_username
    password: !secret web_server_password

captive_portal:

mdns:

api:
  encryption:
    key: "ZYRqxwXCAxKZN8CPVehDPlS2vZRgdJ0EAf29pT+TP+8="

ota:
  password: "81c77eaf15fe7f161f2c177fac70f2b3"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "hall-bathroom-counter-dimmer"
    password: "kIN44A6Wqjxx"

button:
  - platform: restart
    name: Restart

debug:
  update_interval: 30s

text_sensor:
  - platform: debug
    reset_reason:
      name: Reset Reason
  - platform: libretiny
    version:
      name: LibreTiny Version

uart:
  rx_pin: RX1
  tx_pin: TX1
  baud_rate: 9600

tuya:

sensor:
  - platform: wifi_signal
    name: ${friendly_name} WiFi Signal
    update_interval: 60s

  - platform: uptime
    name: ${friendly_name} Uptime

light:
  - platform: "tuya"
    name: ${friendly_name}
    dimmer_datapoint: 2
    switch_datapoint: 1
    min_value: 100
    max_value: 1000

Anything in the logs that might be useful for us?

javascript error:

www.js:3 Uncaught (in promise) Error: invalid template strings array
    at Ct (www.js:3:335)
    at Mt (www.js:3:1057)
    at new H (www.js:3:1221)
    at T._$AC (www.js:3:4731)
    at T.g (www.js:3:4433)
    at T._$AI (www.js:3:4089)
    at qt (www.js:3:7409)
    at yt.update (www.js:3:7811)
    at yt.performUpdate (www.js:1:6064)
    at yt.scheduleUpdate (www.js:1:5716)

Additional information

No response

piotek commented 3 months ago

ahhhhhhh thank you ! all Projekts now working correct !

hjdhjd commented 3 months ago

@piotek there is no fix in a release yet. You need to test the PR.

Add this to your yaml:

external_components:
  - source: github://pr#6797
    components: [ web_server_base ]

@ssieb I tested the PR...nope. Still borks devices like Ratgdo. If I force a rollback to 2024.4.2 (via the docker image method) everything works. Further, just downgrading the web components to 2024.4.2 as in the earlier suggestion does not work for Ratgdo either.

I suspect there's more that's changed (and now potentially broken?) starting with the 2024.5 series that just the web components piece...but I neither have the expertise in ESPHome nor the time commitment to take it much further.

Out of curiosity: is there a way, using only the YAML configuration file, to enforce that a specific version of ESPHome be installed, not just a particular component? It would go a long way to helping my own user community out. Thanks!

Edit: Having tried this on nearly a dozen Ratgdo devices at this point...I can say it can/does work on some, but not in all instances. Despite trying several reflashes, etc. It's quite odd. In all cases, a reversion to 2024.4.2 addresses the stability issues across all Ratgdo devices, including the web interface.

ssieb commented 3 months ago

@hjdhjd this issue is not about stability. Check out the other issues or file a new one. This is fixed with https://github.com/esphome/esphome/pull/6797

hjdhjd commented 3 months ago

@hjdhjd this issue is not about stability. Check out the other issues or file a new one. This is fixed with esphome/esphome#6797

Will do. Given the webUI doesn't in fact come up in all cases, I'm not sure this can be called fixed...but I will open up a new issue, nonetheless.

Linwood-F commented 3 months ago

FWIW I have Ratgdo's (two) that are working. But you said some do, some do not. Just in case, if no one objects, can you note the issue you open here so people can follow there? (I just looked at did not see it).

hjdhjd commented 3 months ago

2024.5.4 addresses all the issues for Ratgdo in my environments. Thanks @ssieb and others!