Open
Conversation
added 3 commits
December 4, 2024 12:14
Newer TENMA devices add the serial number to the identity string. This makes the previous string checks insufficient. Instead, we use a regex to match the fixed parts of the string.
Given that some devices return their serial number as part of their response to `get_identity`, we can now return the serial number for some these devices.
This flag reports the identity of the connected power supply and the serial number (if available).
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 #1
Adds support for devices with more complex responses to
get_identity.is_testeduse regular expressions to parse the response toget_identityget_serial_numberto return the serial number (if it could be captured)--identifyflag to cli to return the serial numberThis has been tested on the power supply I have. It should work on others, but I cannot test them.