Medidor de consumo (kWh) no PZEM tem limite?

Bom dia pessoal,
Já tenho este problema faz alguma tempo mas nunca me deu para ver o que seria…
O meu consumo diário é sempre o mesmo… dá ideia que chega aos 8.03€ e não conta mais… Sabem o que poderá ser?

Nova Imagem de Mapa de Bits

homeassistant:

sensor:

  - platform: mqtt
    name: "Watts"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Power }}"
    unit_of_measurement: "W"
    icon: mdi:power-plug

  - platform: mqtt
    name: "Voltagem"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Voltage }}"
    unit_of_measurement: "V"
    icon: mdi:flash

  - platform: mqtt
    name: "Corrente"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Current }}"
    unit_of_measurement: "A"
    icon: mdi:power-socket

  - platform: mqtt
    name: "Consumo Diário"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Today }}"
    unit_of_measurement: "kWh"
    icon: mdi:power-socket-eu

  - platform: mqtt
    name: "Consumo dia Anterior"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Yesterday }}"
    unit_of_measurement: "kWh"
    icon: mdi:power-socket-eu

  - platform: mqtt
    name: "Consumo Total"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Total }}"
    unit_of_measurement: "kWh"
    icon: mdi:power-socket-eu

  - platform: mqtt
    name: "Power Factor"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Factor }}"
    icon: mdi:percent
    
  - platform: template
    sensors:
      custo_energia_diario:
        friendly_name: "Custo Energia Diario"
        value_template: >
         {{states.sensor.consumo_diario.state | multiply(0.187) | round(2)}}
        unit_of_measurement: "€"
      custo_energia_dia_anterior:
        friendly_name: "Custo Energia Dia anterior"
        value_template: >
         {{states.sensor.consumo_dia_anterior.state | multiply(0.187) | round(2)}}
        unit_of_measurement: "€"
      custo_energia_mensal:
        friendly_name: "Custo Energia Mensal"
        value_template: >
         {{states.sensor.consumo_total.state | multiply(0.187) | round(2) + 3.09}}
        unit_of_measurement: "€"

Terá a ver com o PZEM ou com o SONOFF acoplado a ele?

Obrigado malta :slight_smile:

Isso é estranho faz reset aos contadores.
Penso que terás que por estes comandos na consola:

Energyreset1 00000
Energyreset2 00000
Energyreset3 00000

Mas antes de isso configura isto

Tudo feito… Vamos lá ver como fica :slight_smile:

Alterei os valores e dei o ajuste a meu gosto… Será que o valor que ali está estimado está bem? Só num bocadinho 10 paus??? :confused:

Não sei que template estas a usar para fazer essas contas.

@RodolfoVieira,

Este é o template…

  - platform: template
    sensors:
      fatura_energia:
        friendly_name: "Fatura Energia bi-horário"
        value_template: >-
          {{ ((float(states.sensor.monthly_energy_vazio.state) * 0.1011  + float(states.sensor.monthly_energy_fora_de_vazio.state) * 0.1881 + now().day * 0.2953 + 2.85 ) * 1.23 ) | round(2) }}
        unit_of_measurement: "€"
      fatura_energia_simples:
        friendly_name: "Fatura Energia simples"
        value_template: >-
          {{ ((float(states.sensor.monthly_energy_vazio.state) * 0.1544  + float(states.sensor.monthly_energy_fora_de_vazio.state) * 0.1544 + now().day * 0.2953 + 2.85 ) * 1.23 ) | round(2) }}
        unit_of_measurement: "€"

Este é o código completo:


homeassistant:

utility_meter:
  daily_energy:
    source: sensor.energia_rede
    cycle: daily
    tariffs:
      - Fora de Vazio
      - Vazio
  monthly_energy:
    source: sensor.energia_rede
    cycle: monthly
    tariffs:
      - Fora de Vazio
      - Vazio

electricity:
  edp:
    country: Portugal
    operator: EDP
    plan: Bi-horário - ciclo diário

automation:
  - alias: tariff change
    trigger:
      - platform: state
        entity_id: electricity.edp
    action:
      - service: utility_meter.select_tariff
        entity_id: utility_meter.daily_energy
        data_template:
          tariff: "{{ trigger.to_state.state }}"
      - service: utility_meter.select_tariff
        entity_id: utility_meter.monthly_energy
        data_template:
          tariff: "{{ trigger.to_state.state }}"
      - service: notify.telegram
        data:
          message: "Mudou a tarifa da EDP - {{states.sensor.time.state}} - {{states.sensor.date.state}} "

sensor:

  - platform: mqtt
    name: "Watts"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Power }}"
    unit_of_measurement: "W"
    icon: mdi:power-plug

  - platform: mqtt
    name: "Voltagem"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Voltage }}"
    unit_of_measurement: "V"
    icon: mdi:flash

  - platform: mqtt
    name: "Corrente"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Current }}"
    unit_of_measurement: "A"
    icon: mdi:power-socket

  - platform: mqtt
    name: "Consumo Diário"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Today }}"
    unit_of_measurement: "kWh"
    icon: mdi:power-socket-eu

  - platform: mqtt
    name: "Consumo dia Anterior"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Yesterday }}"
    unit_of_measurement: "kWh"
    icon: mdi:power-socket-eu

  - platform: mqtt
    name: "Consumo Total"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Total }}"
    unit_of_measurement: "kWh"
    icon: mdi:power-socket-eu

  - platform: mqtt
    name: "Power Factor"
    state_topic: "tele/Pzem/SENSOR"
    value_template: "{{ value_json.ENERGY.Factor }}"
    icon: mdi:percent
    
  - platform: integration
    name: "Energia Rede"
    source: sensor.watts
    unit_prefix: k
    round: 2

#############################################TESTES#############################################



#############################################TESTES#############################################
#
#  - platform: template
#    sensors:
#      custo_energia_diario:
#        friendly_name: "Custo Energia Diario"
#        value_template: >
#         {{states.sensor.consumo_diario.state | multiply(0.187) | round(2)}}
#        unit_of_measurement: "€"
#      custo_energia_dia_anterior:
#        friendly_name: "Custo Energia Dia anterior"
#        value_template: >
#         {{states.sensor.consumo_dia_anterior.state | multiply(0.187) | round(2)}}
#        unit_of_measurement: "€"
#      custo_energia_mensal:
#        friendly_name: "Custo Energia Mensal"
#        value_template: >
#         {{states.sensor.consumo_total.state | multiply(0.187) | round(2) + 3.09}}
#        unit_of_measurement: "€"

  - platform: template
    sensors:
      fatura_energia:
        friendly_name: "Fatura Energia bi-horário"
        value_template: >-
          {{ ((float(states.sensor.monthly_energy_vazio.state) * 0.1011  + float(states.sensor.monthly_energy_fora_de_vazio.state) * 0.1881 + now().day * 0.2953 + 2.85 ) * 1.23 ) | round(2) }}
        unit_of_measurement: "€"
      fatura_energia_simples:
        friendly_name: "Fatura Energia simples"
        value_template: >-
          {{ ((float(states.sensor.monthly_energy_vazio.state) * 0.1544  + float(states.sensor.monthly_energy_fora_de_vazio.state) * 0.1544 + now().day * 0.2953 + 2.85 ) * 1.23 ) | round(2) }}
        unit_of_measurement: "€"

Copyright © 2017-2021. Todos os direitos reservados
CPHA.pt - info@cpha.pt


FAQ | Termos de Serviço/Regras | Política de Privacidade