I’ve been having stability issues lately, and I’ve found the suspect… but I need some assistance.
For starters, Home Assistant has been crashing every few days. Looking through the logfiles, I see a list of these errors, which are curious:
2023-03-25 19:39:33.321 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.506 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.509 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.513 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.517 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.532 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.809 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.966 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.977 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.978 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.985 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:33.991 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.000 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.089 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.091 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.092 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.179 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.215 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.252 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.265 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2023-03-25 19:39:34.348 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
So I google. I find this thread, NCP entered failed state. · Issue #179 · zigpy/bellows · GitHub And one comment pops out at me: “check that /config/home-assistant_v2.db
is under 300MB”
And yes, that DB has gotten very large lately. It was up around 800 MB. So I pruned it down, got it under 300. System stable for a few days. Interesting. I also add a DB filesize monitor sensor.
Today I come back from dinner and everything is crashed again. So I look at my file and it grew. Back up to 400MB.
Well that’s odd. WTH? So I start learning about the Events table.
Then group by Context:
Then let’s find the call that’s going nuts:
Here’s the culpret:
Ok, so why the hell is my kids bedtime turn-off-the lights service-call firing 160,000 times?
Here’s the script - it’s pretty simple:
alias: Ellie bedtime
description: ""
trigger:
- platform: time
at: "19:30:00"
condition: []
action:
- service: scene.turn_on
data:
transition: 60
target:
entity_id:
- scene.ellie_bedtime
- service: cover.close_cover
data: {}
target:
entity_id:
- cover.ellie_bedroom_curtains
- service: cover.close_cover
data: {}
target:
entity_id: cover.ellie_blinds
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: homeassistant.update_entity
data: {}
target:
entity_id: cover.ellie_blinds
mode: single
The nuts service call is a part of a scene, it’s a WLED light strip.
- id: '1649851686816'
name: Ellie - Bedtime
entities:
switch.ellie_heart:
icon: mdi:heart-circle
friendly_name: Ellie heart
state: 'off'
light.framelight:
effect_list:
- Android
- Aurora
- Blends
- Blink
- Blink Rainbow
- Bouncing Balls
- Bpm
- Breathe
- Candle
- Candle Multi
- Candy Cane
- Chase
- Chase 2
- Chase 3
- Chase Flash
- Chase Flash Rnd
- Chase Rainbow
- Chase Random
- Chunchun
- Colorful
- Colorloop
- Colortwinkles
- Colorwaves
- Dancing Shadows
- Dissolve
- Dissolve Rnd
- Drip
- Dynamic
- Dynamic Smooth
- Fade
- Fairy
- Fairytwinkle
- Fill Noise
- Fire 2012
- Fire Flicker
- Fireworks
- Fireworks 1D
- Fireworks Starburst
- Flow
- Glitter
- Gradient
- Halloween
- Halloween Eyes
- Heartbeat
- ICU
- Juggle
- Lake
- Lighthouse
- Lightning
- Loading
- Meteor
- Meteor Smooth
- Multi Comet
- Noise 1
- Noise 2
- Noise 3
- Noise 4
- Noise Pal
- Oscillate
- Pacifica
- Palette
- Percent
- Phased
- Phased Noise
- Plasma
- Police
- Popcorn
- Pride 2015
- Railway
- Rain
- Rainbow
- Rainbow Runner
- Random Colors
- Ripple
- Ripple Rainbow
- Running
- Running Dual
- Saw
- Scan
- Scan Dual
- Scanner
- Scanner Dual
- Sine
- Sinelon
- Sinelon Dual
- Sinelon Rainbow
- Solid
- Solid Glitter
- Solid Pattern
- Solid Pattern Tri
- Sparkle
- Sparkle Dark
- Sparkle+
- Spots
- Spots Fade
- Stream
- Stream 2
- Strobe
- Strobe Mega
- Strobe Rainbow
- Sunrise
- Sweep
- Sweep Random
- TV Simulator
- Tetrix
- Theater
- Theater Rainbow
- Traffic Light
- Tri Fade
- Tri Wipe
- Twinkle
- Twinklecat
- Twinklefox
- Twinkleup
- Two Dots
- Washing Machine
- Wipe
- Wipe Random
supported_color_modes:
- rgb
color_mode: rgb
brightness: 3
hs_color:
- 0
- 100
rgb_color:
- 255
- 0
- 0
xy_color:
- 0.701
- 0.299
effect: Twinklefox
icon: mdi:white-balance-iridescent
friendly_name: FrameLight
supported_features: 36
state: 'on'
light.ellie_bed_lights:
effect_list:
- Android
- Aurora
- Blends
- Blink
- Blink Rainbow
- Bouncing Balls
- Bpm
- Breathe
- Candle
- Candle Multi
- Candy Cane
- Chase
- Chase 2
- Chase 3
- Chase Flash
- Chase Flash Rnd
- Chase Rainbow
- Chase Random
- Chunchun
- Colorful
- Colorloop
- Colortwinkles
- Colorwaves
- Dancing Shadows
- Dissolve
- Dissolve Rnd
- Drip
- Dynamic
- Dynamic Smooth
- Fade
- Fairy
- Fairytwinkle
- Fill Noise
- Fire 2012
- Fire Flicker
- Fireworks
- Fireworks 1D
- Fireworks Starburst
- Flow
- Glitter
- Gradient
- Halloween
- Halloween Eyes
- Heartbeat
- ICU
- Juggle
- Lake
- Lighthouse
- Lightning
- Loading
- Meteor
- Meteor Smooth
- Multi Comet
- Noise 1
- Noise 2
- Noise 3
- Noise 4
- Noise Pal
- Oscillate
- Pacifica
- Palette
- Percent
- Phased
- Phased Noise
- Plasma
- Police
- Popcorn
- Pride 2015
- Railway
- Rain
- Rainbow
- Rainbow Runner
- Random Colors
- Ripple
- Ripple Rainbow
- Running
- Running Dual
- Saw
- Scan
- Scan Dual
- Scanner
- Scanner Dual
- Sine
- Sinelon
- Sinelon Dual
- Sinelon Rainbow
- Solid
- Solid Glitter
- Solid Pattern
- Solid Pattern Tri
- Sparkle
- Sparkle Dark
- Sparkle+
- Spots
- Spots Fade
- Stream
- Stream 2
- Strobe
- Strobe Mega
- Strobe Rainbow
- Sunrise
- Sweep
- Sweep Random
- TV Simulator
- Tetrix
- Theater
- Theater Rainbow
- Traffic Light
- Tri Fade
- Tri Wipe
- Twinkle
- Twinklecat
- Twinklefox
- Twinkleup
- Two Dots
- Washing Machine
- Wipe
- Wipe Random
supported_color_modes:
- onoff
- rgb
color_mode: rgb
brightness: 3
hs_color:
- 0
- 100
rgb_color:
- 255
- 0
- 0
xy_color:
- 0.701
- 0.299
effect: Twinklefox
entity_id:
- light.ellie_bed_lights
- light.ellie_lower_bed_lights
- light.ellie_desk_light
icon: mdi:lightbulb-group
friendly_name: Ellie Bed Lights
supported_features: 36
state: 'on'
light.ellie_lower_bed_lights:
effect_list:
- Android
- Aurora
- Blends
- Blink
- Blink Rainbow
- Bouncing Balls
- Bpm
- Breathe
- Candle
- Candle Multi
- Candy Cane
- Chase
- Chase 2
- Chase 3
- Chase Flash
- Chase Flash Rnd
- Chase Rainbow
- Chase Random
- Chunchun
- Colorful
- Colorloop
- Colortwinkles
- Colorwaves
- Dancing Shadows
- Dissolve
- Dissolve Rnd
- Drip
- Dynamic
- Dynamic Smooth
- Fade
- Fairy
- Fairytwinkle
- Fill Noise
- Fire 2012
- Fire Flicker
- Fireworks
- Fireworks 1D
- Fireworks Starburst
- Flow
- Glitter
- Gradient
- Halloween
- Halloween Eyes
- Heartbeat
- ICU
- Juggle
- Lake
- Lighthouse
- Lightning
- Loading
- Meteor
- Meteor Smooth
- Multi Comet
- Noise 1
- Noise 2
- Noise 3
- Noise 4
- Noise Pal
- Oscillate
- Pacifica
- Palette
- Percent
- Phased
- Phased Noise
- Plasma
- Police
- Popcorn
- Pride 2015
- Railway
- Rain
- Rainbow
- Rainbow Runner
- Random Colors
- Ripple
- Ripple Rainbow
- Running
- Running Dual
- Saw
- Scan
- Scan Dual
- Scanner
- Scanner Dual
- Sine
- Sinelon
- Sinelon Dual
- Sinelon Rainbow
- Solid
- Solid Glitter
- Solid Pattern
- Solid Pattern Tri
- Sparkle
- Sparkle Dark
- Sparkle+
- Spots
- Spots Fade
- Stream
- Stream 2
- Strobe
- Strobe Mega
- Strobe Rainbow
- Sunrise
- Sweep
- Sweep Random
- TV Simulator
- Tetrix
- Theater
- Theater Rainbow
- Traffic Light
- Tri Fade
- Tri Wipe
- Twinkle
- Twinklecat
- Twinklefox
- Twinkleup
- Two Dots
- Washing Machine
- Wipe
- Wipe Random
supported_color_modes:
- rgb
icon: mdi:led-strip-variant
friendly_name: Ellie Lower Bed Lights
supported_features: 36
state: unavailable
light.ellie_bedroom_main_lights:
supported_color_modes:
- brightness
color_mode: brightness
brightness: 2
device_id: '23'
zone_id: '17'
icon: mdi:dome-light
friendly_name: Ellie Bedroom Main Lights
supported_features: 32
state: 'on'
metadata:
light.framelight:
entity_only: true
light.ellie_bed_lights:
entity_only: true
light.ellie_lower_bed_lights:
entity_only: true
light.ellie_bedroom_main_lights:
entity_only: true
It’s odd that putting WLED in the scene is repeating a bunch of data.
But WTH is this firing 160,000 times?!?