# EverBlu Meter - Advanced Configuration with Custom Schedule # This example shows advanced scheduling and monitoring features esphome: name: everblu-meter-advanced # Choose your board configuration below (uncomment one): # ========== ESP32 (generic) ========== esp32: board: esp32dev framework: type: arduino # Required since ESPHome 2026.1.0 (everblu_meter needs Arduino.h) # ========== ESP8266 (uncomment to use instead of ESP32) ========== # esp8266: # board: huzzah # framework: # version: recommended # WiFi configuration wifi: ssid: "YourWiFiSSID" password: "YourWiFiPassword" # Static IP (optional) manual_ip: static_ip: 192.168.1.100 gateway: 192.168.1.1 subnet: 255.255.255.0 # Enable logging with custom levels logger: level: INFO logs: everblu_meter: DEBUG sensor: WARN # Enable Home Assistant API api: encryption: key: "your-32-byte-base64-encoded-key-here" # Enable OTA updates ota: password: "YourOTAPassword" # Web server for diagnostics web_server: port: 80 # Time component with SNTP fallback time: - platform: homeassistant id: ha_time timezone: Europe/London on_time_sync: then: - logger.log: "Time synchronized with Home Assistant" # SPI bus shared with the CC1101 radio # Pins below are for ESP32. For ESP8266, use: clk_pin GPIO14, mosi_pin GPIO13, miso_pin GPIO12 spi: id: main_bus clk_pin: GPIO18 mosi_pin: GPIO23 miso_pin: GPIO19 # EverBlu Meter Component external_components: - source: type: git url: https://github.com/genestealer/everblu-meters-esp8266-improved ref: main path: ESPHOME-release components: [ everblu_meter ] refresh: 1d everblu_meter: id: my_meter spi_id: main_bus # Meter identification (REQUIRED) # Enter the code printed under the barcode, with dashes. # Format on label: YY-SSSSSSS-NNN (year - serial - suffix) # The 3-digit suffix is optional. # Example (with suffix): '23-1234567-800' -> meter_code: '23-1234567-800' # Example (without suffix): '23-1234567-800' -> meter_code: '23-1234567' meter_code: "23-1234567-800" # Replace with your meter's code cs_pin: GPIO25 # ESP32 CC1101 CS / NSS — GPIO25 is safe (non-strapping, non-SPI) gdo0_pin: GPIO4 # ESP32 GPIO4 -> CC1101 GDO0 gdo2_pin: GPIO27 # REQUIRED (v3.0.0+): wire CC1101 GDO2 here for hardware FIFO threshold (TX+RX) # Use any free GPIO (not SPI: avoid GPIO18/CLK, GPIO19/MISO, GPIO23/MOSI) # (not strapping pins: avoid GPIO0, GPIO2, GPIO5, GPIO12, GPIO15; GPIO27 is safe) # (prevents TXFIFO_UNDERFLOW). To keep legacy SPI polling instead, remove # this line and add: disable_gdo2_fifo_management: true meter_type: water # Radio configuration - custom frequency frequency: 433.82 # Fine-tuned frequency # auto_scan: false # Default since CC1101 RX bandwidth was widened to 270 kHz; # set to true only if the meter is not found at 433.82 MHz auto_scan_on_failure: true # Auto-scan once for offset drift after max retries (recovers unattended) debug_cc1101: true # Enable detailed CC1101 radio debug logs # Advanced scheduling - Saturday only reading_schedule: Saturday # Read only on Saturdays read_hour: 6 # Early morning reading (in UTC) read_minute: 30 timezone_offset: 60 # CET (UTC+1) - offset in MINUTES # NOTE: Static offset, update when DST changes (CEST = 120) # Timing features auto_align_time: true auto_align_midpoint: false # Use exact configured time # Aggressive retry strategy max_retries: 15 # More attempts (default: 5) retry_cooldown: 30min # Shorter cooldown # Adaptive frequency tracking # How many successful reads before adjusting frequency (1 = adjust after each read) # Use higher values (5-10) if you have frequent reads and stable conditions adaptive_threshold: 1 # Front-end RX input attenuation (optional, default: 0) # Use only if the device is permanently mounted very close to the meter (< 0.5 m) AND # the log shows *** NEAR-FIELD SATURATION DETECTED ***. Start with 6 and increase if # CRC failures persist. At normal installation distance keep this at 0. # Values: 0 (default), 6, 12, 18 (dB, approximate actual reduction) # rx_attenuation: 0 # Time component time_id: ha_time # Fast updates for monitoring update_interval: 30s # Control buttons request_reading_button: name: "Read Meter Now" deep_scan_button: name: "Deep Frequency Scan" reset_frequency_button: name: "Reset Frequency Offset" stop_reading_button: name: "Stop Reading" diagnostic_report_button: name: "Diagnostic Report" # Core sensors volume: id: water_volume name: "Water Volume" filters: - or: - throttle: 10s # Limit updates - delta: 0.1 # Only on change counter: name: "Read Counter" battery: name: "Meter Battery" filters: - throttle: 1h # Battery doesn't change often rssi: name: "Meter RSSI" rssi_percentage: name: "Signal Quality" filters: - sliding_window_moving_average: window_size: 5 # Smooth signal readings send_every: 1 lqi: name: "LQI" lqi_percentage: name: "Link Quality" # Performance metrics total_attempts: name: "Total Read Attempts" successful_reads: name: "Successful Reads" failed_reads: name: "Failed Reads" # Rising only when GDO2 is miswired/disconnected; stays 0 on healthy wiring gdo2_timeouts: name: "GDO2 Timeouts" frequency_offset: name: "Frequency Offset" tuned_frequency: name: "Tuned Frequency (MHz)" frequency_estimate: name: "Frequency Estimate" meter_serial_sensor: name: "Meter Serial" meter_year_sensor: name: "Meter Year" meter_clock_sensor: name: "Meter Clock" meter_model_sensor: name: "Meter Type" reading_schedule_sensor: name: "Reading Schedule" reading_time_utc_sensor: name: "Reading Time (UTC)" # Timing sensors (24-hour format: HH:MM) time_start: name: "Reading Start Time" time_end: name: "Reading End Time" # Status sensors status: name: "Meter Status" on_value: then: - if: condition: text_sensor.state: id: meter_status state: "Error" then: - logger.log: level: ERROR format: "Meter reading error detected" error: name: "Last Error" radio_state: name: "CC1101 State" timestamp: name: "Last Reading" history_json: name: "Meter History (JSON)" firmware_version: name: "Firmware Version" # Binary sensors active_reading: id: meter_active_reading name: "Reading In Progress" on_press: then: - logger.log: "Meter reading started" on_release: then: - logger.log: "Meter reading completed" radio_connected: name: "CC1101 Connected" # Template sensor for consumption calculation sensor: - platform: template name: "Daily Water Consumption" unit_of_measurement: "L" device_class: water state_class: measurement update_interval: 1h lambda: |- static float last_reading = 0; const float current = id(water_volume).state; const float consumption = current - last_reading; last_reading = current; return consumption;