Skip to content
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

Smart charging communications add-ons to SteVe #4

Open
chuck-h opened this issue Nov 20, 2018 · 5 comments
Open

Smart charging communications add-ons to SteVe #4

chuck-h opened this issue Nov 20, 2018 · 5 comments

Comments

@chuck-h
Copy link
Owner

chuck-h commented Nov 20, 2018

This picks up application-specific changes to SteVe which support communication with an external smart charging logic module (e.g. load management). As suggested by @goekay at steve-community#92 (comment) (issue is now closed), meter value reporting to an external application can be inserted at the meter values routine.

4f3f2df implements a capability to publish amperage measurements in the simple JSON format used by emoncms. It is a "rough cut" which requires more development.

@goekay
Copy link

goekay commented Nov 21, 2018

if i may, i suggest an improved (in my humble opinion) version of MeasurementExportServiceImpl here.

some key differences:

  • post all values and not only the first
  • no assumptions about ampere, check it
  • send the timestamp of the recorded values (using alternative emoncms api)
  • use higher-level concepts for http calls
  • clear separation of tasks: first collect all data and then post all data.

i hope it helps.

@chuck-h
Copy link
Owner Author

chuck-h commented Nov 22, 2018

@goekay, thanks for the cleanup! Useful and educational!
With a couple of tweaks e415010 is working in my environment. Some notes:

  • The handling of multiple MeterValues in a message is useful in general (not necessarily for 'load management' function, though, which is real-time). I have not tested it.
  • Multiple CURRENT_IMPORT readings in a single SampledValue would legitimately occur in a 3 phase system (which the 'load management' function needs to track). My environment is single phase, so I haven't put much priority on this.
  • Multiple CURRENT_IMPORT readings in a single SampledValue could also occur if near-redundant measurements are made from several different Locations. We could either select a single location to report (based on a preference ordering) or report them all with appropriate labels.
  • I think the labelling inherent in the emoncms "fulljson" style may be useful. The "csv" style feels a bit more brittle.

@goekay
Copy link

goekay commented Nov 22, 2018

i am not particularly fond of the csv style either. but after looking at the api spec page, this was the only one allowing to send the time information. it felt a little uneasy to lose this information, since it is not guaranteed that ocpp metervalues are real-time. they can be real-time, a couple of minutes/hours in the past or even earlier (if the charging station did not have internet connection for a while). maybe they are real-time in your case and with your setup, though. i just wanted to generalize the implementation.

@chuck-h
Copy link
Owner Author

chuck-h commented Nov 28, 2018

At 8d9aede I have gone back to json format and put in code for three phase situations (not tested). The time information can be included with json data (not obvious from the api "spec by example" page, but see the code at https://github.com/emoncms/emoncms/blob/master/Modules/input/input_methods.php).

Working satisfactorily with emoncms:
image

@chuck-h
Copy link
Owner Author

chuck-h commented Dec 3, 2018

At 4498e88 I have a "rough cut" for an interface which allows the LoadManager application to send a current-limiting command to SteVe, SteVe generates an OCPP setChargingProfile message and sends it to the CP.
Functional test was successful with a Delta AC Mini charging station.
May be of interest to @goekay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants