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

Implementing a clock and schedule for minimum morning charge when in Solar mode. #52

Closed
scspijker opened this issue May 2, 2022 · 8 comments

Comments

@scspijker
Copy link

Description

Context: My car has a very large range (400km) and I only need about 80% (60kWh) per week to remain full.

I like the solar mode on SmartEVSE, only charging solar, I've though of a further improvement though.

Currently I just leave it in Solar mode all the time, and plug in everytime I park the car. This usually fills up the car (limited to 80%) to more than I need. Sometimes however, we have little sun for a lot of days, and my charge creeps down to 15%. Then I need to manually tell the charger to charge from grid, however, usually I think of this too late. I'd like to wake up in the morning to a minimum charge of 40%.

I think implementing a clock, and a rudimentary schedule would solve this issue. For example:

Set to solar mode
Set minimum morning charge level to xx%
Set minimum morning charge start time: 02:00 (after sundown, guaranteed in my place of residence).

Say the sun doesn't provide enough power to get my car up and over 40%, the SmartEVSE will start charging at 02:00 from grid power up to xx%, and then stop (unless solar power is available again).

This will make solar mode much more attractive during periods of low sun.

TL;dr

SmartEVSE in solar only mode.
Sun does not shine enough, car not charged above 40%.
SmartEVSE will start charging using grid power at night until 40% has been reached.

@scspijker
Copy link
Author

I'm an programmer myself (originally embedded), and am looking to buy a new charger. Do you think it would be possible for the SmartEVSE to implement a clock, and this schedule charging?

If so, I might buy a V3 and open up some pull requests 😁

@hyperbart
Copy link

This can be handled by using EVCC:
https://github.com/evcc-io/evcc
--> SmartEVSE/SmartEVSE-2#44

@scspijker
Copy link
Author

I'd rather not run a server at home for these things. I'm not really into home-automation. I like things to be self-sufficient.

Worth opening an issue in the -3 repo?

@mstegen
Copy link
Member

mstegen commented May 5, 2022

Hi,
Getting the state of charge level from the car through the cable, is unfortunately not possible. So we have to rely on external service to provide the soc. This will be different for every car manufacturer. Not sure if the ESP32 has enough power/memory to handle this, but i like the idea.

@scspijker
Copy link
Author

This may be possible with new OCCP 2.0 standards

@zharijs
Copy link

zharijs commented Mar 24, 2024

Throwing out some ideas -

  1. I'm looking into implementing OCCP in ESP - it's not trivial but seems possible. It would not help much with getting car data though, unless you have some connection from car to manufacturer and manufacturer would share the data through OCCP on internet.

OCCP is is more for controlling, configuring and "multiboxing" the charger network.

  1. Also I'm looking in to possibility of implementing PLC (as in power line communications not programmable logic controller) to read the charge state and vehicle statuses form vehicle directly.

You need a special hardware for that. Interface chip / module manufacturers are quite secretive about it but there are some modules available it seems. One I red a bit about was bridging PLC to UART. So ESP debug serial multiplexed by minimal glue logic, switched by USB voltage (I've done that with single SOT23-6 package for ESP8266 before) could be used to talk to it.

If anyone is interested in participation getting this implemented, I can share more of my findings in the field.

  1. About the schedule (RTC) - it should be simple fairly simple to implement system clock based RTC with periodic interrupts that would be set and corrected ever so often by NTP. Again - done that on 8266 before. The painful part would be to make the actual interface to configure the thing.

  2. Would it not be better to get the "charge authority" by reading/scraping Nordpool instead of preset RTC if you have your rate tied to exchange?

@bobosch bobosch transferred this issue from SmartEVSE/SmartEVSE-2 Mar 25, 2024
@mstegen
Copy link
Member

mstegen commented Mar 25, 2024

There is a thread about adding a modem to the SmartEVSE v3 here:
#25
With the modem it's possible to read the SOC of the car.

We are also planning on adding OCPP to the SmartEVSE once firmware version 3.5 is stable.

dingo35 added a commit that referenced this issue May 23, 2024
* Add Inverted Eastron kWh meter (#20)

Co-authored-by: Hans Dingemans <[email protected]>

* Read and display EV meter currents and use them to limit power to MaxCircuit (#21)

Co-authored-by: Hans Dingemans <[email protected]>

* Wifi debugging (#23)

* Add RemoteDebug for debugging over wifi

* Minimal code adaptions for debugging over wifi

* Add instructions for debugging over wifi

* Correct the default = production release

* Add useful debugging comment

Co-authored-by: Hans Dingemans <[email protected]>

* Code improvement3 (#24)

* evse.cpp: fixing reconnect after wifi disconnect (#32)

* evse.cpp: fixing reconnect after wifi disconnect

* evse.cpp: only reconnect when in normal wifi mode

* evse.cpp: improve wifi for weak signals

Co-authored-by: dingo35 <[email protected]>

* README.md: update docs with added functionality in 1.4.0 (#30)

* README.md: update docs with added functionality in 1.4.0

* README.md: wifi disconnect no longer known bug

Co-authored-by: dingo35 <[email protected]>

* evse.h: put compiletime in debug version string (#36)

Co-authored-by: dingo35 <[email protected]>

* index.html: make it pass validation of html checker + small layout change (#38)

Co-authored-by: dingo35 <[email protected]>

* modbus.cpp: add debug messages for sent packets (#41)

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: fix modbus overload when loadbalance disabled (#40)

* evse.cpp: fix modbus overload when loadbalance disabled

* evse.cpp: More elegant solution for incrementing ModbusRequest

Co-authored-by: dingo35 <[email protected]>

* evse.cpp, evse.h: comment out unused ChargeTimer (#37)

* evse.cpp, evse.h: comment out unused ChargeTimer

* evse.h, evse.cpp: remove unused ChargeTimer

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: Fix compiler warning (#44)

Co-authored-by: dingo35 <[email protected]>

* evse.h, OneWire.cpp: introduce FAKE_RFID for debugging without an RFI… (#45)

* evse.h, OneWire.cpp: introduce FAKE_RFID for debugging without an RFID reader

* evse.h: extend comments on how to use FAKE_RFID

Co-authored-by: dingo35 <[email protected]>

* evse.cpp, evse.h: read imported and exported energy from mainsmeter+e… (#39)

* evse.cpp, evse.h: read imported and exported energy from mainsmeter+evmeter and feed them to the API

* evse.cpp: Fix modbus bug

* evse.h: Undo debug settings

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: improve PP pin debug message (#59)

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: fix meter config bug when switching modes (#60)

Co-authored-by: dingo35 <[email protected]>

* Release/v1.4.0 merge (#52)

* Pipeline build for release branches

* Increased 'safety' temperature thressholds to 70 (#48)

* Features/increased temp safety menu (#49)

* Added max temp menu item

* Added max temp menu item

* Added EV Meter information

* Added EV meter details on status page

* Added EV meter details on status page

* Refactored API textual booleans into real booleans

* Hide EV/BATT widget by default

Co-authored-by: Koen Serneels <[email protected]>

Co-authored-by: dingo35 <[email protected]>
Co-authored-by: Hans Dingemans <[email protected]>
Co-authored-by: Koen Serneels <[email protected]>
@dingo35
Copy link
Collaborator

dingo35 commented May 31, 2024

As stated before, for this we need the SoC, which is not available in SmartEVSE-v3 ; if you have that information available in external software (e.g. via a HomeAssistant integration for your specific EV) you can automate this yourself in that software.

@dingo35 dingo35 closed this as completed May 31, 2024
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

5 participants