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

Seeing drop outs #225

Open
bazcurtis opened this issue Oct 25, 2024 · 16 comments
Open

Seeing drop outs #225

bazcurtis opened this issue Oct 25, 2024 · 16 comments

Comments

@bazcurtis
Copy link

I am seeing drop outs like this from the EPL

Screenshot 2024-10-25 at 14 13 46

They seem quite short, but the problem is more that they trigger my automation as Zone 1 occupancy and general occupancy come back detected and then go off.

What should the EPL do after a drop out. I am using the out of the box firmware, is this use Bluetooth and Wifi and I need to flash it Wifi only?

alias: Gym - Shutdown v2024.3
description: Gym - Shutdown v2024.3
triggers:
  - entity_id:
      - binary_sensor.everything_presence_lite_5c0a38_zone_1_occupancy
    from: "on"
    to: "off"
    trigger: state
conditions:
  - condition: state
    entity_id: binary_sensor.everything_presence_lite_5c0a38_zone_2_occupancy
    state: "off"
  - condition: and
    conditions:
      - condition: state
        entity_id: binary_sensor.everything_presence_lite_5c0a38_zone_3_occupancy
        state: "off"
actions:
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
    enabled: false
  - target:
      entity_id:
        - light.gym_bulb_left_light
        - light.gym_bulb_right_light
        - switch.sb20_switch
        - switch.left_fan
        - switch.right_fan
    action: homeassistant.turn_off
    data: {}
  - target:
      device_id: 7b1c708a1646dc1c5663fea7461306e2
    action: media_player.turn_off
    data: {}
  - target:
      entity_id: cover.ikea_gym_blind_cover
    action: cover.close_cover
    data: {}
  - data:
      message: Gym is shutting down - {{ now().strftime('%H:%M') }}
      title: Gym status
    action: notify.notify
trace:
  stored_traces: 20
mode: single

@EverythingSmartHome
Copy link
Owner

Yes I would advise flashing the non ble firmware to see if that fixes it, it's the easiest thing to test and confirm

@bazcurtis
Copy link
Author

Do I have to re-add it to the network or will it remember its settings?

@vilhalmer
Copy link

I've got one of three devices dropping off wifi pretty regularly, and managed to get it to spit out some logs. It's actually crashing, not just disconnecting. As of today this unit is totally out of commission, just boot looping. I'm not sure why it's been getting slowly worse. Maybe additional code added in esphome versions has pushed it over the edge?

[I][wifi:313]: WiFi Connecting to 'The Wifi'...
[D][sensor:094]: 'Target 1 X': Sending state 175.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Y': Sending state 258.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Distance': Sending state 311.75150 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Angle': Sending state -34.14883 ° with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 X': Sending state -541.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Y': Sending state 1900.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Distance': Sending state 1975.52039 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Angle': Sending state 15.89361 ° with 0 decimals of accuracy
[W][esp32_ble_tracker:114]: Too many BLE events to process. Some devices may not show up.
[D][esp-idf:000][wifi]: I (11481) wifi:
[D][esp-idf:000][wifi]: state: init -> auth (b0)
[D][esp-idf:000][wifi]: 

[W][esp32_ble_tracker:114]: Too many BLE events to process. Some devices may not show up.
[D][esp-idf:000][wifi]: I (11501) wifi:
[D][esp-idf:000][wifi]: state: auth -> assoc (0)
[D][esp-idf:000][wifi]: 

[D][esp-idf:000][wifi]: I (11515) wifi:
[D][esp-idf:000][wifi]: state: assoc -> run (10)
[D][esp-idf:000][wifi]: 

[D][sensor:094]: 'Target 1 X': Sending state 169.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Y': Sending state 282.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Distance': Sending state 328.76282 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Angle': Sending state -30.93387 ° with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 X': Sending state -507.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Y': Sending state 1926.00000 mm with 0 decimals of accuracy
[D][esp-idf:000][wifi]: <ba-add>idx:0 (ifx:0, 80:2a:a8:51:76:ec), tid:0, ssn:0, winSize:64
[D][esp-idf:000][wifi]: 

[D][sensor:094]: 'Target 1 X': Sending state 197.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Y': Sending state 242.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Distance': Sending state 312.04648 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Angle': Sending state -39.14730 ° with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 X': Sending state -505.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Y': Sending state 1886.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Distance': Sending state 1952.43970 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Angle': Sending state 14.99002 ° with 0 decimals of accuracy
[D][bh1750.sensor:159]: 'Illuminance': Got illuminance=5.4lx
[D][sensor:094]: 'Illuminance': Sending state 105.43307 lx with 1 decimals of accuracy
[D][sensor:094]: 'Target 1 X': Sending state 204.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Y': Sending state 234.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Distance': Sending state 310.43839 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Angle': Sending state -41.08175 ° with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 X': Sending state -499.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Y': Sending state 1863.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Distance': Sending state 1928.67053 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Angle': Sending state 14.99457 ° with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 X': Sending state 227.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Y': Sending state 232.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Distance': Sending state 324.58127 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 1 Angle': Sending state -44.37589 ° with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 X': Sending state -485.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Y': Sending state 1861.00000 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Distance': Sending state 1923.16040 mm with 0 decimals of accuracy
[D][sensor:094]: 'Target 2 Angle': Sending state 14.60709 ° with 0 decimals of accuracy
[D][binary_sensor:036]: 'Zone 1 Occupancy': Sending state OFF
[D][esp-idf:000][sys_evt]: I (12566) esp_netif_handlers: sta ip: 10.145.0.161, mask: 255.255.0.0, gw: 10.145.0.1

[C][wifi:436]:   IP Address: 10.145.0.161
[C][wifi:440]:   BSSID: [redacted]
[C][wifi:441]:   Hostname: 'everything-presence-lite-24eaec'
[C][wifi:443]:   Signal strength: -36 dB ▂▄▆█
[C][wifi:447]:   Channel: 1
[C][wifi:448]:   Subnet: 255.255.0.0
[C][wifi:449]:   Gateway: 10.145.0.1
[C][wifi:450]:   DNS1: 10.145.53.53
[C][wifi:451]:   DNS2: 0.0.0.0
[C][api:026]: Setting up Home Assistant API server...
[D][button:010]: 'get_mmwave_firmware' Pressed.
[D][switch:012]: 'mmWave Configuration Mode' Turning ON.
[D][switch:055]: 'mmWave Configuration Mode': Sending state ON
[I][app:062]: setup() finished successfully!
[D][esp-idf:000]: I (12783) esp-x509-crt-bundle: Certificate validated

[17:28:08]abort() was called at PC 0x401b8256 on core 0
[17:28:08]
[17:28:08]
[17:28:08]Backtrace: 0x400830ce:0x3ffe7050 0x4008ff75:0x3ffe7070 0x4009612e:0x3ffe7090 0x401b8256:0x3ffe7100 0x401b6e03:0x3ffe7120 0x401b6d6a:0x3ffe7140 0x400de559:0x3ffe7160 0x400fc801:0x3ffe7180 0x400fd43d:0x3ffe71a0 0x401269a2:0x3ffe71c0 0x4012693f:0x3ffe71e0
[17:28:08]
[17:28:08]
[17:28:08]
[17:28:08]
[17:28:08]ELF file SHA256: ad3fca842f4d15b8
[17:28:08]
[17:28:08]Rebooting...
[17:28:08]ets Jul 29 2019 12:21:46
[17:28:08]
[17:28:08]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[17:28:08]configsip: 0, SPIWP:0xee
[17:28:08]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[17:28:08]mode:DIO, clock div:2
[17:28:08]load:0x3fff0030,len:6652
[17:28:08]ho 0 tail 12 room 4
[17:28:08]load:0x40078000,len:15052
[17:28:08]load:0x40080400,len:3836
[17:28:08]entry 0x4008069c

I've not yet tried without bluetooth, will do that and report back. I tried disabling the ble trackers component by overriding it with esp32_ble_tracker: !remove which was added back in December, but it didn't seem to actually remove the code as the log message was still present. I am using the bluetooth proxy on this one, so it would be unfortunate to need to disable it. I might try merging the yaml together myself to disable just the tracker.

@EverythingSmartHome
Copy link
Owner

Is internet blocked to the device in anyways? There is a bug in ESPHome which will cause a boot loop exactly like this when internet is blocked and it tries to check GitHub for updates

@vilhalmer
Copy link

vilhalmer commented Oct 27, 2024

Nope, as much as I keep intending to wall off all my IOT stuff they're still free to reach out. :)

I'll see if I can find any evidence that they're failing to resolve or similar which might convince them they have no access.

Edit: I should note that I'm in an apartment which may mean there are far more bluetooth devices nearby than it is intended to deal with.

@EverythingSmartHome
Copy link
Owner

If your certain that internet access isn't an issue then it's worth trying the non ble firmware as it should become apparent quite quickly if it fixes it or not

@EverythingSmartHome
Copy link
Owner

Also esp32_ble_tracker is not enabled by default, did you add it manually?

@scotttimmins
Copy link
Contributor

The esp32_ble_tracker has config in bluetooth_base to turn on active scanning however it is enabled by the bluetooth proxy itself as a dependency (see here)

@vilhalmer
Copy link

The device has been stable on non-ble firmware. I'll keep playing with it, maybe trying to disable the active tracking.

@bazcurtis
Copy link
Author

The device has been stable on non-ble firmware. I'll keep playing with it, maybe trying to disable the active tracking.

Do you have to re-add the EPL after flashing it or does it remember the Home Assistant connection?

@vilhalmer
Copy link

No need to reassociate, just modify the package line in the yaml and it maintains its identity.

@bazcurtis
Copy link
Author

No need to reassociate, just modify the package line in the yaml and it maintains its identity.

Do you mean the entity name will change?

@vilhalmer
Copy link

Nothing will change, go for it.

@bazcurtis
Copy link
Author

I finally got around to doing this. I got a bit confused, but in the end, these were my steps.

  • Flashed the firmware with no BLE
  • Added the EPL to the wifi
  • Tried to add it to Home Assistant via the IP address, but it said it was already configured
  • Deleted the device from ESPHome. It immediately asked me to adapt it
  • It told me it needed to add a new configuration
  • A few seconds after that completed, it asked for the new encryption key
  • I then had to setup the zones again

I am not sure if this is the right way to do it, but I got there in the end.

I will see if the drop outs go away and report back. As an aside, is there a way to backup the zone configurations?

@vilhalmer
Copy link

vilhalmer commented Nov 10, 2024

I have no idea why you had to reconfigure anything, all I did was go to the ESPHome UI and change the one line in the yaml to include -no-ble and then it works as a normal update in esphome. Did you reflash from the website or something?

@bazcurtis
Copy link
Author

Yes, I did it via the EPL instruction page.

I assume yours has the BLE firmware, but turned off. I have no BLE firmware and couldn't turn it on if I wanted to.

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

4 participants