I’ve been working on the node-red logic and with a new approach i was able to successfully charge my car at 6600W during lunch ( a critical hour, microwave-oven and washing machine working randomly), with 6900W contracted from the utility company. Only 300W of headroom!!
This is the new scheme:
So on top of the image there is a independent flow that collects Amperes from the house consumption that is stored in a global variabe to be used by other flows. To keep thing sane a timeout has to be implemented to reset the variable in case of a disaster.
Today this value is collected from a emonTx → RF → emonhub → separate Server with a rate of 10 secs
In the future i will want to update this value as quickly as possible, maybe every second.
The logic is triggered at every incoming message from the EVSE (10s) but i re-inject the same message to obtain a faster response. Also in the future i will need a refresh rate of 1msg/s.
If there is margin to increase the power, the increase will be limited to 2Amp / minute. This is much better than the previous “take all available power now” method, however a better algorithm is still needed to handle long high power activity periods, probably a back-off global timer can help.
Another interesting implementation is the fact that it can now handle multiple EVSE’s. Each EVSE can be assigned a name, that is used, among other things, to build the MQTT topic. Every EVSE connected will be routed to it’s own Node ID on emoncms, and is controlled independently by Node-RED. I’m thinking of defining a list of priorities so Node-RED can serve available power based on the priority of the EV. That would be sweet! My car would always charge faster than yours… lol!!