Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve boot times #77

Open
maumaumaumaumau opened this issue Feb 14, 2024 · 11 comments
Open

Improve boot times #77

maumaumaumaumau opened this issue Feb 14, 2024 · 11 comments

Comments

@maumaumaumaumau
Copy link

Hi,
I noticed, that yeelight lamps with standard firmware are starting blazing fast, where as esphome flashed lamps require 1-2 seconds to turn on.
Not only that is a a hassle for presence sensors, but also guests think lamps are broken, if lamps don't turn on instantly.

Is there a way to improve that behavior?

BR
mau

@syssi
Copy link
Owner

syssi commented Feb 14, 2024

To power the lamp always is no option?

@maumaumaumaumau
Copy link
Author

Yes it is, but it's a project for the future. I was just wondering, if we can overcome that issue, because that's the only real downside compared to OFW.

@syssi
Copy link
Owner

syssi commented Feb 14, 2024

Do you expect the last state of the device is retrieved from the Home Automation first? If the last state doesn't matter you could add a turn_on statement to the on_boot section to speed things up. Also turning off transitions will feel like better responsibility.

@maumaumaumaumau
Copy link
Author

maumaumaumaumau commented Feb 14, 2024

I experimented a little.
By commenting out all restore_mode: lines and adding the following, did not improve the situation at all:

esphome:
  on_boot:
    priority: 750
    then:
      - light.turn_on: 
          id: ceiling_light
          brightness: 100%   
          cold_white: 0%
          warm_white: 100%

@tmp-hallenser
Copy link

I'm facing the same issues. Any solution in the meantime?

@maumaumaumaumau
Copy link
Author

No sorry, I tried the priority and the transition option.
Maybe I did something wrong, as I'm not too experienced with esp programming.

@B48D81EFCC
Copy link
Contributor

How is the experience when:

  1. you turn on the light
  2. Wait for it until it is turned on
  3. Turn off and directly turn on again (max. pause around 1 second)

In my case the light turns on directly without any delay.
If the pause between "off" and "on" is too long, I have a delay turning on the lamp again.
I am wondering what cause this behavior.

@B48D81EFCC
Copy link
Contributor

I replaced the built-in board with an ESP32 S3 WROOM (T-ETH-Lite ESP32-S3).
Using the S3 board, the lamp is almost instantly on after power cycle. MAYBE the stock firmware is slightly faster. I can't compare it side by side. But with the S3 it is MUCH faster than with the built-in board.

@B48D81EFCC
Copy link
Contributor

Finally I decided to use a Seeed Studio XIAO ESP32S3 and replaced the build-in board.
The lamp turns on without delay now.

@kosmos342
Copy link

I reduced delay on power on with:

esp32:
  ...
  framework:
    ...
    sdkconfig_options:
      ...
      CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON: y
      CONFIG_BOOTLOADER_LOG_LEVEL_NONE: y
      CONFIG_LOG_DEFAULT_LEVEL_NONE: y
...
logger:
  level: NONE
  baud_rate: 0
...
light:
  - platform: ...
    ...
    default_transition_length: 0s

and restore_mode or boot priority 750 to turn on (I use restore_mode: RESTORE_AND_ON)
I'm new to esphome, so some of the log parameters might be redundant (I haven't researched this)

@B48D81EFCC
Copy link
Contributor

I just stumbled over a esphome feature request to disable serial logs by default due to performance improvments: esphome/feature-requests#2993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants