uhi22 / pyPLC

Electric vehicle CCS charging investigations with Python
GNU General Public License v3.0
154 stars 35 forks source link

extend soc_callback hook with extra info #8

Closed arpiecodes closed 1 year ago

arpiecodes commented 1 year ago

This pull request aims to extend the soc_callback added by @ArendJanKramer. In a nutshell, it adds support for sending EVEnergyCapacity, EVEnergyRequest, and EVCCID values to the remote webhook.

I also added a fallback energy capacity configuration param to pyPLC.ini so you can also have the webhook contain an EnergyCapacity value even if the vehicle does not support this. That should provide the external EVSE controller with everything it needs to calculate the SoC.

I also renamed remaining_soc to current_soc and removed bulk_soc. If you like, I can refactor so we maintain backwards compatibility.

The changes in this pull request are tied to the pull request opened in https://github.com/serkri/SmartEVSE-3/pull/160.