-
i have no idea whats going on? i have copied the following into the esphome folder... # Home Assistant Glow
#
# Read your electricity meter by means of the pulse LED on your
# meter, useful if you do not have a serial port (P1).
#
substitutions:
device_name: home-assistant-glow
friendly_name: House
device_description: "Measure your energy consumption with the pulse LED on your smart meter"
pulse_pin: GPIO12
status_led: GPIO5
# imp/kWh rate ⬇ #
pulse_rate: '1000'
# Webserver credentials ⬇ #
web_username: 'glow'
web_password: 'esphome'
dashboard_import:
package_import_url: github://klaasnicolaas/home-assistant-glow/home_assistant_glow.yaml
esphome:
name: '${device_name}'
comment: '${device_description}'
project:
name: "klaasnicolaas.home_assistant_glow"
version: "3.0.0"
platform: ESP32
board: esp32dev
# WiFi credentials #
wifi:
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.85
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.254
# 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
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${device_name}'
captive_portal:
# Enable logging
logger:
# Enable improv over serial
improv_serial:
# Enable Home Assistant API
api:
services:
- service: reset_total_energy
then:
- button.press:
id: button_reset_total
ota:
safe_mode: true
reboot_timeout: 10min
num_attempts: 5
web_server:
port: 80
auth:
username: '${web_username}'
password: '${web_password}'
output:
# - platform: gpio
# pin: GPIO5
# id: output_blue
- platform: gpio
pin: GPIO2
id: output_red
- platform: gpio
pin: GPIO4
id: output_green
light:
- platform: binary
internal: true
id: led_red
name: Red
output: output_red
# Status LED for connection
status_led:
pin:
# Blue LED
number: ${status_led}
button:
- platform: restart
name: "Restart - Glow"
- platform: template
name: "Reset - Total Energy"
id: button_reset_total
on_press:
- pulse_meter.set_total_pulses:
id: sensor_energy_pulse_meter
value: 0
# Sensors for ESP version and WIFI information
text_sensor:
- platform: version
hide_timestamp: true
name: '${friendly_name} - ESPHome Version'
- platform: wifi_info
ip_address:
name: '${friendly_name} - IP Address'
icon: mdi:wifi
ssid:
name: '${friendly_name} - Connected SSID'
icon: mdi:wifi-strength-2
sensor:
# WiFi signal
- platform: wifi_signal
name: "${friendly_name} - WiFi Signal"
update_interval: 120s
# Pulse meter
- platform: pulse_meter
name: '${friendly_name} - Power Consumption'
id: sensor_energy_pulse_meter
unit_of_measurement: 'W'
state_class: measurement
device_class: power
icon: mdi:flash-outline
accuracy_decimals: 0
pin: ${pulse_pin}
# internal_filter: 100ms
on_value:
then:
- light.turn_on:
id: led_red
- delay: 0.5s
- light.turn_off:
id: led_red
filters:
# multiply value = (60 / imp value) * 1000
# - multiply: 60
- lambda: return x * ((60.0 / ${pulse_rate}) * 1000.0);
total:
name: '${friendly_name} - Total Energy'
id: sensor_total_energy
unit_of_measurement: 'kWh'
icon: mdi:circle-slice-3
state_class: total_increasing
device_class: energy
accuracy_decimals: 3
filters:
# multiply value = 1 / imp value
# - multiply: 0.001
- lambda: return x * (1.0 / ${pulse_rate});
# Total day useage
- platform: total_daily_energy
name: '${friendly_name} - Daily Energy'
id: sensor_total_daily_energy
power_id: sensor_energy_pulse_meter
unit_of_measurement: 'kWh'
icon: mdi:circle-slice-3
state_class: total_increasing
device_class: energy
accuracy_decimals: 3
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
# Enable time component to reset energy at midnight
time:
- platform: sntp
id: my_time |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 25 replies
-
check the indents in your yaml code, it is wrong in your wifi block. |
Beta Was this translation helpful? Give feedback.
-
Hi Klaas,
Thanks for the reply, unfortunately I have no idea about yaml and am a complete newbie at it all. Don't even know what a incident is...
Thanks for the picture though.
Jon
|
Beta Was this translation helpful? Give feedback.
-
I am also getting the following error when trying to install the yaml to the esp32..
Installation failed: SlipReadError: Timed out waiting for packet content
|
Beta Was this translation helpful? Give feedback.
-
Replace the wifi block with this: # WiFi credentials #
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.85
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.254
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${device_name}' |
Beta Was this translation helpful? Give feedback.
-
everything is sorted and working, turns out that you have to flash the board with NOTHING attached other than the power/usb, nothing else is to be connected until flashed. |
Beta Was this translation helpful? Give feedback.
-
To be honest, I don't know much about these things, so answer the questions to give you some heat! I suggest you still ask a communications equipment professional. |
Beta Was this translation helpful? Give feedback.
everything is sorted and working, turns out that you have to flash the board with NOTHING attached other than the power/usb, nothing else is to be connected until flashed.