Community
OpenEnergyMonitor

OpenEnergyMonitor Community

New emonEVSE not obeying PV Divert

I am hoping someone can help. I had an emonEVSE installed at the beginning of this week. I have written a node script which gets the meter readings from my powerwall and publishes:

  • availableenergy/grid_ie
  • availableenergy/vrms.
    I have think I have configured it correctly because I see Grid Import/Export, Voltage, Available current, Smoothed current and either waiting for solar or charge current in the Session status box.

I am sure I must have configured something wrong but don’t know what it is. I suspect that something in the evse class is causing the commands issued by divert.cpp to be ignored. I do not have any other OpenEnergyMonitor products, so there shouldn’t be anything else interfering. As the car (VW ID.3) seems to wake up and draw the amount of current set I also assume this isn’t the problem.

Here is what I have found so far:
The values displayed seem to correspond with the logic in divert.cpp in the source code, but the charger charges at maximum rate without taking any notice of the charge current calculated by divert. As an example at present the divert values are:
Grid Import/Export: 661W
Voltage 249.2V
Available Current: 0.00A
Smoothed Current: 0.00A

Here is a screen shot taken at 18:00


I am currently using the time window to control if it charges or not, though I would like to just use the grid_ie to control this.
At the time this was taken the maximum current was set to 6A, but I have subsequently changed this to 32A.
If I set the time window to include the current time, the current rises to about 32A and Grid Import/Export goes up to about 8000W.
divert.cpp makes calls on a class evse, which is possibly declared in openevse.h. Unfortunately openevse.h (and openevse.cpp) are not in the repository so I cannot follow the logic to see what is happening.
So I have tried looking in the console window, which shows as follows when it starts charging.

There is a $AT command in a couple of places which doesn’t appear to be handled by rapi_proc.cpp in the open_evse repository.

Here is the result of 192.168.1.21/config
The site won’t let me upload attachments so the json response is pasted below:

{
  "firmware": "7.1.3.T2",
  "protocol": "-",
  "espflash": 4194304,
  "version": "4.0.1",
  "diodet": 0,
  "gfcit": 0,
  "groundt": 0,
  "relayt": 0,
  "ventt": 0,
  "tempt": 0,
  "service": 2,
  "scale": 220,
  "offset": 0,
  "mqtt_supported_protocols": [ "mqtt", "mqtts" ],
  "http_supported_protocols": [ "http", "https" ],
  "ssid": "",
  "pass": "",
  "www_username": "",
  "www_password": "",
  "hostname": "openevse-8eac",
  "sntp_hostname": "pool.ntp.org",
  "time_zone": "Europe/London|GMT0BST,M3.5.0/1,M10.5.0",
  "emoncms_server": "https://data.openevse.com/emoncms",
  "emoncms_node": "",
  "emoncms_apikey": "",
  "emoncms_fingerprint": "",
  "mqtt_server": "192.168.1.25",
  "mqtt_port": 1883,
  "mqtt_topic": "openevse",
  "mqtt_user": "",
  "mqtt_pass": "",
  "mqtt_solar": "",
  "mqtt_grid_ie": "availableenergy/grid_ie",
  "mqtt_vrms": "availableenergy/vrms",
  "mqtt_announce_topic": "openevse/announce/8eac",
  "ohm": "",
  "divert_PV_ratio": 1.1,
  "divert_attack_smoothing_factor": 0.4,
  "divert_decay_smoothing_factor": 0.05,
  "divert_min_charge_time": 600,
  "tesla_username": "",
  "tesla_password": "",
  "tesla_vehidx": -1,
  "flags": 1546,
  "emoncms_enabled": false,
  "mqtt_enabled": true,
  "mqtt_reject_unauthorized": true,
  "ohm_enabled": false,
  "sntp_enabled": true,
  "tesla_enabled": false,
  "divert_enabled": true,
  "pause_uses_disabled": false,
  "mqtt_protocol": "mqtt",
  "charge_mode": "eco"
}

You only have to ask - it will now. (And I’ve formatted the JSON output for you - 3 backticks ```JSON on a line with nothing else before the quote, and ``` on a line with nothing else after.)

Thank you Robert.

I was working on this late evening so thought it best to get everything recorded, rather than ask and do it the next day, sorry if that came across the wrong way.

It had occurred to me that the devices might need to be re-initialised after all the experiments I had done, so I restarted both this morning, but that makes no difference.

It now seems to be working correctly following taking the car out this morning. This involved unplugging it and plugging it in again whilst solar divert was enabled.

When I cam back and plugged it in it started charging at 11A, and gradually dropped as other loads came in. I have seen it stop charging and start again, so it is as simple as unplugging the car and plugging it in again.

Not quite happy with the plug/unplug solution, so I have tried all combinations of options and drawn up a table which shows what happens:
image
There is only one combination where PV divert is obeyed, which is to set PV divert and not set any timers. Also note that the behaviour of the stop/pause/clear button depends on other settings.

I have just pushed a bunch of fixes to the PV divert/timers give that a try, @glyn.hudson will probably do an official release in the not to distant future, but for now binaries can be downloaded from Merge branch 'master' of github.com:OpenEVSE/ESP32_WiFi_V3.x into jeremypoulter/issue147 · OpenEVSE/[email protected] · GitHub

Merged a few PRs I missed yesterday, probably not directly related to this issue but good to have anyway: Latest GUI · OpenEVSE/[email protected] · GitHub

V4.1.0 beta is now available for testing, a number of solar PV divert bugs should be fixed.

After updating the FW, your browser’s cache may need clearing to reload the web interface