-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the PyEvJosev module to replace the JsCarV2G module #261
Conversation
8ea6a5b
to
7086e55
Compare
|
0b28cfb
to
3517d17
Compare
@SebaLukas what about EVSlac side? Are you working on it? Thanks |
@sdrabb we are working on it :) |
6ba456e
to
3dfc4e7
Compare
For PnC testing I will provide a extra pnc config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments, depending on if we want to postpone these issues or not, this PR can be approved or not
JOSEV_WORK_DIR = Path(__file__).parent / '../../3rd_party/josev' | ||
sys.path.append(JOSEV_WORK_DIR.as_posix()) | ||
|
||
from iso15118.evcc import EVCCHandler | ||
from iso15118.evcc.controller.simulator import SimEVController | ||
from iso15118.evcc.evcc_config import EVCCConfig | ||
from iso15118.evcc.everest import context as JOSEV_CONTEXT | ||
from iso15118.shared.exificient_exi_codec import ExificientEXICodec | ||
from iso15118.shared.settings import set_PKI_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer having this solved differently / we need to come up with a best practice how external python modules are distributed to the system
- either by copying them directly
- or by pip
- wheels?
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest | ||
import logging | ||
import netifaces | ||
|
||
from everest.framework import log | ||
|
||
from iso15118.evcc.evcc_config import EVCCConfig | ||
from iso15118.shared.utils import load_requested_protocols | ||
|
||
class EverestPyLoggingHandler(logging.Handler): | ||
|
||
def __init__(self): | ||
logging.Handler.__init__(self) | ||
|
||
def emit(self, record): | ||
msg = self.format(record) | ||
|
||
log_level: int = record.levelno | ||
if log_level == logging.CRITICAL: | ||
log.critical(msg) | ||
elif log_level == logging.ERROR: | ||
log.error(msg) | ||
elif log_level == logging.WARNING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is, I guess, exactly the same as in the EVSE part. I'd prefer removing this duplication by creating a shared library for this inside 'everest-core/lib' - again we would need to think on how to package and distribute/install that later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same code
Those are both good points. However, I would not solve them in this PR, but first discuss them and then possibly solve them in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, please rebase and squash
812720b
to
627a79e
Compare
627a79e
to
86d2186
Compare
Converted to draft, SIL is not working at the moment for ISO. This branch should fix SIL before merging |
5a4cbc4
to
96bf365
Compare
Signed-off-by: Sebastian Lukas <sebastian.lukas@pionix.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split the AC and DC nodered flows into two seperate files, this is less confusing
Please test with this PR: Integration of the EVCC from Josev into EVerest