Skip to content

Add Inverter Power switch for NEO inverters#188

Open
aseemann wants to merge 1 commit into
robertzaage:mainfrom
aseemann:neo-inverter-power-switch
Open

Add Inverter Power switch for NEO inverters#188
aseemann wants to merge 1 commit into
robertzaage:mainfrom
aseemann:neo-inverter-power-switch

Conversation

@aseemann

Copy link
Copy Markdown

Summary

Adds an Inverter Power switch entity to the NEO holding-register map. Writes register 0 with 1 = ON, 0 = OFF — the same command Growatt's cloud sends when the user taps the on/off button in ShinePhone.

This complements the existing output_power_limit (register 3), which can't reach a true off — the firmware enforces a ~30 W floor at 0 %.

Why

Users want a hard "disable inverter" trigger from Home Assistant automations (e.g. negative grid pricing, export caps). Register 3 alone can't do that; register 0 can.

How it was verified

  1. Captured the cloud→inverter traffic on s/33/<serial> while toggling ShinePhone's on/off button. The downlink frame is a standard PRESET_SINGLE_REGISTER write (function 0x06) to register 0 with value 0x0000 (off) or 0x0001 (on). Frame layout matches GroBro's existing GrowattModbusFunctionSingle.build_grobro output byte-for-byte.
  2. Built a standalone publisher that synthesizes the same frame from scratch; confirmed identical bytes against the capture.
  3. Verified the inverter accepts the command:
    • while logged in to ShinePhone ✓
    • while logged out of ShinePhone ✓
    • via direct MQTT publish on the local broker (no Growatt cloud involvement) ✓
  4. Verified that the HA discovery already wires type: switch end-to-end (precedent: NEXA Grid Power Allowed and the slot-enabled switches in growatt_nexa_registers.json). No Python changes required.

Tested with a Growatt NEO 800M-X (datalogger serial prefix QMN).

Notes / open follow-ups

  • After a write to register 0, GroBro's existing read-after-write path (ha/client.py:428-430) issues a READ_SINGLE_REGISTER on register 0. I haven't confirmed whether the inverter responds to that read; if it doesn't, the switch state may briefly show as unknown until the next manual toggle. The HA-side Inverter_Status sensor (StandbyStatus vs NormalStatus) reflects the real state regardless and can be used as an availability template if it matters.
  • The change is data-only (one JSON entry + a CHANGELOG.md note + a CONFIGURATION.md note in the Hardware Safety section). No code changes, no tests touched.

Test plan

  • Pull the branch, restart GroBro.
  • In HA, see a new switch.<serial>_inverter_power entity.
  • Toggle off → inverter Pac drops to 0 within ~10 s.
  • Toggle on → inverter resumes producing.
  • (Maintainer) verify the EEPROM-wear note in CONFIGURATION.md is worded appropriately for register 0 — happy to adjust if you have better info.

Exposes a new "Inverter Power" switch via the NEO holding-register map.
Writes register 0 with 1 = ON, 0 = OFF — the same command Growatt's cloud
sends when the user taps the on/off button in ShinePhone.

Complements `output_power_limit` (register 3), which can't reach a true
off because the firmware enforces a ~30 W floor at 0 %.

Verified against a NEO 800M-X with GroBro running standalone (no Growatt
cloud session required). Frame matches GroBro's existing
GrowattModbusFunctionSingle builder byte-for-byte, so no Python changes
are needed — mirrors the existing NEXA "Grid Power Allowed" switch
pattern.
@robertzaage

Copy link
Copy Markdown
Owner

@Lisugu00, sorry for bothering you again, but do you know if writing to holding register 0 causes any EEPROM wear?

@robertzaage

Copy link
Copy Markdown
Owner

@aseemann Thanks for your PR! 😊 Let's wait for a confirmation, if using this register in automations is EEPROM safe.

@robertzaage robertzaage self-assigned this May 28, 2026
@robertzaage robertzaage added enhancement New feature or request documentation Improvements or additions to documentation labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants