I’s comes with Home Wizzard as a payed subscripton (2,99 mth).
The info is available in HA
sure, that’s ok. my question was about the graphs, not so much the data. I have all of the data, but was hoping to recreate those nice HomeWizard graphs in HA.
Hi Fabian,
Really nice graphs.
I’m trying to get more insight in my energy consumption to. I made the same utility sensors as you did, daily, montly etc. but now I want to have the total costs to.
I see you use this entities:
- sensor.energy_gas_daily_eur
- sensor.energy_gas_en_elektriciteit_dagelijks_eur
I don’t see this entities coming back in the sensors you made. How can I get this to work and where can I fill in my current energy costs.
Thanks!
Je mag ook een PB in het Nederlands sturen als dat makkelijker is.
Hej,
I have the following sensors configured, this should give you an idea…
#####
- platform: template
sensors:
energy_import_t2_dagelijks_eur:
friendly_name: 'Dagelijkse kosten nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t2_wekelijks_eur:
friendly_name: 'Wekelijkse kosten nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_wekelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t2_maandelijks_eur:
friendly_name: 'Maandelijkse kosten nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_maandelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
- platform: template
sensors:
energy_import_t1_dagelijks_eur:
friendly_name: 'Dagelijkse kosten dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t1_wekelijks_eur:
friendly_name: 'Wekelijkse kosten dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t1_maandelijks_eur:
friendly_name: 'Maandelijkse kosten dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
- platform: template
sensors:
energy_import_total_dagelijks_eur:
friendly_name: 'Dagelijkse kosten dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_dagelijks_eur')|float + states('sensor.energy_import_t1_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_total_wekelijks_eur:
friendly_name: 'Wekelijkse kosten dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_wekelijks_eur')|float + states('sensor.energy_import_t1_wekelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_total_maandelijks_eur:
friendly_name: 'Maandelijkse kosten dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_maandelijks_eur')|float + states('sensor.energy_import_t1_maandelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
- platform: template
sensors:
energy_import_total_dagelijks_kwh:
friendly_name: 'kWh vandaag dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float + states('sensor.energy_import_t2_dagelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
- platform: template
sensors:
energy_import_total_wekelijks_kwh:
friendly_name: 'kWh wekelijks dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float + states('sensor.energy_import_t2_wekelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
- platform: template
sensors:
energy_import_total_maandelijks_kwh:
friendly_name: 'kWh maandelijks dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float + states('sensor.energy_import_t2_maandelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
##############################################
## GAS ##
##############################################
- platform: template
sensors:
energy_gas_daily_eur:
friendly_name: 'Dagelijkse kosten gas'
value_template: "{{ (states('sensor.energy_gas_dagelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_weekly_eur:
friendly_name: 'Wekelijkse kosten gas'
value_template: "{{ (states('sensor.energy_gas_wekelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_monthly_eur:
friendly_name: 'Maandelijkse kosten gas'
value_template: "{{ (states('sensor.energy_gas_maandelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
## Totale netto kosten (Gas + electra) ##
##############################################
- platform: template
sensors:
energy_gas_en_elektriciteit_dagelijks_eur:
friendly_name: 'Totale netto dag kosten energie'
value_template: "{{ (states('sensor.energy_gas_daily_eur')|float + states('sensor.energy_import_total_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_en_elektriciteit_wekelijks_eur:
friendly_name: 'Totale netto week kosten energie'
value_template: "{{ (states('sensor.energy_gas_weekly_eur')|float + states('sensor.energy_import_total_wekelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_en_elektriciteit_maandelijks_eur:
friendly_name: 'Totale netto maand kosten energie'
value_template: "{{ (states('sensor.energy_gas_monthly_eur')|float + states('sensor.energy_import_total_maandelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
##############################
## input_number ##
##############################
input_number:
t2_energy_cost:
name: Stroom import nomaal
mode: box
min: 0
max: 100
unit_of_measurement: "€/kWh"
icon: mdi:currency-eur
t1_energy_cost:
name: Stroom import dal
mode: box
min: 0
max: 100
unit_of_measurement: "€/kWh"
icon: mdi:currency-eur
gas_energy_cost:
name: Gas
mode: box
min: 0
max: 100
unit_of_measurement: "€/m3"
icon: mdi:currency-eur
##############################
## Utility Meter ##
##############################
utility_meter:
# Hourly sensors
energy_offpeak_hourly:
source: sensor.p1_meter_total_power_import_t1_kwh
cycle: hourly
energy_peak_hourly:
source: sensor.p1_meter_total_power_import_t2_kwh
cycle: hourly
gas_hourly:
source: sensor.p1_meter_total_gas_m3
cycle: hourly
# Daily sensors
energy_offpeak_daily:
source: sensor.p1_meter_total_power_import_t1_kwh
cycle: daily
energy_peak_daily:
source: sensor.p1_meter_total_power_import_t2_kwh
cycle: daily
energy_import_t2_dagelijks:
source: sensor.p1_meter_total_power_import_t2
cycle: daily
energy_import_t1_dagelijks:
source: sensor.p1_meter_total_power_import_t1
cycle: daily
# energy_tuya_sw01_current_consumption:
# source: sensor.localtuya_sw01_current_consumption
# cycle: daily
# energy_tuya_sw01_current_consumption:
# source: sensor.localtuya_sw02_current_consumption
# cycle: daily
# Weekly
energy_offpeak_weekly:
source: sensor.p1_meter_total_power_import_t1_kwh
cycle: weekly
energy_peak_weekly:
source: sensor.p1_meter_total_power_import_t2_kwh
cycle: weekly
energy_import_t2_wekelijks:
source: sensor.p1_meter_total_power_import_t2
cycle: weekly
energy_import_t1_wekelijks:
source: sensor.p1_meter_total_power_import_t1
cycle: weekly
# Monthly
# energy_peak_monthly:
# source: sensor.p1_meter_total_power_import_t2_kwh
# cycle: monthly
# energy_offpeak_monthly:
# source: sensor.p1_meter_total_power_import_t1_kwh
# cycle: monthly
energy_import_t2_maandelijks:
source: sensor.p1_meter_total_power_import_t2
cycle: monthly
energy_import_t1_maandelijks:
source: sensor.p1_meter_total_power_import_t1
cycle: monthly
# energy_usage_tuya_sw01_dagelijks:
# source: sensor.localtuya_sw01_current_consumption
# cycle: daily
# energy_usage_tuya_sw02_dagelijks:
# source: sensor.localtuya_sw02_current_consumption
# cycle: daily
# energy_export_t2_dagelijks:
# source: sensor.p1_meter_total_power_export_t2_kwh
# cycle: daily
# energy_export_t1_dagelijks:
# source: sensor.p1_meter_total_power_export_t1_kwh
# cycle: daily
# Gas
energy_gas_dagelijks:
source: sensor.p1_meter_total_gas
cycle: daily
energy_gas_wekelijks:
source: sensor.p1_meter_total_gas
cycle: weekly
energy_gas_maandelijks:
source: sensor.p1_meter_total_gas
cycle: monthly
# Yearly sensors
energy_offpeak_yearly:
source: sensor.p1_meter_total_power_import_t1_kwh
cycle: yearly
energy_peak_yearly:
source: sensor.p1_meter_total_power_import_t2_kwh
cycle: yearly
gas_yearly:
source: sensor.p1_meter_total_gas_m3
cycle: yearly
Also a card to add the prices:
type: entities
entities:
- entity: input_number.t2_energy_cost
- entity: input_number.t1_energy_cost
- entity: input_number.gas_energy_cost
theme: Mushroom Square
My P1 meter has been updated to firmware version 4.14 and I’d like to use the montly_power_peak_w and montly_power_peak_timestamp (I know there’s a typo in it, should be ‘monthly’ instead of ‘montly’, I already filed a request to the support team of Homewizard for this) in Home Assistant.
How can I do this?
Wait for HA 2023.2 (will be added in that version) or try it yourself using HomeWizard Energy (Wi-Fi P1 meter, kWh meter, Energy Socket and Water Meter) - #496 by Unsigus
Thanks for this integration, happy user here.
Using a windows application found on tweakers.net I noticed that it’s also possible to get the phase voltages from the P1-meter local API. This could be very interesting considering the higher line voltages thanks to the increasing ammount of PV installations.
In the sensor.py file of the homewizard integration I found that the phase voltages are already present but seem disabled by default. Is this something I can enable in my home-assistant or should I file a feature request?
You can also add the voltages by adding this in your configuration.yaml file
These lines read your digital meter via the API of the P1-meter.
If you play around a bit with the parameters of the value|regex_findall_index lines, you can also add any other values that are available in the telegram data from your digital meter.
rest:
- authentication: basic
scan_interval: 5
resource: http://192.168.0.92/api/v1/telegram
sensor:
- name: "Voltage L1"
value_template: "{{ (value|regex_findall_index('1\\-0\\:32\\.7\\.0\\([0-9.]*')).split('(',1)[-1].strip() }}"
- name: "Voltage L2"
value_template: "{{ (value|regex_findall_index('1\\-0\\:52\\.7\\.0\\([0-9.]*')).split('(',1)[-1].strip() }}"
- name: "Voltage L3"
value_template: "{{ (value|regex_findall_index('1\\-0\\:72\\.7\\.0\\([0-9.]*')).split('(',1)[-1].strip() }}"
The IP address is that of your P1 meter.
Ah I was just a bit too soon, good to know. Thanks @DCSBL
Nice bit of code @mbbs1024 I’ll use that until the february version.
It is not my code, I found it somewhere on the forum, but I don’t remember where anymore, otherwise I would have put a link to it instead of copy pasting from my configuration.yaml.
I looks like this
When you put them in an entities card
I wonder if someone could help me, Is it possible to get the data of the current output of the solar panels (dutch: huidige opbrengst van de zonnepanelen). I want to set an automation like this: if the output of the solar panels reach a certain value, it will enable another device…
All I can get is the current usage of the house. Also I can get the total export, that I don’t want. I want to have the current active export… Is there a way to get that?
Thanks
No, not without a device that measures the ‘huidige opbrengst van de zonnepanelen’ .
Your smart meter only measures what goes through it. You can try to see if your inverter has an integration in HA or you can buy something like this.
Also I can get the total export, that I don’t want. I want to have the current active export…
‘Active power’ goes negative if you export power. You can use that.
Thanks, so if I understand it correctly I need to set some input numbers only to make it work in my situation. Thanks
I have already managed to read out my monthly peak power from my homewizard P1.
http://192.168.x.x/api/v1/data
Fill in the correct IP and you get a nice JSON file.
However:
http://192.168.x.x/api/v1/telegram also gives the previous month peak with timestamp.
How can I read this in?
More specifically this line: (221231154500W)(03.713*kW)
date - hour - power
0-0:98.1.0(1)(1-0:1.6.0)(1-0:1.6.0)(230101000000W)(221231154500W)(03.713*kW)
/FLU5\253770234_A
0-0:96.1.4(xxxxx)
0-0:96.1.1(xxxxxx)
0-0:1.0.0(230129151719W)
1-0:1.8.1(001892.840*kWh)
1-0:1.8.2(002548.925*kWh)
1-0:2.8.1(005085.615*kWh)
1-0:2.8.2(002037.365*kWh)
0-0:96.14.0(0002)
1-0:1.4.0(00.004*kW)
1-0:1.6.0(230127074500W)(02.777*kW)
0-0:98.1.0(1)(1-0:1.6.0)(1-0:1.6.0)(230101000000W)(221231154500W)(03.713*kW)
1-0:1.7.0(00.029*kW)
1-0:2.7.0(00.000*kW)
1-0:21.7.0(00.029*kW)
1-0:22.7.0(00.000*kW)
1-0:32.7.0(234.2*V)
1-0:31.7.0(002.21*A)
0-0:96.3.10(1)
0-0:17.0.0(999.9*kW)
1-0:31.4.0(999*A)
0-0:96.13.0()
0-1:24.1.0(003)
0-1:96.1.1(xxxxx)
0-1:24.4.0(1)
0-1:24.2.3(230129151553W)(04209.663*m3)
!02E3`Preformatted text`
Thx
You could try modifying the regex to get that value: Capacity tariff Flanders (Belgium) - Extra data-objects, telegram change · Issue #150 · DCSBL/python-homewizard-energy · GitHub.
I can read al files, exept the long value.
If I read ‘0-0:98.1.0’ I just get ‘1’
If I read ‘1-0:1.6.0’ I get ‘230127074500W’
I’d like to get '(3.713*kW).
- platform: rest
authentication: basic
scan_interval: 15
resource: http://192.168.5.4/api/v1/telegram
name: "piekvermogen_vorige_maand"
unique_id: piekvermogen_vorige_maand
state_class: measurement
value_template: "{{ (value|regex_findall_index('0\\-0\\:98\\.1\\.0\\([0-9.]*')).split('(',1)[-1].strip() }}"
I’m trying to replicate the graph in the energy dashboard to a apexcard so you’re able to do more with it.
the million-dollar question is, how is the gas graph calculated in the energy dashboard? anyone knows?
getting close but still far away.
Recently @frenck and I have been working hard on the HomeWizard Energy integration. Many things around error handling and stability have been addressed and a lot of new features have been added. You can now, if the smart meter supports this, read things such as volts and frequency.
For Belgian users, a very important sensor is now also available: Peak demand. With these sensors you can see the average of the current quarter and maximum usage of this month and act on it. You could keep your peak as low as possible with automations.
For those who would like to use the products without cloud and app: You can now also turn off the cloud connection via the UI with a simple switch. With this they work fully locally. You will then not be bothered by the annoying red flashing light if you block the connection with a firewall.
Make sure you have Home Assistant 2023.2 or later and that the HomeWizard products are up-to-date, the latter will happen automatically if they are connected to the cloud.
Learn more about all features here: HomeWizard Energy - Home Assistant