How to setup feeds for My Solar PV Battery?

Good afternoon,

I recently installed solar PV (micro inverters), a Sigenstor battery, inverter and gateway.

Within the gateway I have three CTs:

  1. Grid connection
  2. Solar PV
  3. Battery

I believe that these are sufficient to support the info within the My Solar PV Battery app.

I searched and cannot find a summary describing how to setup the feeds. I followed the basic solar feeds guide, then added the battery config from another topic.

I planned to add ‘grid’ into the grid connection CT and realised that ‘use’ was doing the same thing in my config.

Is there a standard/ recommended way to configure this please? Once configured I propose to add a pull request to add something into the setup documentation and a new profile into the emoncms/device repos.

Thanks in advance

I don’t know the Apps at all well, but what you have there looks very wrong to me.

I think you need to treat the battery much as a second Grid connection. The Power3 (Batt) process list looks OK in itself - but for reasons I’ll explain below, you might need to move at least some of the other processing into there too.

What alarmed me was you are writing to emontx3:use (power) and emontx3:use_kwh (energy) from both power1 and power2. You can’t do that. Think of the Feed as boxes on a conveyor going past, one every 10 seconds. The second value to land in the box overwrites the first, and the first one is lost.

You need to rethink your processes in terms of all three inputs being processed sequentially; i.e. all the steps relating to CT1 get processed - and all the values calculated there become available for use in CT2’s process list, and when you do CT3’s process list, all the values from CT1 & CT2 are available. The catch is, the values for CTs 2 & 3 are available to CT1 processes but they are 10 seconds old. Beware. In step 3 of power1, that’s exactly what is happening with power2 input - it is old data. It is likely to show up as unexplained spikes on the graphs.

So what I recommend is, do all the adding and subtracting in the last list where a quantity you’re using in the maths has already been read (and probably logged to a feed).
For subtle reasons linked to this timing problem, it is also recommended you use the value of the Feed rather than the Input when fetching the number to add or subtract it.

If Grid import, Solar generation and Battery discharge are all positive numbers, then it looks to me as if Grid positive + Battery positive + Solar positive = use and this fits the description in MySolarBattery.

I think when you have sorted this out, what to allocate in MySolarBattery will be relatively straightforward. Solar, battery_charge and battery_discharge are clear, I presume battery_soc = battery_charge×efficiency - battery_discharge if it’s not available to you any other way, and might need tweaking in the light of experience; and I think solar_direct should be what you interpret it to mean - probably solar that does not contribute to battery charging and is not exported.

And yes, I’d support your call for proper documentation for all the Apps.

Hello @CDuffy if your using emoncms locally, try out the new MyElectricFlow app, it only needs 3 out of the following 4 power feeds:

  • solar generation,
  • house consumption,
  • battery power (positive discharge, negative charging)
  • grid (positive importing, negative exporting)

See: My Solar PV Battery app - #253 by TrystanLea

On a conceptual level this might help, the new app is designed to use the following measurement points:

The app expect to have a CT sensor / metering points (with the resulting power data just logged to a feed) on the following:

  • Solar PV generation
  • Battery (+ when discharging, - when charging)
  • Load
  • Grid (+ when importing, - when exporting)

For solar and battery systems, the app actually only need 3 out of 4 of these. It can calculate a missing metering point from the others:

GRID = USE - BATTERY - SOLAR
USE = GRID + BATTERY + SOLAR
BATTERY = USE - GRID - SOLAR
SOLAR = USE - GRID - BATTERY

The configuration interface looks like this:

Generating this:

and also integrated now is the tariff explorer:

The input processing requirements are simplified to just needing to log to feed on 3 CT sensors, which is way simpler!

Thanks for your help Robert, it highlights how disjointed my history of setup was!

I’ve been working through things and took a while to come to the same approach as Trystan proposes for “use”.

The original version of the feeds for the app were counterintuitive for me, with Trystan’s new app it introduces a convention where the monitored connection is +ve when it sends electricity and -ve when it receives electricity.

I took on board your suggestion to keep processing to a single feed and configured the attached which looks OK so far, I will check again tomorrow evening.

Thanks for the suggestion for SoC, the battery has a Modbus TCP service, once the basics are proven I’ll work on getting Modbus TCP working and sharing profiles etc

Thanks for the updates Trystan, they make things a lot simpler.

I now have the following configuration, I believe that the battery charge and discharge are no longer required for the new app, I’ve kept them as a potentially useful statistic elsewhere.

Once I have this and the TCP Modbus working I will submit a PR to add this into the devices templates etc, are there any preferred inputs for this? I think CT4 has been used for solar previously, should I swap to using this here for consistency? I’ll try working on some guidance documentation alongside this.