Vue Stopped Reporting to HA #309
Replies: 4 comments
-
In the ESPhome section of Integrations, does the emporia device show the sensors as unavailable, or does the device not even appear there? |
Beta Was this translation helpful? Give feedback.
-
If I remember correctly, all of the sensors showed their last received values. |
Beta Was this translation helpful? Give feedback.
-
I'm having a similar issue, except all the HA entities associated with the Emporia Vue3 device are reporting "Unavailable". It's been installed for only a day, but it was working for at least 12 hours before becoming unavailable. I've tried restarting HA and that doesn't help. I'm able to view the http page that the ESP firmware on the Vue3 serves, so the device is on and connected to the network. I can see the power values change, so it is definately connected to the network (although I don't see it in my router's active DHCP leases, which is weird). I've tried restarting the device via the http page, but that doesn't help either. I do see some messages in the http page logs:
Not sure what is going on with that. Another oddity is that my ESPHome builder tab has always shown the device as "offline", even though I've been able to update its configuration over the air. I even just now did an OTA update with a minimal whitespace config change and it worked (I saw logs in the http server indicating that it received an update), but the entities still report as all unavailable. However, if I tried to do a non-whitespace change, I got an error:
But then on a retry it worked. But my sensors aren't coming back online. Here is my config if it helps: substitutions:
name: emporiavue3
friendly_name: emporia vue3
area: "Housewide"
# Circuit Labels used for publishing to Home Assistant
probe_01: "F24"
probe_02: "F12"
probe_03: "F21"
probe_04: "F17"
probe_05: "F05"
probe_06: "F07"
probe_07: "F09"
probe_08: "F13"
probe_09: "F15"
probe_10: "F06"
probe_11: "F08"
probe_12: "F10"
probe_13: "F16"
probe_14: "F26"
probe_15: "F28"
probe_16: "F30"
# Icons for Home Assistant
icon_circuit: "mdi:power-plug"
icon_current: "mdi:current-ac"
icon_meter: "mdi:meter-electric"
icon_phase: "mdi:angle-acute"
icon_power: "mdi:transmission-tower-import"
icon_voltage: "mdi:transmission-tower"
esphome:
name: ${name}
area: ${area}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
external_components:
# Update for Vue 3
- source: github://emporia-vue-local/esphome@vue3
components:
- emporia_vue
esp32:
board: esp32dev
framework:
type: esp-idf
version: recommended
preferences:
# the default of 1min is far too short--flash chip is rated
# for approx 100k writes.
flash_write_interval: "48h"
logger:
logs:
sensor: INFO
api:
safe_mode:
disabled: false
ota:
platform: esphome
wifi:
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.xxx.yyy # redacted last parts of IP
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.xxx.1 # redacted last parts of IP
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
ssid: !secret wifi_ssid
password: !secret wifi_password
on_connect:
- light.turn_on: wifi_led
on_disconnect:
- light.turn_off: wifi_led
ap:
ssid: "emporiaVue3"
password: !secret wifi_password
#ethernet:
# type: RTL8201
# mdc_pin: GPIO32
# mdio_pin: GPIO33
# clk_mode: GPIO0_IN
# Optional manual IP
# manual_ip:
# static_ip: x.x.x.x
# gateway: x.x.x.x
# subnet: 255.255.255.0
#text_sensor:
# - platform: ethernet_info
# ip_address:
# name: ESP IP Address
# dns_address:
# name: ESP DNS Address
# mac_address:
# name: ESP MAC Address
# Enable Web server.
# web_server:
8000
# port: 80
captive_portal:
i2c:
sda: 5
scl: 18
scan: false
frequency: 400kHz # recommended range is 50-200kHz
timeout: 1ms
id: i2c_a
time:
#- platform: sntp
# id: sntp_time
- platform: homeassistant
# Configure the two status LEDs on the Emporia Vue v3 case
# https://github.com/emporia-vue-local/esphome/discussions/264#discussioncomment-9788390
light:
- platform: status_led
#name: "D3_LED"
id: wifi_led
#pin: 2
pin:
number: 2
ignore_strapping_warning: true
restore_mode: ALWAYS_OFF
#entity_category: config
- platform: status_led
#name: "D31_LED"
id: ethernet_led
pin: 4
restore_mode: ALWAYS_OFF
#entity_category: config
# The restart button platform allows you to restart your node remotely through Home Assistant.
button:
- platform: restart
name: Restart
id: restart_button
icon: mdi:restart
- platform: safe_mode
name: Restart (Safe Mode)
id: safe_mode_button
icon: mdi:restart-alert
# Using button above instead switch
#switch:
# - platform: restart
# name: Restart
# these are called references in YAML. They allow you to reuse
# this configuration in each sensor, while only defining it once
.defaultfilters:
# throttle_avg - emporia-vue-local
- &throttle_avg
# average all raw readings together over a 5 second span before publishing
throttle_average: 5s
- &throttle_time
# only send the most recent measurement every 60 seconds
throttle: 60s
# moving_avg - digitalblur
- &moving_avg
# we capture a new sample every 0.24 seconds, so the time can
# be calculated from the number of samples as n * 0.24.
sliding_window_moving_average:
# we average over the past 2.88 seconds
window_size: 24
# we push a new value every 1.44 seconds
send_every: 12
- &invert
# invert and filter out any values below 0.
lambda: 'return max(-x, 0.0f);'
- &pos
# filter out any values below 0.
lambda: 'return max(x, 0.0f);'
- &abs
# take the absolute value of the value
lambda: 'return abs(x);'
- &zero
# Use for disconnected circuits to return 0
lambda: "return 0.0f;"
- &double
# Use to double the measurement for 240V breakers
multiply: 2
sensor:
- platform: emporia_vue
i2c_id: i2c_a
phases:
# Verify that this specific phase/leg is connected to correct input wire color on device listed below
- id: phase_a
# Vue device wire color
input: BLACK
# 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
calibration: 0.01916
# To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
voltage:
name: "Phase A Voltage"
filters: [*pos, *pos]
frequency:
name: "Phase A Frequency"
filters: [*throttle_avg, *pos]
# Verify that this specific phase/leg is connected to correct input wire color on device listed below
- id: phase_b
# Vue device wire color
input: RED
# 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
calibration: 0.01912
# To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
voltage:
name: "Phase B Voltage"
filters: [*moving_avg, *pos]
phase_angle:
name: "Phase B Phase Angle"
filters: [*throttle_avg, *pos]
ct_clamps:
# Do not specify a name for any of the power sensors here, only an id. This leaves the power sensors internal to ESPHome.
# These non-throttled power sensors are used for accurately calculating energy.
# Copy sensors defined later will filter and then send power measurements to Home Assistant.
# Main Service CT Clamps (up to 3)
# Verify the correct input on the device is connected to the CT clamp phase defined (Vue 3 inputs are inverted)
- { input: "A", phase_id: phase_a, power: { id: phase_a_power, filters: *pos } }
- { input: "B", phase_id: phase_b, power: { id: phase_b_power, filters: *pos } }
# - { input: "C", phase_id: phase_c, power: { id: phase_c_power, filters: *invert } }
# Circuit CT Clamps (up to 16)
# Pay close attention to set the phase_id for each breaker by matching it to the phase/leg it connects to in the panel
# Use *abs filter to always take the positive absolute value
# Use *invert filter for inverted positive values (Vue 3 inputs are inverted) or *zero for un-used inputs
# Use *double filter for double (240v) breakers (this will assume power is evenly divided between the two legs)
# example for double breaker
#- { phase_id: phase_a, input: "9", power: { name: "Breaker 2a", id: circuit_9, filters: [ *moving_avg, *invert, multiply: 2 ] } }
# example for phase b
#- { phase_id: phase_b, input: "10", power: { name: "Breaker 2b - XYZ", id: circuit_10, filters: [ *moving_avg, *invert ] } }
# Or maybe this works too for multiply??? - { input: "2", phase_id: phase_a, power: { id: c2_pwr, filters: [ *invert, multiply: 1 ] }, current: { id: c2_cur } }
#
- { input: "1", phase_id: phase_b, power: { id: c1_pwr, filters: [ *invert ] }, current: { id: c1_cur } }
- { input: "2", phase_id: phase_a, power: { id: c2_pwr, filters: [ *invert ] }, current: { id: c2_cur } }
- { input: "3", phase_id: phase_b, power: { id: c3_pwr, filters: [ *invert ] }, current: { id: c3_cur } }
- { input: "4", phase_id: phase_a, power: { id: c4_pwr, filters: [ *invert ] }, current: { id: c4_cur } }
- { input: "5", phase_id: phase_a, power: { id: c5_pwr, filters: [ *invert ] }, current: { id: c5_cur } }
- { input: "6", phase_id: phase_b, power: { id: c6_pwr, filters: [ *invert ] }, current: { id: c6_cur } }
- { input: "7", phase_id: phase_a, power: { id: c7_pwr, filters: [ *invert ] }, current: { id: c7_cur } }
- { input: "8", phase_id: phase_a, power: { id: c8_pwr, filters: [ *invert ] }, current: { id: c8_cur } }
- { input: "9", phase_id: phase_b, power: { id: c9_pwr, filters: [ *invert ] }, current: { id: c9_cur } }
- { input: "10", phase_id: phase_b, power: { id: c10_pwr, filters: [ *invert ] }, current: { id: c10_cur } }
- { input: "11", phase_id: phase_a, power: { id: c11_pwr, filters: [ *invert ] }, current: { id: c11_cur } }
- { input: "12", phase_id: phase_b, power: { id: c12_pwr, filters: [ *invert ] }, current: { id: c12_cur } }
- { input: "13", phase_id: phase_a, power: { id: c13_pwr, filters: [ *invert ] }, current: { id: c13_cur } }
- { input: "14", phase_id: phase_a, power: { id: c14_pwr, filters: [ *invert ] }, current: { id: c14_cur } }
- { input: "15", phase_id: phase_b, power: { id: c15_pwr, filters: [ *invert ] }, current: { id: c15_cur } }
- { input: "16", phase_id: phase_a, power: { id: c16_pwr, filters: [ *invert ] }, current: { id: c16_cur } }
# Unused CT clamp inputs are explicitly set to zero (*zero filter) to avoid phantom readings
# - { input: "16", phase_id: phase_a, power: { id: c16_pwr, filters: [ *zero ]}, current: { id: c16_cur, filters: [ *zero ] } }
# Update total power and balance power readings at the same time.
on_update:
then:
- component.update: total_power
- component.update: balance_power
# The total power sensor will be updated after all power sensors update via on_update trigger.
- platform: template
name: "Total Power"
lambda: return id(phase_a_power).state + id(phase_b_power).state;
id: total_power
update_interval: never
device_class: power
state_class: measurement
unit_of_measurement: "W"
# The balance power sensor will be updated after all power sensors update via on_update trigger.
- platform: template
id: balance_power
update_interval: never
device_class: power
state_class: measurement
unit_of_measurement: "W"
lambda: !lambda |-
return max(0.0f, id(total_power).state
- id( c1_pwr).state
- id( c2_pwr).state
- id( c3_pwr).state
- id( c4_pwr).state
- id( c5_pwr).state
- id( c6_pwr).state
- id( c7_pwr).state
- id( c8_pwr).state
- id( c9_pwr).state
- id(c10_pwr).state
- id(c11_pwr).state
- id(c12_pwr).state
- id(c13_pwr).state
- id(c14_pwr).state
- id(c15_pwr).state
- id(c16_pwr).state
);
# Copy sensors to publish the each power state to Home Assistant.
- { platform: copy, name: "Phase A Power", source_id: phase_a_power, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_power }
- { platform: copy, name: "Phase B Power", source_id: phase_b_power, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_power }
- { platform: copy, name: "Total Power", source_id: total_power, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_power }
- { platform: copy, name: "Balance Power", source_id: balance_power, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_power }
- { platform: copy, name: "${probe_01} Power", source_id: c1_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_02} Power", source_id: c2_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_03} Power", source_id: c3_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_04} Power", source_id: c4_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_05} Power", source_id: c5_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_06} Power", source_id: c6_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_07} Power", source_id: c7_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_08} Power", source_id: c8_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_09} Power", source_id: c9_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_10} Power", source_id: c10_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_11} Power", source_id: c11_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_12} Power", source_id: c12_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_13} Power", source_id: c13_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_14} Power", source_id: c14_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_15} Power", source_id: c15_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
- { platform: copy, name: "${probe_16} Power", source_id: c16_pwr, filters: *throttle_avg, accuracy_decimals: 0, icon: $icon_circuit }
# Copy sensors to publish the each current state to Home Assistant.
- { platform: copy, name: "${probe_01} Current", source_id: c1_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_02} Current", source_id: c2_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_03} Current", source_id: c3_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_04} Current", source_id: c4_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_05} Current", source_id: c5_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_06} Current", source_id: c6_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_07} Current", source_id: c7_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_08} Current", source_id: c8_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_09} Current", source_id: c9_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_10} Current", source_id: c10_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_11} Current", source_id: c11_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_12} Current", source_id: c12_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_13} Current", source_id: c13_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_14} Current", source_id: c14_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_15} Current", source_id: c15_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
- { platform: copy, name: "${probe_16} Current", source_id: c16_cur, filters: *throttle_avg, accuracy_decimals: 1, icon: $icon_current }
# The total daily energy sensors to be published to Home Assistant
- { platform: total_daily_energy, name: "Total Daily Energy", power_id: total_power, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "Balance Daily Energy", power_id: balance_power, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_01} Daily Energy", power_id: c1_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_02} Daily Energy", power_id: c2_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_03} Daily Energy", power_id: c3_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_04} Daily Energy", power_id: c4_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_05} Daily Energy", power_id: c5_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_06} Daily Energy", power_id: c6_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_07} Daily Energy", power_id: c7_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_08} Daily Energy", power_id: c8_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_09} Daily Energy", power_id: c9_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_10} Daily Energy", power_id: c10_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_11} Daily Energy", power_id: c11_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_12} Daily Energy", power_id: c12_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_13} Daily Energy", power_id: c13_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_14} Daily Energy", power_id: c14_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_15} Daily Energy", power_id: c15_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter }
- { platform: total_daily_energy, name: "${probe_16} Daily Energy", power_id: c16_pwr, filters: *throttle_time, accuracy_decimals: 0, restore: false, icon: $icon_meter } EDIT: even after power-cycling my entire panel, the entities are still unavailable. |
Beta Was this translation helpful? Give feedback.
-
I've been able to solve the issue. The problem was happening because I configured my device to use a static IP. When I removed it and went through several steps to fix mDNS on my router so emporiavue3.local resolved to the correct IP, then the devices started to show up again. It makes sense why it happened "randomly" several hours after I was fiddling with it: the DHCP lease (which was pointing to the right place) expired as the Vue device now was using a static IP to configure itself. To resolve this I had to ssh into the home assistant root supervisor so I could use docker to exec into the esphome container. In there I manually added the IP to /etc/hosts via To restate the problem: if you push a configuration with a static IP to a device, and then remove it, if the expected mDNS name does not exist then it will fail to push the OTA update. My mDNS config on my Flint2 (OpenWRT-fork) router seems to use
Followed by I'm not sure how minimal my steps to resolve the issue were, but maybe it will help someone else. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Found that all the Vue sensors just stopped reporting overnight. There are no errors in the HA logs, and no errors on the Vue when I connect to live logging through ESPHome. The ESPHome integration does not show any errors.
I've rebooted HA and I've reloaded the Vue config with the latest version of ESPHome with no change.
Vue has been running for nearly a year with 0 issues.
Any suggestions on how to further troubleshoot?
Beta Was this translation helpful? Give feedback.
All reactions