Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

sliding_window_moving_average causes boot looping. #394

Closed
@tomlut

Description

@tomlut

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Hassio 0.85.1, ESPhome 1.10.0
ESP (ESP32/ESP8266/Board/Sonoff):

ESP8266 (Wemos D1 mini)

Affected component:

https://esphomelib.com/esphomeyaml/components/sensor/index.html#sensor-filters

Description of problem:
Including the recommended configuration to bring back a windowed moving average causes validation errors:

  - platform: adc
    pin: A0
    name: "Master Bed Sensor"
    update_interval: 15s
    filters:
      - multiply: 3.25
      - sliding_window_moving_average:
sensor.adc: [source /config/esphomeyaml/master_bed.yaml:37]
  platform: adc
  pin: A0
  name: Master Bed Sensor
  update_interval: 15s
  filters:  [source /config/esphomeyaml/master_bed.yaml:42]
    - multiply: 3.25
    - [source /config/esphomeyaml/master_bed.yaml:43]
      
      expected a dictionary.
      sliding_window_moving_average: 

Including the full sliding window filter configuration causes boot looping:

  - platform: adc
    pin: A0
    name: "Master Bed Sensor"
    update_interval: 15s
    filters:
      - multiply: 3.25
      - sliding_window_moving_average:
          window_size: 15
          send_every: 15
[18:51:56] ets Jan  8 2013,rst cause:4, boot mode:(3,6)
[18:51:56]
[18:51:56]wdt reset
[18:51:56]load 0x4010f000, len 1384, room 16 
[18:51:56]tail 8
[18:51:56]chksum 0x2d
[18:51:56]csum 0x2d
[18:51:56]vbb28d4a3
[18:51:56]~ld
[18:51:56][I][logger:071]: Log initialized
[18:51:56][C][ota:461]: There have been 3 suspected unsuccessful boot attempts.
[18:51:56][I][application:053]: Running through setup()...
[18:51:56][D][binary_sensor:027]: 'Master Bed Sensor Status': Sending state OFF
[18:51:56][C][sensor.adc:028]: Setting up ADC 'Master Bed Sensor'...
[18:51:56][C][wifi:029]: Setting up WiFi...
[18:51:56][D][wifi:260]: Starting scan...

Removing the sliding window average configuration compiles and runs as expected. Though the sensor is not averaged (as is wanted):

  - platform: adc
    pin: A0
    name: "Master Bed Sensor"
    update_interval: 15s
    filters:
      - multiply: 3.25

Problem-relevant YAML-configuration entries:

PASTE YAML FILE HERE

As per descrition above.
Traceback (if applicable):


Additional information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions