-
Notifications
You must be signed in to change notification settings - Fork 2
fix(sungrow): a zero-power battery command is never refused #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ DRIVER = { | |
| id = "sungrow", | ||
| name = "Sungrow hybrid and string inverter", | ||
| manufacturer = "Sungrow", | ||
| version = "1.3.3", | ||
| version = "1.3.4", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After this version bump, Useful? React with 👍 / 👎. |
||
| protocols = { "modbus" }, | ||
| capabilities = { "pv", "battery", "meter" }, | ||
| description = "Sungrow hybrid and string inverters via Modbus.", | ||
|
|
@@ -413,7 +413,14 @@ function driver_command_v2(command) | |
| -- implement. Checking only for "string" left the gap: an SG inverter | ||
| -- whose device-type register never answered fell through and got the | ||
| -- writes. Matches drivers/lua/sungrow.lua, deliberately. | ||
| if model_family ~= "hybrid" and not battery_confirmed then | ||
| -- | ||
| -- Zero is exempt. It is not a dispatch but the host handing the | ||
| -- device back to itself, it arrives from the lifecycle rather than | ||
| -- the planner -- so before anything has been confirmed -- and a | ||
| -- device left in a forced state with no way to say stop is the worse | ||
| -- outage. On a string inverter the write fails at the Modbus layer | ||
| -- and costs nothing. | ||
| if inputs.power_w ~= 0 and model_family ~= "hybrid" and not battery_confirmed then | ||
| return { | ||
| status = "rejected", | ||
| code = "no_battery", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recipe still packages
targets/ftw-observe.lua, whoseDRIVER.versionremains1.3.2, so building this1.3.3package produces package metadata that disagrees with its runtime metadata.tools/driver_package.pyonly checks that a Lua version exists, and the removed test assertion now also masks this mismatch; bump the packaged Lua metadata and related pilot documentation or leave the recipe at1.3.2.AGENTS.md reference: AGENTS.md:L60-L62
Useful? React with 👍 / 👎.