I’ve been fine tuning my solar algorithm and found some interesting things i’d like to share on this topic
there is the need to make small step approximation when the calculations of candidate EVSE Amps is close to the real consumption
The car (2013 MK2 Nissan Leaf) takes as much as 40 seconds to start charging. since my algorithm only relies on the total installation consumption there are unwanted peaks at each start, as seen on the image below and that were fixed:
the car takes some time to change amps and the meter more time to detect changes, the energy meter is updating every 5seconds and i found that i had to prevent consecutive changes to the EVSE.
The final result is better than i expected as shown below on a cloudy day:
the last tweak was to implement the corner case of having to choose between minimizing import or export. The latter was chosen, I prefer to use all of the sun’s direct energy and import some energy from the grid. And the final result is this:
I had to add a calibration multiplier because even though the adjustment was almost self calibrating it both lagged (a bit like you say) and also in some edge cases would bounce around the target PWM but never converge.This will account for the difference between the CT readings on the emonTX and the car’s idea of the current (at whatever voltage it is seeing).
I apply this at the very last step before outputting the PWM value so that any other “fiddles” I do, like winter/summer allowances etc., do not affect this roughly constant number.
I created a set of node-red buttons that increased or decreased the calibration by 0.01% and then, while charging, moved it around until the whole thing just “clicked” into sync - in my case about a 0.96 (96%) multiplier.
Awsome node red sketch, I’ve been playing with it and have got it working with my Enphase PV Envoy.
The Envoy provides a json output which give all the data that an emon would provide.
It needed a few tweaks but as I don’t have a OpenESEV yet its all hypotetical to see if I could get the required data.
Is there a document for all the MQTT topics that are required?
Are they just
temp1
pilot
state
amp
wh
freeram
just not sure about mode (divertmode, divertmode/set) etc