Comments (21)
from home-assistant-glow.
The piece of logs looks fine, I think there was some hypersensitivity of the sensor at that moment. So that causes a high kWh value in your energy dashboard. Maybe make the sensor less sensitive and/or make sure that the sensor is in a dark room.
from home-assistant-glow.
Hey @klaasnicolaas ,
The sensor is located under my stairs in a cupboard, and I am using the 3d printed sensor housing, i can try to adjust the sensor itself using the pot, but so far it seems to track the blips correctly.
No idea what happened at 4am this morning lol, everyone in my house was asleep
from home-assistant-glow.
Maybe it was a one-time thing after all and is it okay now?
from home-assistant-glow.
from home-assistant-glow.
Looks like I have the same or similar issue. I've added a service to reset the energy total and wrote down my electricity meter data to compare it with the glow.
api:
password: ********
services:
- service: reset_total
then:
- pulse_meter.set_total_pulses:
id: electricity_pulse_meter
value: 0
In 12 hours electricity meter reported 12 kWh consumed while the glow reported 48kWh. I'll continue observation to find out is it always 4 times differences or the dependence is nonlinear.
My electricity meter blinks at 3200 imp / kWh.
@Joeboyc2 , please, let me know if you found a reason of your issue. Thanks.
from home-assistant-glow.
Hi,
I'm using ESP8266 with the photodiode, meter is giving off 500 pulses/kWh.
I'm seeing a similar issue, Hass typically reports 30% higher consumption which led me to believe that the electricity meter is reporting kVAh and not kWh but according to the documentation it is correctly reporting kWh. Yesterday i got 2x greater value reported for the day compared to the electricity company daily use. I tried keeping an eye on the setup and I clearly see ESP8266 blinking at the same time as the meter does so it seems the number of pulses is correct, perhaps it's related to the pulse width.
One other thing - I was getting values of around 150000W earlier (now i filtered out everything > 100000 with a lambda), depending on the position of the LED it would vary between 140000-150000... might be related but not sure how to diagnose it, suggestions are welcome :)
from home-assistant-glow.
Hi @sillymoi . That's called noise. Those photodiode boards are very noisy when switching their state. This electromagnetic noise is counted as pulses and you are getting the wrong measurements. The only way to ditch it is to not accept any pulses after one was detected. Try to uncomment this line:
# internal_filter: 100ms
I'm done with this type of electricity consumption monitoring as my meter can blink too fast to filter out any noise.
from home-assistant-glow.
Hi @estevez-dev - of course, should've thought it through.. I cut off the high frequency noise with the if-then
lambda but still have lower frequencies left, plus I probably did it in the wrong place (power device instead of total energy device used by Hass). It made more sense when I read about the difference between pulse_counter
and pulse_meter
.
My meter pulses a bit slower, hopefully the 100ms filter will help.
from home-assistant-glow.
Looks like I have the same or similar issue. I've added a service to reset the energy total and wrote down my electricity meter data to compare it with the glow.
api: password: ******** services: - service: reset_total then: - pulse_meter.set_total_pulses: id: electricity_pulse_meter value: 0
In 12 hours electricity meter reported 12 kWh consumed while the glow reported 48kWh. I'll continue observation to find out is it always 4 times differences or the dependence is nonlinear.
My electricity meter blinks at 3200 imp / kWh.
@Joeboyc2 , please, let me know if you found a reason of your issue. Thanks.
This code fragment is great, @estevez-dev. May I ask you how I will be able to set the "Total Energy" to a value I enter in the web page? I would like the counter to reflect the value being displayed at the electricity meter.
from home-assistant-glow.
That is currently not possible, you can only reset the value. Also, the service name in the default yaml file has been changed.
I wonder how useful it is to enter the value of your electricity meter, it's a nice idea, but at the moment that value will always reset when you update the firmware or interrupt the power. That would have to be solved first if you really want to benefit from it 🤔
from home-assistant-glow.
Resetting the value after rebooting / firmware update to the value it had before is more in sync with the understanding of a meter as a monotonically increasing value. Therefore I think it might be a good idea to reset the counter.
from home-assistant-glow.
I also have an issue with energy spikes (nearly 1.000.000W 😂) i have uncommented internal_filter: 100ms and I will see if that helps.
When it comes to applying total meter reading to total energy value, you can either update that adding meter reading to the total value lambda, when you flash the ESP (see below), but you have to be quick with that. (1 on the photo).
Or create text input field in home assistant and input energy total energy value from energy monitor, then simply add this value to total energy value from ESP (2 on the photo). Its a work around, but seems to work.
Hopefully i explained that right.
from home-assistant-glow.
I still face a similar issue. The readings seem to be going crazy even if the sensor itself isn't showing much activity. The LED doesn't blink almost at all, is there a way to filter out noise?
from home-assistant-glow.
Sounds like the photodiode is set too sensitive 😉
from home-assistant-glow.
It's strange I've lowered it as much as it goes, the LED doesn't blink at all and yet readings are off the charts.
from home-assistant-glow.
@niemtec
Possibly you may have the faulty photodiode (is it soldered right way round?). But to rule out code, provide your code. Also, did you uncomment "internal_filter" as mentioned above?
from home-assistant-glow.
@cholek3 I have tried this with two photodiodes and had the same results. I checked them against the photo in README and appears to be soldered on correctly. It doesn't seem to react to the energy meters blinks at all and yet measurements are off the charts.
I'm getting daily readings of about 255.273 kWh which sounds completely wrong.
---
# 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
project_version: "3.1.0"
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: "${project_version}"
compile_process_limit: 1
# Choose the right Platform
# esp32: https://esphome.io/components/esp32.html
# esp8266: https://esphome.io/components/esp8266.html
esp32:
board: esp32dev
# WiFi credentials #
wifi:
ssid: 'name' # Enter your WiFi SSID here. Example: `ssid: 'your_network_name'`
password: 'blablablabla' # Enter your wifi password here. Example: `password: 'abcde123456'`
# 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: false
reboot_timeout: 5min
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:
# Installed version
- platform: template
name: "Glow - Installed version"
id: glow_version
icon: "mdi:label-outline"
entity_category: diagnostic
lambda: |-
return {"${project_version}"};
update_interval: 6h
- 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 in kW'
id: sensor_energy_pulse_meter
unit_of_measurement: 'kW'
state_class: measurement
device_class: power
icon: mdi:flash-outline
accuracy_decimals: 0
pin: ${pulse_pin}
internal_filter: 100ms
internal_filter_mode: 'PULSE'
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});
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: 2
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: 2
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
# Enable time component to reset energy at midnight
# https://esphome.io/components/time.html#home-assistant-time-source
time:
- platform: homeassistant
id: homeassistant_time
from home-assistant-glow.
I have project_version: "4.0.0" and I keep getting
270,000 - 285,000kWh spikes in House - Power Consumption
from home-assistant-glow.
I have project_version: "4.0.0" and I keep getting 270,000 - 285,000kWh spikes in House - Power Consumption
Change to GPIO26 and see if that fixes the issue
https://github.com/klaasnicolaas/home-assistant-glow/issues/300
from home-assistant-glow.
Same issue here. anyone had any luck?
from home-assistant-glow.
Related Issues (20)
- Low power mode. HOT 4
- ESP Resetting HOT 3
- esp HOT 6
- Glow suddenly stopped working HOT 14
- Got values without connecting anything to the esp HOT 2
- WRONG reading HOT 8
- web server frontpage is not displaying any data HOT 4
- Very strange readings after first setting up, why use GPIO 13? HOT 7
- Anyone else having issues with the upgrade to ESPhome 2023.8.1? HOT 36
- Power consumption over the roof HOT 10
- Not an issue, but an FYI for those in North America HOT 1
- Addresable LED support? HOT 4
- No reading HOT 19
- Pulse meter sensor took a long time HOT 3
- 3 phase? HOT 2
- Calibrate Energy Value HOT 1
- Firmware stuck on v2023.2.4 HOT 5
- Documentation problem HOT 1
- House Total Energy get reset HOT 3
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-assistant-glow.