Skip to content

Usage Guide

This guide covers practical ways to use your P1MeterKit in Home Assistant, including Energy Dashboard setup, automation examples, and dashboard tips.

Quick Start

After installation, your P1MeterKit provides these key entities:

Energy Entities

EntityUse For
Energy Consumed Tariff 1Low tariff consumption — use for Energy Dashboard
Energy Consumed Tariff 2High tariff consumption — use for Energy Dashboard
Energy Produced Tariff 1Solar feed-back low tariff — use for Energy Dashboard
Energy Produced Tariff 2Solar feed-back high tariff — use for Energy Dashboard
Power ConsumedCurrent power usage (W)
Power ProducedCurrent solar production (W)
Electricity TariffCurrent active tariff (1 or 2)

Gas Entity

EntityUse For
Gas ConsumedTotal gas consumption — use for Energy Dashboard

Home Assistant Energy Dashboard

The Energy Dashboard gives you beautiful visualizations of your energy consumption and production.

Adding Electricity Consumption

  1. Go to SettingsDashboardsEnergy
  2. Under Electricity grid, click Add Consumption
  3. Add both tariff entities:
    • Energy Consumed Tariff 1 (low tariff)
    • Energy Consumed Tariff 2 (high tariff)
  4. Click Save

Adding Solar Production

If you have solar panels:

  1. Under Electricity grid, click Add Return to grid
  2. Add both tariff entities:
    • Energy Produced Tariff 1
    • Energy Produced Tariff 2
  3. Click Save

Adding Gas Consumption

  1. Under Gas Consumption, click Add Gas Source
  2. Select Gas Consumed entity
  3. Click Save

After ~5 minutes, your data will appear in the Energy Dashboard!


Automation Examples

1. High Power Usage Alert

Alert when power consumption is unusually high:

yaml
alias: "Energy - High power alert"
trigger:
  - platform: numeric_state
    entity_id: sensor.p1meterkit_power_consumed
    above: 5000  # More than 5kW
    for:
      minutes: 5
action:
  - service: notify.mobile_app
    data:
      title: "⚡ High Power Usage"
      message: "Current power: {{ states('sensor.p1meterkit_power_consumed') }}W"

2. Solar Production Notification

Get notified when your solar panels are producing well:

yaml
alias: "Solar - Good production alert"
trigger:
  - platform: numeric_state
    entity_id: sensor.p1meterkit_power_produced
    above: 3000  # More than 3kW production
condition:
  - condition: time
    after: "10:00:00"
    before: "16:00:00"
action:
  - service: notify.mobile_app
    data:
      title: "☀️ Solar Power!"
      message: "Producing {{ states('sensor.p1meterkit_power_produced') }}W - great solar day!"

3. Low Tariff Appliance Notification

Remind to run appliances during low tariff:

yaml
alias: "Energy - Low tariff started"
trigger:
  - platform: state
    entity_id: sensor.p1meterkit_electricity_tariff
    to: "1"  # Low tariff
action:
  - service: notify.mobile_app
    data:
      title: "💰 Low Tariff Started"
      message: "Good time to run dishwasher, washing machine, or charge EV!"

4. Power Failure Alert

Get notified of power failures:

yaml
alias: "Energy - Power failure detected"
trigger:
  - platform: state
    entity_id: sensor.p1meterkit_electricity_failures
action:
  - service: notify.mobile_app
    data:
      title: "⚠️ Power Failure Detected"
      message: "Total failures recorded: {{ states('sensor.p1meterkit_electricity_failures') }}"

5. Solar-Based Boiler Control

Turn on boiler when solar production is high:

yaml
alias: "Boiler - Solar-based control"
trigger:
  - platform: state
    entity_id: sensor.p1meterkit_power_produced
action:
  - choose:
      # High solar production - turn on boiler
      - conditions:
          - condition: numeric_state
            entity_id: sensor.p1meterkit_power_produced
            above: 2000
        sequence:
          - service: switch.turn_on
            target:
              entity_id: switch.boiler
      # Low solar production - turn off boiler
      - conditions:
          - condition: numeric_state
            entity_id: sensor.p1meterkit_power_produced
            below: 500
        sequence:
          - service: switch.turn_off
            target:
              entity_id: switch.boiler

6. Daily Energy Report

Send a notification with your daily energy usage:

yaml
alias: "Energy - Daily report"
trigger:
  - platform: time
    at: "21:00:00"
action:
  - service: notify.mobile_app
    data:
      title: "📊 Daily Energy Report"
      message: >
        Today's usage: {{ states('sensor.energy_daily') }} kWh
        Solar produced: {{ states('sensor.solar_daily') }} kWh

Note: You'll need to create utility meter helpers for daily tracking (see Dashboard section below).


Gas MBus Configuration

If your gas meter data is not showing in Home Assistant, the MBus ID might need to be changed.

How to Change the MBus ID

  1. Adopt the P1MeterKit in ESPHome

    • Go to Home Assistant → ESPHome addon
    • Click on your P1MeterKit device
    • Click Adopt if not already adopted
  2. Edit the configuration

    • Find the substitutions section at the top
    • Change gas_mbus_id from "1" to "2", "3", or "4":
yaml
substitutions:
  device_name: p1meterkit
  friendly_name: P1MeterKit
  gas_mbus_id: "2"  # Try 2, 3, or 4 if gas doesn't show
  1. Save and Install

    • Click Save then Install
    • Choose Wirelessly to update over-the-air
  2. Wait and Check

    • Gas data is updated hourly, so wait at least an hour
    • If still no data, try the next MBus ID

Why Different MBus IDs?

Your smart meter can have multiple devices connected via MBus. Each device has a unique ID (1-4). Most Dutch gas meters use ID 1, but Belgian and some other meters may use different IDs.


Dashboard Ideas

Creating Utility Meters

To track daily, weekly, and monthly consumption, create utility meter helpers:

  1. Go to SettingsDevices & ServicesHelpers
  2. Click Create HelperUtility Meter
  3. Configure:
    • Name: Energy Daily
    • Input sensor: sensor.p1meterkit_energy_consumed_tariff_1 (repeat for tariff 2)
    • Meter reset cycle: Daily
  4. Repeat for weekly and monthly

Energy Monitoring:

  • sensor.p1meterkit_power_consumed — Current power usage
  • sensor.p1meterkit_power_produced — Solar production
  • sensor.p1meterkit_energy_consumed_tariff_1 — Low tariff total
  • sensor.p1meterkit_energy_consumed_tariff_2 — High tariff total

Gas Monitoring:

  • sensor.p1meterkit_gas_consumed — Total gas

Voltage Monitoring:

  • sensor.p1meterkit_voltage_l1 — Voltage phase 1

Example Dashboard Card - Energy Overview

yaml
type: entities
title: ⚡ Energy
entities:
  - entity: sensor.p1meterkit_power_consumed
    name: Current Usage
  - entity: sensor.p1meterkit_power_produced
    name: Solar Production
  - entity: sensor.p1meterkit_electricity_tariff
    name: Active Tariff

Power Gauge Card

yaml
type: gauge
entity: sensor.p1meterkit_power_consumed
name: Current Power
min: 0
max: 10000
severity:
  green: 0
  yellow: 3000
  red: 6000
unit: W

History Graph - Daily Pattern

yaml
type: history-graph
title: Power Usage Today
entities:
  - entity: sensor.p1meterkit_power_consumed
  - entity: sensor.p1meterkit_power_produced
hours_to_show: 24

Best Practices

Power Requirements

  • DSMR v5 meters usually power the P1MeterKit via RJ12 cable
  • DSMR v4 meters require USB-C power
  • If LEDs flash rapidly, use USB-C power

Tariff Optimization

Use the Electricity Tariff entity to:

  • Run high-power appliances during low tariff (usually nights/weekends)
  • Charge EVs during cheap hours
  • Time dishwasher and washing machine cycles

Solar Optimization

Use Power Produced to:

  • Time high-consumption tasks when solar production is high
  • Control boiler or EV charging based on excess solar

ESPHome Configuration

For advanced users who want to customize the P1MeterKit firmware.

Adopting in ESPHome

  1. Go to Home AssistantESPHome addon
  2. Your P1MeterKit should appear — click Adopt
  3. Once adopted, you can edit the YAML configuration

Key Substitutions

yaml
substitutions:
  device_name: p1meterkit
  friendly_name: P1MeterKit
  gas_mbus_id: "1"  # Change to 2, 3, or 4 if gas doesn't show

Using GitHub Packages

Import directly from GitHub:

yaml
packages:
  smarthomeshop.p1meterkit: 
    github://smarthomeshop/p1meterkit/p1meterkit.yaml@main

Source Code


Common Use Cases

ScenarioKey EntitiesAutomation Ideas
Cost TrackingEnergy Consumed Tariff 1/2Calculate costs per tariff
Solar OptimizationPower ProducedControl boiler, EV charger
Appliance DetectionPower ConsumedDetect washing machine, dishwasher
Tariff SwitchingElectricity TariffNotify when cheap tariff starts
Power MonitoringVoltage, CurrentMonitor electrical supply quality
Gas TrackingGas ConsumedMonthly gas usage reports

Integration Ideas

Combine with Other SmartHomeShop Products

ProductCombined Use
WaterP1MeterKitAdd water monitoring
CeilSenseCorrelate presence with energy usage
WaterMeterKitSeparate water monitoring

Third-Party Integrations

  • Grafana: Detailed energy dashboards
  • InfluxDB: Long-term data storage
  • Node-RED: Complex automation flows
  • DSMR Reader: Alternative energy analysis tool

Need Help?