Community
OpenEnergyMonitor

Community

Powerwall battery - measuring flow in and out

I had a Tesla Powerwall 2 installed yesterday, to complement my solar PV panels & EV car - all rather exciting. The Powerwall can store ~13.5kWh usable, with a max charge rate & max discharge rate of ~5.5kW. Unlike the solar panels I’m not sure it will ever be financially worthwhile, but it’ll be both interesting and fun to experiment.

I would like to be able to measure the amount of power that goes in to the battery separately from the amount that comes out - not just a net figure. Is this possible with a single CT sensor and if so what feed processes should I use?

If it is not possible, perhaps I could put one CT on the L wire and only allow it to measure flow in one direction, and another CT on the N wire & only allow it to measure flow in the other direction. But again, what would be the best processes to use?

Using 2 CTs would be second best as it would require a new emonTx, c/w ESP8266 etc etc.

TIA

Unless you have an earth fault, the current in the line and neutral (both are classed as “live” wires) is the same but, at any instant, flowing in opposite directions. So you will, or should in a proper installation, measure the same current in each.

If you’re talking about emonCMS, you do of course have the processes “Allow positive”, “Reset to zero”, “+ input” and “Allow negative”. Used in that order on the current/power input, you’re almost there. First “Allow positive” lets through only the positive power, you can then accumulate that to energy if you wish, and “Log to feed”, then “Reset to zero” to wipe the slate clean, retrieve the starting value with “+ input”, and do the same but with “Allow negative” to block the positive values you’ve already dealt with and allow only the negative values for accumulating & logging, etc.

If you want both charging and discharging to be positive numbers, either do “- input” and then “Allow positive” again, or do “×” with -1 as the operator after you’ve done the “Allow negative”.

All this pre-supposes you have the a.c. adapter input and you know the direction of power flow.

Many thanks indeed @Robert.Wall - extremely helpful. I think I have done as you described, but when I come to Save the processes I get an error message :persevere:

I’m afraid I can’t help - it saves for me (but then I’m using an old emonCMS).

Is it one particular process line that is causing the problem? You will need to gradually reduce the list to see if it is. Could be a bug (@TrystanLea).

Oops, no - it was my bad; clicking twice on Save creates an error, and I hadn’t realised I had done it. But all is now good.

But this brings me on to … "Is there a way of knowing how much energy is stored in a battery at any one time? Either in kWh or % "? The Tesla app gives a %age, but I’m not aware of any method of retrieving this info & inserting it in too emonCMS.

Similar setup here, just logging at the moment before developing further into some automation.

Julian / @haffle - you may well be way ahead of me but the Powerwall 2 local api allows certain data to be accessed - SOC is one of those that doesn’t require any authentication. try;

http://{your PW2 ip add} /api/system_status/soe

Shouldn’t need a JSON decoder, its a simple response on the lines of;

{“percentage”:95.89607322113966}

I’m assuming this, and other data accessible via the PW2 api could be captured into emoncms via a new device template, but i haven’t got around to doing that yet. if/when i do, i will share!

Hi Chris / @burble61 - thanks for that - perfect. Does your “teg-” SSID still broadcast on your wifi? My Powerwall last connected to my router ~10 days ago, and I can no longer see it; strange, as it reports through to the iOS app fine.