-
Notifications
You must be signed in to change notification settings - Fork 118
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
OCPP - Event - Session - Fault Log #134
Comments
Can certainly look at this, may need to consider how much history is maintained. Should be ok from the point of view of not wearing out the flash, but maybe a future revision of the WiFI board should include an SD card slot? |
Agreed, It will depend on how much space is available for the logs and how
much space is used for each entry. We would not want to erase and rewrite
too often. Home stations would likely be less than one entry a day.
I am sure there is a better structured and more efficient way to do this...
But Something like this is 71 bytes
{"Start":202101121914,"Stop":202101130215,"Elapsed":601,"Energy":24342}
If we set aside 512KB of the 4MB Flash that would be a little more than
7200 Sessions or 20 years. That is probably a bit excessive to keep on
flash...
…On Wed, Feb 17, 2021 at 6:57 PM Jeremy Poulter ***@***.***> wrote:
Can certainly look at this, may need to consider how much history is
maintained. Should be ok from the point of view of not wearing out the
flash, but maybe a future revision of the WiFI board should include an SD
card slot?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#134 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN5QH7YJYQ4BNBLK3NNTTDS7RJXFANCNFSM4VB3WHNQ>
.
|
OCPP Charge Point operators require Fault and Event logs. Event, Session and Faults should be logged to Flash for display in the OpenEVSE Web portal, MQTT and OCPP. A entry in the log should be created any time the EVSE State changes or Temperature throttling starts/stops Type - Time - EVSE State - elapsed time - Pilot Current - energy - temperature - temperature max for the current session - Connector/Vehicle status - Divert mode Type Type OCPP should send status, Charger Fault and Events to OCPP provider. |
In terms of space there is actually not a lot of free flash, OTA requires the same flash space as the app, currently the flash map is:
So basically it is a section out of the 192K of the file system we have for storage, still can probably to a significant amount |
Okay, thank you for the hint, I definetly have to consider this. From the point of view of the OCPP library, there are internal events (like a successful transaction end) and external events (like throttling due to high temperature). And the same goes for the EVSE state. I think a human readable plain-text log is more suitable than a well-defined structured log. The format would look like this: This will lead to two additional functions in the API, To limit the size of the logs, the plain-text approach requires to chunk the log and delete the oldest chunk if some threshold is exceeded (like occupied memory). When uploading the logs to the server, the chunks will be concatenated to a single file. Do you agree with that approach or have any improvements in mind? |
@matth-x I have already started on this from a generic POV. I still think it makes sense to store as JSON lines, is just easier to extract the data back out that way, don't have to write a parser. We don't have to impose a strict format on this. Each record will have some common fields, but nothing to say they all have to have the same data (but probably will). |
I've just been testing the event log changes. The event log seems to work really well. I think the event log should be hidden away under 'advanced', what do you think @chris1howell? Also the Hardware section should probably be moved to the system tab. A minor issue is the event log doesn't fit on a mobile device screen very well. The fit could be improved by shortening the text e.g 'information' to 'info' |
I've been testing this for a week or so now. To begin with it seemed to work perfectly, however over the last couple of days it's been incorrectly displaying 0kWh as the session energy. The multiple plug / unplug events are due to me using a single EVSE to charge multiple EVs each evening and somtimes a topup during the day. Is there a limit to the size of the log? If I keep clicking 'show more' the log gets really long, and this is only from 1 week! Do you foresee any issues long term storing and writing all this data to ESP flash? I'm assuming there is a limit of X many lines of log entries? Also is this data available via an API? History
|
This is not entirely unexpected, the EV Connected/Charging states are at the beginning of the charging session so will normally be 0, the EV disconnected at the end so will have the charge for the session |
Is anyone else testing this? Could you confirm operation? Do you think this is ready for a stable release? @chris1howell |
Log and save each charge session to WiFi Flash.
Plug in - log Start date and time
Un-plug - log Stop date and time time, elapsed time and energy
Start, Stop, elapsed, energy
The text was updated successfully, but these errors were encountered: