Add Inverter Power switch for NEO inverters#188
Open
aseemann wants to merge 1 commit into
Open
Conversation
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.
Owner
|
@Lisugu00, sorry for bothering you again, but do you know if writing to holding register 0 causes any EEPROM wear? |
Owner
|
@aseemann Thanks for your PR! 😊 Let's wait for a confirmation, if using this register in automations is EEPROM safe. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
s/33/<serial>while toggling ShinePhone's on/off button. The downlink frame is a standardPRESET_SINGLE_REGISTERwrite (function0x06) to register 0 with value0x0000(off) or0x0001(on). Frame layout matches GroBro's existingGrowattModbusFunctionSingle.build_grobrooutput byte-for-byte.type: switchend-to-end (precedent: NEXAGrid Power Allowedand the slot-enabled switches ingrowatt_nexa_registers.json). No Python changes required.Tested with a Growatt NEO 800M-X (datalogger serial prefix
QMN).Notes / open follow-ups
ha/client.py:428-430) issues aREAD_SINGLE_REGISTERon 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-sideInverter_Statussensor (StandbyStatusvsNormalStatus) reflects the real state regardless and can be used as an availability template if it matters.CHANGELOG.mdnote + aCONFIGURATION.mdnote in the Hardware Safety section). No code changes, no tests touched.Test plan
switch.<serial>_inverter_powerentity.Pacdrops to 0 within ~10 s.CONFIGURATION.mdis worded appropriately for register 0 — happy to adjust if you have better info.