Repository navigation
feat: configurable startup Test Target (EMMA / SUN2000 / Custom) - #13
Merged
Merged
Conversation
…oses #12, closes #8 The boot Modbus liveness check is no longer hard-wired to the EMMA (MODBUS_FIXED_ID / MODBUS_TEST_REG). A "Test Target" subsection inside "Modbus TCP target" (both /config and the Setup portal) lets the user: - pick a device profile: EMMA, SUN2000 or Custom - enable/disable the startup check (the ICMP ping toll always stays) - set the 4 request fields: Unit ID, function code, start register and register count. Presets lock everything but the Unit ID; Custom makes all of them free and shows a responsibility warning. Values persist in NVS; when missing (upgrade from 6.0-0) they default to the EMMA values, so behaviour is unchanged until modified. The check now accepts the requested function's normal reply or its exception (FC | 0x80). Reply text parsing is shared and bounds-checked (the menu test and scanner could read past the PDU buffer). The scanner also probes ID 255, which the loop skipped. /api/status exposes the target settings. Firmware bumped to 6.1-0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
include customization to specify the modbus TCP id ports related with suport multiple inverters.
#12
Closed
CI was resolving the latest espressif32 (Arduino core 3.x), which breaks the build (char8_t literals, ETH/esp_mac API changes). Pin the version validated on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 tasks
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.
Closes #12
Closes #8
Summary
The boot Modbus liveness check (Toll 2) is no longer hard-wired to the EMMA. A new Test Target subsection inside Modbus TCP target — available both in
/configand in the initial Setup portal — lets the user configure it:FC | 0x80). With FC03/FC04 the ASCII text read is shown as device model; otherwiseFCnn-OK.Persistence / migration
Stored in NVS (
tgtProf,tstOn,tstId,tstFc,tstReg,tstCnt). When missing (upgrade from 6.0-0) they default to the EMMA values, so behaviour is unchanged until modified. Survives reboots and USB/OTA flashing.Other changes
/api/statusaddstarget_profile,startup_check,test_unit_id,test_function,test_register,test_reg_count.Test plan
pio run -e esp32_usbbuilds with no new warningsEMMA-SA4H,WAITING)/configrenders the Test Target subsection/api/statusafter reboot🤖 Generated with Claude Code