feat(deye-svk): migrate deye-svk 0.2.0 from Blixt L1 registry - #94
Merged
Conversation
added 5 commits
August 18, 2026 10:18
Blixt L1 battery/hybrid drivers report their AC stage on
host.emit("inverter", ...) and feed available_charge_W /
available_discharge_W (battery) and available_import_W /
available_export_W (inverter) into the arbitrator clamp. L1 reads
those keys by exact name with no lowercase fallback, and the profile
already names Blixt as the emit-key reference — but the four keys were
missing from emit_keys.canonical, and the emit-type tests rejected
"inverter" outright because it is not a DER type.
Add the keys to the profile, document that inverter is a stream (the
device is still declared as ders: [battery]), and let the structure /
manifest-consistency tests accept the stream without listing it in
ders. No driver changes; the emit-fields tests already derive their
allowed set from the profile.
Signed-off-by: David Mozart <david@sourceful-labs.com>
Blixt L1's host.write is FC16 with count=1 (Deye ignores FC06 on some ranges) and exposes host.write_fc06 for true FC06; FTW's is FC06. The two hosts also disagree on how a failed write is reported: FTW returns an error string and never raises, Blixt returns true or raises. The test harness follows FTW, so a Blixt-only driver that trusts pcall's ok reads a mocked refusal as success. Document both, add write_fc06 to the profile's modbus group, and give the portable check. Signed-off-by: David Mozart <david@sourceful-labs.com>
test_signed_manifest_rejects_unsafe_runtime_fields mutated payload.drivers[0] and relied on it being read-only. The catalog is sorted by id, so the first control driver whose id sorts before abb_meter (any id starting with a digit) made the mutations hit a different, earlier check than the one under test. Select a read-only modbus.read-only entry explicitly. Signed-off-by: David Mozart <david@sourceful-labs.com>
konja-261-svk.lua + its manifest were staged by an over-broad git add; they belong to #95, not here. Signed-off-by: David Mozart <david@sourceful-labs.com>
Source: https://novacore-devnet.sourceful.dev/device-support/drivers/deye-svk/0.2.0 (byte-identical to blixt-gateway l1/drivers/deye-svk.lua). Catalog conformance changes, none touching the control path: - PROTOCOL + DRIVER header above the existing DRIVER_MANIFEST (sdm630/foxess pattern); community tier, control: true in the manifest, control_enabled stays false until the v2 gates pass. - Emit canonical W / inverter.W keys (Blixt L1 reads both spellings). - Poll reads go through a bounded per-block retry: after 3 misses in a row a block is left alone and re-probed periodically instead of costing a failed read every poll for the life of the session — the host counts each failed read against the poll. Blocks come straight back when they answer, so a bus hiccup cannot blind self-heal. - No battery emit when nothing answered: the previous 0 W / 0 % on a failed read was a fabricated reading (the same trap the SoC hold already existed for). - Portable write-result check (spec/host-api.md): Blixt L1 raises on a refused write, FTW returns an error string; the driver now sees both. - driver_default_mode (the unprompted, timer-driven revert path) stops reissuing a write the device has refused 3 times in a row and logs once; the explicit deinit command always attempts the revert, and any successful write resets the counter. Signed-off-by: David Mozart <david@sourceful-labs.com>
davmoz
force-pushed
the
migrate/deye-svk
branch
from
August 18, 2026 08:51
a97ad6f to
ce8a479
Compare
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
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.
Migration of a Blixt L1 control driver into the catalog. Depends on #89 (spec).
Driver: Deye three-phase hybrid (Modbus RTU) — lean single-read SvK fast-poll variant; Remote Mode control path verbatim from
deye@2.4.4.Source: the Blixt L1 driver source, version 0.2.0.
Catalog-conformance changes (none to the control path — arm/setpoint/safe-revert/slew/self-heal untouched):
PROTOCOL+DRIVERheader above the existingDRIVER_MANIFEST. Community tier; manifestcontrol: true;control_enabledstaysfalseuntil the control-v2 gates (lease, HIL, v2 entrypoints) are met.W/inverter.Wemit keys (Blixt L1 reads both spellings; headroom keys per spec: Blixt L1 headroom emit keys + inverter as reporting stream #89).test_absent_register_settles).0 W/0 %on a failed read was a fabricated reading.driver_default_mode(the unprompted, timer-driven revert) stops reissuing a write the device has refused 3× in a row and logs once (test_refused_write_settles); the explicitdeinitcommand always attempts the revert, and any successful write resets the counter.make checkgreen.Safety
Control driver, v1 entrypoints. Safe revert = existing
deinit_safe_revert(unchanged). No new write paths.control_enabled: false.Package or promotion evidence
Control enabled:
false. No package in this PR. Control activation is a separate change with default-mode, lease-expiry and HIL evidence.