Repository navigation
Add SMAModbus.device_info() from the SMA profile type label - #175
Merged
Merged
Conversation
Reads Nameplate.Model/Vendor/SerNum/PkgRev from the SMA unit ID (default 3), so the serial identifies the same device as SMAWebConnect.device_info(). Move the packaged l10n loading into helpers so both transports translate the model and vendor tags the same way. Resync uv.lock to 1.1.8.
kellerza
approved these changes
Sep 30, 2026
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.
First step towards reading measurements over Modbus next to WebConnect: read the device info from SMA's own Modbus profile.
SMAModbus.device_info()reads the type label (Nameplate.Model, Vendor, SerNum and PkgRev at 30053–30059) fromsma_unit_id(default 3) and returns the sameDeviceInfoasSMAWebConnect.device_info(). The serial matches across both transports, so a client can check that a Modbus endpoint is the device it already knows. Modbus has no device name, soDeviceInfo's fallback name is used.0xFFFFFFFF, and tag values use the lower 24 bits with NaN0xFFFFFD. A unit that serves only NaN (unit 1 on an inverter) raisesSmaReadException.SmaReadException(exception response),SmaTimeoutExceptionandSmaConnectionException.SMAWebConnectintohelpers.load_l10n(), so both transports translate the model and vendor tags the same way. WebConnect behaviour is unchanged.uv.lockresynced to 1.1.8.Tested against a live STP5.0-3SE-40 (firmware 4.08.39.R):
DeviceInfo(type='SUNNY TRIPOWER 5.0 SE', manufacturer='SMA', sw_version='4.8.39.R'), the same values as WebConnect (with thesw_versionfix from the other PR).