esphome / issues

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

esphome bulbs suddenly can't be controlled by visiting device or on dashboard, but work fine in node red and scene automations and blueprints #3589

Open mac-city opened 2 years ago

mac-city commented 2 years ago

The problem

These bulbs have been working great for multiple years now, but I have discovered some super strange behavior from esphome in home assistant addon yesterday. not sure how to describe this with less than 1000 words, but all of my esphome lohas wifi bulbs no longer respond to on / off from either the ha app or the web browser trying to do it manually with my dashboard, or even when visiting the node through the esphome addon or even the devices list. I connect to them normally, but clicking the on / off does nothing.

but this is where it gets weird, I totally don't get this... the lights work fine when using my ikea buttons working through a blueprint / automation, and node red automations on the lights are working fine. since my lighting is controlled 99% through ha automations and scenes and some node red automations, I have no idea how long it's been broken. tried restoring back to os 8.5 and supervisor from a few days ago, but that didn't solve it. I have lots more backups and could keep shotgunning backup restores going back until it starts working, but would rather try and troubleshoot and understand the problem.

this is probably more of a tech support request than a bug, but is anyone else having similar issues?

Which version of ESPHome has the issue?

2022.8.3

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

Home Assistant 2022.9.4

What platform are you using?

ESP8266

Board

lohas bulb

Component causing the issue

No response

Example YAML snippet

## LOHAS RGBW Smart Bulb with ESPHome

esphome:
  name: lohas1
  platform: ESP8266
  board: esp01_1m
  includes:
    - copychan.h

wifi:
  ssid: "secret"
  password: "secret"

# Enable logging and direct connect to change firmware 
web_server:

logger:
  level: NONE

# Enable Home Assistant API
api:

# Enable MQTT if you are using it over the HA API
#mqtt:
#  broker: '192.168.1.x'
#  username: 'MQTT_User'
#  password: 'MQTT_Password'

ota:

my9231:
 data_pin: GPIO13  
 clock_pin: GPIO15  
 num_channels: 6
 num_chips: 2 

output:
  - platform: my9231
    id: output_blue
    channel: 3
  - platform: my9231
    id: output_red
    channel: 5
  - platform: my9231
    id: output_green
    channel: 4
  - platform: my9231
    id: output_cw1
    channel: 1
  - platform: my9231
    id: output_cw2
    channel: 2
  - platform: custom
    type: float
    lambda: |-
      auto *copy = new CopyOutput();
      copy->channel_a = id(output_cw1);
      copy->channel_b = id(output_cw2);
      return {copy}; 
    outputs:
    - id: cw

light:
  - platform: rgbw
    name: "Lohas1"
    default_transition_length: 0s
    red: output_red
    green: output_green
    blue: output_blue
    white: cw

Anything in the logs that might be useful for us?

2022-09-17 20:13:29,160 INFO 304 GET /devices (0.0.0.0) 2.75ms
2022-09-17 20:13:34,158 INFO 304 GET /devices (0.0.0.0) 2.53ms
2022-09-17 20:13:39,162 INFO 304 GET /devices (0.0.0.0) 2.61ms
2022-09-17 20:13:44,161 INFO 304 GET /devices (0.0.0.0) 2.78ms
2022-09-17 20:13:49,161 INFO 304 GET /devices (0.0.0.0) 2.62ms
2022-09-17 20:13:54,167 INFO 304 GET /devices (0.0.0.0) 2.52ms
2022-09-17 20:13:59,165 INFO 304 GET /devices (0.0.0.0) 2.78ms
2022-09-17 20:14:04,167 INFO 304 GET /devices (0.0.0.0) 2.90ms
2022-09-17 20:14:09,166 INFO 304 GET /devices (0.0.0.0) 2.54ms
2022-09-17 20:14:14,165 INFO 304 GET /devices (0.0.0.0) 2.62ms
2022-09-17 20:14:19,180 INFO 304 GET /devices (0.0.0.0) 2.65ms
2022-09-17 20:14:24,174 INFO 304 GET /devices (0.0.0.0) 3.83ms
2022-09-17 20:14:29,169 INFO 304 GET /devices (0.0.0.0) 2.68ms
2022-09-17 20:14:34,176 INFO 304 GET /devices (0.0.0.0) 2.62ms
2022-09-17 20:14:39,172 INFO 304 GET /devices (0.0.0.0) 2.49ms
2022-09-17 20:14:44,173 INFO 304 GET /devices (0.0.0.0) 2.57ms
2022-09-17 20:14:49,175 INFO 304 GET /devices (0.0.0.0) 2.61ms
2022-09-17 20:14:54,177 INFO 304 GET /devices (0.0.0.0) 3.06ms
2022-09-17 20:14:59,177 INFO 304 GET /devices (0.0.0.0) 2.87ms
2022-09-17 20:15:04,184 INFO 304 GET /devices (0.0.0.0) 2.56ms
2022-09-17 20:15:09,177 INFO 304 GET /devices (0.0.0.0) 2.52ms
2022-09-17 20:15:14,176 INFO 304 GET /devices (0.0.0.0) 2.55ms
2022-09-17 20:15:19,179 INFO 304 GET /devices (0.0.0.0) 2.63ms
2022-09-17 20:15:24,180 INFO 304 GET /devices (0.0.0.0) 2.73ms
2022-09-17 20:15:29,180 INFO 304 GET /devices (0.0.0.0) 2.98ms
2022-09-17 20:15:34,180 INFO 304 GET /devices (0.0.0.0) 2.61ms
2022-09-17 20:15:39,183 INFO 304 GET /devices (0.0.0.0) 2.51ms
2022-09-17 20:15:44,183 INFO 304 GET /devices (0.0.0.0) 2.76ms
2022-09-17 20:15:49,188 INFO 304 GET /devices (0.0.0.0) 2.88ms
2022-09-17 20:15:54,186 INFO 304 GET /devices (0.0.0.0) 2.64ms
2022-09-17 20:15:59,187 INFO 304 GET /devices (0.0.0.0) 2.75ms
2022-09-17 20:16:04,187 INFO 304 GET /devices (0.0.0.0) 2.57ms
2022-09-17 20:16:09,190 INFO 304 GET /devices (0.0.0.0) 2.53ms
2022-09-17 20:16:10,270 INFO 304 GET / (0.0.0.0) 0.98ms
2022-09-17 20:16:10,283 INFO 200 GET /static/fonts/material-icons/material-icons.css?hash=ead4c276 (0.0.0.0) 0.87ms
2022-09-17 20:16:10,289 INFO 200 GET /static/css/esphome-2.css?hash=b79b4733 (0.0.0.0) 1.27ms
2022-09-17 20:16:10,290 INFO 200 GET /static/css/vendor/materialize/materialize.min.css?hash=ec1df3ba (0.0.0.0) 1.65ms
2022-09-17 20:16:10,297 INFO 200 GET /static/js/vendor/materialize/materialize.min.js?hash=4be20daf (0.0.0.0) 1.00ms
2022-09-17 20:16:10,310 INFO 200 GET /static/js/vendor/jquery/jquery.min.js?hash=12108007 (0.0.0.0) 2.18ms
2022-09-17 20:16:10,310 INFO 200 GET /static/js/vendor/jquery-validate/jquery.validate.min.js?hash=aad785d4 (0.0.0.0) 2.49ms
2022-09-17 20:16:10,312 INFO 200 GET /static/js/vendor/jquery-ui/jquery-ui.min.js?hash=cab3392d (0.0.0.0) 4.77ms
2022-09-17 20:16:10,313 INFO 200 GET /static/js/vendor/ace/ace.js?hash=65322f49 (0.0.0.0) 4.48ms
2022-09-17 20:16:10,319 INFO 200 GET /static/js/esphome/index-54a243cf.js (0.0.0.0) 2.83ms
2022-09-17 20:16:10,374 INFO 200 GET /static/js/vendor/ace/theme-dreamweaver.js (0.0.0.0) 0.73ms
2022-09-17 20:16:10,376 INFO 200 GET /static/js/vendor/ace/mode-yaml.js (0.0.0.0) 0.74ms
2022-09-17 20:16:10,383 INFO 304 GET /devices (0.0.0.0) 2.55ms
2022-09-17 20:16:10,385 INFO 200 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2 (0.0.0.0) 0.82ms
2022-09-17 20:16:10,452 INFO 101 GET /ace (0.0.0.0) 0.49ms
2022-09-17 20:16:10,461 INFO Running command 'esphome --dashboard -q vscode --ace /config/esphome'
2022-09-17 20:21:58,062 INFO 304 GET / (0.0.0.0) 0.99ms
2022-09-17 20:21:58,079 INFO 200 GET /static/fonts/material-icons/material-icons.css?hash=ead4c276 (0.0.0.0) 1.46ms
2022-09-17 20:21:58,084 INFO 200 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2?hash=570eb838 (0.0.0.0) 0.98ms
2022-09-17 20:21:58,096 INFO 200 GET /static/css/vendor/materialize/materialize.min.css?hash=ec1df3ba (0.0.0.0) 2.07ms
2022-09-17 20:21:58,099 INFO 200 GET /static/js/vendor/jquery-validate/jquery.validate.min.js?hash=aad785d4 (0.0.0.0) 2.20ms
2022-09-17 20:21:58,099 INFO 200 GET /static/css/esphome-2.css?hash=b79b4733 (0.0.0.0) 2.36ms
2022-09-17 20:21:58,101 INFO 200 GET /static/js/vendor/jquery/jquery.min.js?hash=12108007 (0.0.0.0) 3.27ms
2022-09-17 20:21:58,102 INFO 200 GET /static/js/vendor/jquery-ui/jquery-ui.min.js?hash=cab3392d (0.0.0.0) 4.51ms
2022-09-17 20:21:58,122 INFO 200 GET /static/js/vendor/materialize/materialize.min.js?hash=4be20daf (0.0.0.0) 1.64ms
2022-09-17 20:21:58,129 INFO 200 GET /static/js/esphome/index-54a243cf.js (0.0.0.0) 2.72ms
2022-09-17 20:21:58,133 INFO 200 GET /static/js/vendor/ace/ace.js?hash=65322f49 (0.0.0.0) 2.24ms
2022-09-17 20:21:58,174 INFO 200 GET /static/js/vendor/ace/theme-dreamweaver.js (0.0.0.0) 0.79ms
2022-09-17 20:21:58,176 INFO 200 GET /static/js/vendor/ace/mode-yaml.js (0.0.0.0) 0.83ms
2022-09-17 20:21:58,190 INFO 304 GET /devices (0.0.0.0) 3.28ms
2022-09-17 20:21:58,198 INFO 200 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2 (0.0.0.0) 0.96ms
2022-09-17 20:21:58,200 INFO 101 GET /ace (0.0.0.0) 0.67ms
2022-09-17 20:21:58,232 INFO Running command 'esphome --dashboard -q vscode --ace /config/esphome'
2022-09-17 20:22:01,564 INFO 200 GET /edit?configuration=secrets.yaml (0.0.0.0) 0.72ms
2022-09-17 20:22:03,191 INFO 304 GET /devices (0.0.0.0) 2.96ms
2022-09-17 20:22:08,190 INFO 304 GET /devices (0.0.0.0) 2.85ms
2022-09-17 20:22:13,192 INFO 304 GET /devices (0.0.0.0) 2.80ms
2022-09-17 20:26:37,978 INFO 304 GET / (0.0.0.0) 0.84ms
2022-09-17 20:26:37,987 INFO 200 GET /static/fonts/material-icons/material-icons.css?hash=ead4c276 (0.0.0.0) 0.97ms
2022-09-17 20:26:37,996 INFO 200 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2?hash=570eb838 (0.0.0.0) 0.83ms
2022-09-17 20:26:38,006 INFO 200 GET /static/css/vendor/materialize/materialize.min.css?hash=ec1df3ba (0.0.0.0) 4.33ms
2022-09-17 20:26:38,006 INFO 200 GET /static/css/esphome-2.css?hash=b79b4733 (0.0.0.0) 4.59ms
2022-09-17 20:26:38,008 INFO 200 GET /static/js/vendor/jquery/jquery.min.js?hash=12108007 (0.0.0.0) 6.05ms
2022-09-17 20:26:38,014 INFO 200 GET /static/js/vendor/jquery-validate/jquery.validate.min.js?hash=aad785d4 (0.0.0.0) 1.85ms
2022-09-17 20:26:38,015 INFO 200 GET /static/js/vendor/jquery-ui/jquery-ui.min.js?hash=cab3392d (0.0.0.0) 2.99ms
2022-09-17 20:26:38,028 INFO 200 GET /static/js/vendor/materialize/materialize.min.js?hash=4be20daf (0.0.0.0) 0.95ms
2022-09-17 20:26:38,033 INFO 200 GET /static/js/esphome/index-54a243cf.js (0.0.0.0) 2.43ms
2022-09-17 20:26:38,034 INFO 200 GET /static/js/vendor/ace/ace.js?hash=65322f49 (0.0.0.0) 5.18ms
2022-09-17 20:26:38,041 INFO 200 GET /static/js/vendor/ace/theme-dreamweaver.js (0.0.0.0) 1.02ms
2022-09-17 20:26:38,043 INFO 200 GET /static/js/vendor/ace/mode-yaml.js (0.0.0.0) 0.90ms
2022-09-17 20:26:38,048 INFO 200 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2 (0.0.0.0) 1.01ms
2022-09-17 20:26:38,108 INFO 304 GET /devices (0.0.0.0) 8.30ms
2022-09-17 20:26:38,110 INFO 101 GET /ace (0.0.0.0) 1.08ms
2022-09-17 20:26:38,113 INFO Running command 'esphome --dashboard -q vscode --ace /config/esphome'
2022-09-17 20:26:42,728 INFO 304 GET /edit?configuration=lohas1.yaml (0.0.0.0) 0.79ms
2022-09-17 20:26:43,103 INFO 304 GET /devices (0.0.0.0) 2.90ms
2022-09-17 20:26:48,110 INFO 304 GET /devices (0.0.0.0) 4.07ms
2022-09-17 20:26:51,301 INFO 200 GET /static/js/esphome/c.e2227e58.js (0.0.0.0) 0.84ms
2022-09-17 20:26:51,312 INFO 200 GET /static/js/esphome/c.d140f4af.js (0.0.0.0) 0.78ms
2022-09-17 20:26:51,322 INFO 200 GET /static/js/esphome/c.6fb756f5.js (0.0.0.0) 0.84ms
2022-09-17 20:26:51,326 INFO 200 GET /static/js/esphome/c.b540756b.js (0.0.0.0) 2.31ms
2022-09-17 20:26:51,326 INFO 200 GET /static/js/esphome/c.4b8b3eaf.js (0.0.0.0) 2.48ms
2022-09-17 20:26:51,332 INFO 200 GET /static/js/esphome/c.d2150cf9.js (0.0.0.0) 3.97ms
2022-09-17 20:26:51,334 INFO 200 GET /static/js/esphome/c.660c326f.js (0.0.0.0) 0.86ms
2022-09-17 20:26:53,105 INFO 304 GET /devices (0.0.0.0) 2.75ms
2022-09-17 20:26:58,106 INFO 304 GET /devices (0.0.0.0) 2.67ms
2022-09-17 20:27:03,109 INFO 304 GET /devices (0.0.0.0) 2.85ms

Additional information

Screen Shot 2022-09-17 at 8 29 56 PM
mac-city commented 1 year ago

I restored esphome to 22.6.2, restarted esphome, it said all my bulbs had an update available, so I updated the one bulb I have been testing, and that solved it, so now I can downgrade all my bulbs to this previous version and have full functionality again, but that does not get to the bottom of what the breaking change was.

github-actions[bot] commented 1 year ago

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.

mac-city commented 6 months ago

update: I don't remember when but this issue was fixed a few months later. I never knew what the problem or the fix was, but when upgrading from 2023.12.9 to 2024.2.0, the issue is back. This time, I caught it in time to restore 2023.12.9 and verify that it now works again. The problem definitely has to do with updating the device, because I had to downgrade the device to 2023.12.9 to get it working again.