Add EVSE certificate injection and configuration file#159
Open
lho-stx wants to merge 17 commits intoSevenstax:masterfrom
Open
Add EVSE certificate injection and configuration file#159lho-stx wants to merge 17 commits intoSevenstax:masterfrom
lho-stx wants to merge 17 commits intoSevenstax:masterfrom
Conversation
jpo-stx
reviewed
Mar 10, 2023
Contributor
jpo-stx
left a comment
There was a problem hiding this comment.
Please rework the open points.
added 7 commits
June 26, 2023 09:12
added 2 commits
June 26, 2023 10:22
jpo-stx
requested changes
Aug 4, 2023
Contributor
Author
|
@jpo-stx all done, please review and merge |
jpo-stx
reviewed
Jan 22, 2024
Application.py
Outdated
| parser.add_argument('-r', '--role', type=str, choices=('EVSE', 'EV'), required=True, help='This is the role of the Whitebeet. "EV" for EV mode and "EVSE" for EVSE mode') | ||
| parser.add_argument('-c', '--config', type=str, help='Path to configuration file. Defaults to ./ev.json.\nA MAC present in the config file will override a MAC provided with -m argument.', nargs='?', const="./ev.json") | ||
| parser.add_argument('-r', '--role', type=str, choices=('EV', 'EVSE'), help='This is the role of the Whitebeet. "EV" for EV mode and "EVSE" for EVSE mode') | ||
| parser.add_argument('-c', '--config', type=str, help='Path to configuration file. Defaults to ./config.json.\nA MAC present in the config file will override a MAC provided with -m argument.', nargs='?', const="./config.json") |
Contributor
There was a problem hiding this comment.
I would prefer that command line arguments take precedence over configuartion files. This is more common for most applications.
jpo-stx
reviewed
Jan 22, 2024
| parser.add_argument('interface_type', type=str, choices=('eth', 'spi'), help='Type of the interface through which the Whitebeet is connected. ("eth" or "spi").') | ||
| parser.add_argument('-i', '--interface', type=str, required=True, help='This is the name of the interface where the Whitebeet is connected to (i.e. for eth "eth0" or spi "0").') | ||
| parser.add_argument('-m', '--mac', type=str, help='This is the MAC address of the ethernet interface of the Whitebeet (i.e. "{}").'.format(WHITEBBET_DEFAULT_MAC)) | ||
| parser.add_argument('-r', '--role', type=str, choices=('EVSE', 'EV'), required=True, help='This is the role of the Whitebeet. "EV" for EV mode and "EVSE" for EVSE mode') |
Contributor
There was a problem hiding this comment.
I think the required=True was removed unintentionally. The code checks with if(args.role == "EV"): and elif(args.role == 'EVSE'):, if the role parameter missing nothing will happen here and the application just exit.
jpo-stx
reviewed
Jan 22, 2024
Application.py
Outdated
| evse.loop() | ||
| print("EVSE loop finished") | ||
| #set the Whitebeet time | ||
| #evse.setTime() |
Contributor
There was a problem hiding this comment.
I think this should not be commented out, we need the time for checking the injected certificates.
jpo-stx
reviewed
Jan 22, 2024
| print("##############################################") | ||
| print("") | ||
| print("") | ||
| time.sleep(4) |
jpo-stx
reviewed
Jan 22, 2024
| print("Injecting Certificates!") | ||
|
|
||
| #print("EVSE OPEN OWN PATH") | ||
| #evse.openOwn() |
Contributor
There was a problem hiding this comment.
Why is this commented out?
jpo-stx
reviewed
Jan 22, 2024
| print("##########################") | ||
| self.addOwn() | ||
|
|
||
| time.sleep(2) |
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.
No description provided.