PM1v2 Setup Guide

Pigtail.Supply.Example
Pigtail.Supply.Example

You can alternately use an external receptacle with the same pigtail junction method.

Pigtail.Reference.Example
Pigtail.Reference.Example

L3 follows the same pattern

Dashboard import take control prompt

dashboard_import:
  package_import_url: github://gelidusresearch/grpm2/grpm2.6c.yaml@main
  import_full_config: true
substitutions:
  device_name: grpm2
  device_type: ESP32-C6-H4
  device_comment: Power Meter
  disp_name: GRPM2
  update_time: 15s
  line_frequency: 60Hz
  gain_pga: 1X

  # SPI CS Pins
  main_spi_cs_pin: GPIO23
  riser1_spi_cs_pin: GPIO0
  riser2_spi_cs_pin: GPIO1
  riser3_spi_cs_pin: GPIO2
  riser4_spi_cs_pin: GPIO3
  riser5_spi_cs_pin: GPIO10

  # Chip IDs
  main_chip_id: IC1
  riser1_chip_id: IC2
  riser2_chip_id: IC3
  riser3_chip_id: IC4
  riser4_chip_id: IC5
  riser5_chip_id: IC6

  # MainBoard CT and Line Names
  phase_a_ct_name: CT1
  phase_b_ct_name: CT2
  phase_c_ct_name: CT3
  phase_a_line_name: L1
  phase_b_line_name: L2
  phase_c_line_name: L3
  
  # MainBoard Calibration Values (adjust these for your installation)
  phase_a_voltage_cal: 4200
  phase_b_voltage_cal: 4200
  phase_c_voltage_cal: 4200
  phase_a_current_cal: 14200
  phase_b_current_cal: 14200
  phase_c_current_cal: 14200
  enable_gain_calibration: true
  enable_offset_calibration: true

packages:
  remote_package_files:
    url: https://github.com/gelidusresearch/grpm2
    files:

#********************************************************
# For advanced configuration options and custom CT grouping examples,
# see: https://github.com/gelidusresearch/grpm2/blob/main/grpm2.use.example.yaml

      - path: packages/grpm2.atm90e32.yaml
        vars:
          chip_id: ${main_chip_id}
          spi_cs_pin: ${main_spi_cs_pin}
          unit_name: MainBoard
      - path: packages/grpm2.atm90e32.yaml
        vars:
          chip_id: ${riser1_chip_id}
          spi_cs_pin: ${riser1_spi_cs_pin}
          unit_name: Riser1
          phase_a_ct_name: CT4
          phase_b_ct_name: CT5
          phase_c_ct_name: CT6
          phase_a_line_name: L4
          phase_b_line_name: L5
          phase_c_line_name: L6
          phase_a_voltage_cal: 4200
          phase_b_voltage_cal: 4200
          phase_c_voltage_cal: 4200
          phase_a_current_cal: 14200
          phase_b_current_cal: 14200
          phase_c_current_cal: 14200
          
#********************************************************
# Enable advanced power quality features for board(s)

      - path: packages/grpm2.atm90e32.pq.yaml
        vars:
          chip_id: ${main_chip_id}
          unit_name: MainBoard

GRPM2 Captive Portal Join 1
GRPM2 Captive Portal Join 2

GRPM2 Captive Portal Join 3

# You Home Assistant API
# The password is a UUID key the is a tool to generate them, this is compiled into the 
# firmware and is used by HA to encrypt all data over the net.
#
# https://esphome.io/guides/security_best_practices
#
# Read the BP and configure your esphome secrets file
# Top right on the ESPHome dashboard 

api:
  encryption:
    key: "ADC89tJWsIx84Q94VemUGmT9/SgiQLl+LBRjS0X7XG8="

# The OTA password very important too, don't let some one flash you devices
# You can use a key  
ota:
  - platform: esphome
    password: "91a704ac3898391a88db7245bd2fe6a2"
  - platform: web_server
# If you have the web based OTA enabled then be sure to set up an admin user and password  

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  output_power: 20.5
  enable_btm: True
  enable_rrm: True
 
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  
  ap:
    ssid: "Gdo1 Fallback Hotspot"
    password: "3Fb8dhZFVIgO"
  
# Example configuration entry, unfortunately its not SSL capable yet 
web_server:
  port: 80
  auth:
    username: !secret web_server_username
    password: !secret web_server_password  

Select 1 entry

Select the gear icon

Select the Info Icon

Copy the TLV and edit the GRPM1v2 YAML as shown in this example. We need to remove/comment any Wifi component YAML and the other components which cannot connect via IPv6

#wifi:
#  ap:
#    ap_timeout: 15s

#captive_portal:

#improv_serial:

network:
  enable_ipv6: True

openthread:
  tlv: 4a0300000d0e0800000000000300000f35060004001fffe002084c1ccf276e7da4bf0708fdbfbfa49e5
  device_type: FTD
  
text_sensor:
  - platform: version
    name: ESPHome Version
    hide_timestamp: true
  - platform: openthread_info
    ip_address:
      name: "Thread IP Address"
    channel:
      name: "Thread Channel"
    role:
      name: "Thread Device Role"
    network_name:
      name: "Thread Network Name"
    pan_id:
      name: "Thread PAN ID"