marstek-venus-rs485-node-red icon indicating copy to clipboard operation
marstek-venus-rs485-node-red copied to clipboard

p1 sensor not working after updating config.yaml file

Open berndh1979 opened this issue 1 year ago • 4 comments

Hi,

Trying to get this nice marstek control working in HA. I've done all the steps so far, but got stuck on the p1 meter setting. I have a HomeWizard P1 meter in HA and is working nicely. I've updated the HW p1 meter in the config file as such:

# This file contains config for Home Assistant unique to your installation and should not be overwritten with each update of House Battery Control
# It should be included in the main configuration.yaml file as a `package` via `!include_dir_named` https://www.home-assistant.io/docs/configuration/packages/.
# Use the values below as a `template` for your specific needs

template:
  - sensor:
      # Example: sensor for single-phase power meter
      #- name: "L1 Meter Power"
      #  unique_id: "l1_meter_power"
      #  unit_of_measurement: "W"
      #  device_class: "power"
      #  state_class: "measurement"
      #  state: >
      #    {% set consumption = states('sensor.p1_meter_energy_import') | float(0) %}
      #    {% set production = states('sensor.p1_meter_energy_export') | float(0) %}
      #    {{ (consumption - production) | round(2) }}

      # House battery control | Grid power
      # Your P1 meter indicates the power drawn or returned to grid.
      # This "P1 meter power" sensor acts as an alias for you power sensing configuration and is used throughout the node-RED scripts.
      - name: "Grid Power"
        unique_id: "p1_meter_power"
        state: "{{ states('sensor.p1_meter_vermogen_fase_1') }}" # << SET YOUR GRID POWER SENSOR HERE
        unit_of_measurement: "W"
        device_class: "power"
        state_class: "measurement"

When I look in any of my dashboards for the sensor.p1_meter_vermogen_fase_1 it nicely shows the reading in Watts.

However, I do not have the newly created sensor.p1_meter_power in the sensor list and that is hampering the Marstek Control dashboard to show the p1 meter reading.

What am I doing wrong here??

Thanks in advance.

berndh1979 avatar Nov 04 '25 10:11 berndh1979

Hi berndh1979,

Nice to have you trying out this package. Have you tried reloading or even restarting your HA instance? For more support, join our user group at https://discord.gg/RJXVusvEEf

gitcodebob avatar Nov 06 '25 21:11 gitcodebob

Hoi,

Proberen om deze mooie marstek-besturing te laten werken in HA. Ik heb tot nu toe alle stappen gedaan, maar kwam vast te zitten op de p1-meterinstelling. Ik heb een HomeWizard P1 meter in HA en werkt goed. Ik heb de HW p1-meter in het configuratiebestand als zodanig bijgewerkt:

# This file contains config for Home Assistant unique to your installation and should not be overwritten with each update of House Battery Control
# It should be included in the main configuration.yaml file as a `package` via `!include_dir_named` https://www.home-assistant.io/docs/configuration/packages/.
# Use the values below as a `template` for your specific needs

template:
  - sensor:
      # Example: sensor for single-phase power meter
      #- name: "L1 Meter Power"
      #  unique_id: "l1_meter_power"
      #  unit_of_measurement: "W"
      #  device_class: "power"
      #  state_class: "measurement"
      #  state: >
      #    {% set consumption = states('sensor.p1_meter_energy_import') | float(0) %}
      #    {% set production = states('sensor.p1_meter_energy_export') | float(0) %}
      #    {{ (consumption - production) | round(2) }}

      # House battery control | Grid power
      # Your P1 meter indicates the power drawn or returned to grid.
      # This "P1 meter power" sensor acts as an alias for you power sensing configuration and is used throughout the node-RED scripts.
      - name: "Grid Power"
        unique_id: "p1_meter_power"
        state: "{{ states('sensor.p1_meter_vermogen_fase_1') }}" # << SET YOUR GRID POWER SENSOR HERE
        unit_of_measurement: "W"
        device_class: "power"
        state_class: "measurement"

Als ik in een van mijn dashboards kijk naar de sensor.p1_meter_vermogen_fase_1, toont deze mooi de meting in Watts.

Ik heb echter niet de nieuw gemaakte sensor.p1_meter_power in de sensorlijst en dat belemmert het Marstek Control-dashboard om de p1-meterstand weer te geven.

Wat doe ik hier verkeerd??

Alvast bedankt.

sensor.p1_meter_vermogen. Deze moet je hebben.

dannyro-hub avatar Nov 12 '25 15:11 dannyro-hub

Heb je de configuratie opgeslagen en opnieuw ingeladen via ontwikkelhulpmiddelen > herstart > herladen?

Dit is de meest voorkomende reden.

Kom anders even buurten op de discord. Daar zijn meer mensen die je verder kunnen helpen. https://discord.gg/RJXVusvEEf

gitcodebob avatar Nov 12 '25 17:11 gitcodebob

Discovered cause. The template->sensor->name property is used to generate the handle in HA, not the unique_id. This has been fixed in version 4.1

gitcodebob avatar Jan 09 '26 22:01 gitcodebob