Powerwall battery - measuring flow in and out

What you have at present is:
Positive power and energy from H3-Powerwall logged (2 feeds) to H3-Powerwall_pos & H3-Powerwall_pos_kWh.
Negative (converted to positive) power and energy from H4-Powerwall logged (again 2 feeds) to H3-Powerwall_neg & H3-Powerwall_neg_kWh.

What is the feed house: H4-Powerwall? I can’t see where you create that. Worse, you appear to have mixed up H3 & H4. If H4 is what I think it is, I can’t see what relevance it is and how it can become negative - so I expect the H3-Powerwall_neg… feeds to be zero.
Could this be why…

What you should have as step 1 in the H3-Powerwall process list is a Log to feed (“H3-Powerwall_nett” ?) and all the rest move down one step. Then it’s that feed you should be using in what will now be step 6.

Timing. There can be problem with timing when you use +input, hence the recommendation to use +feed . I’m not sure of the exact mechanism, @pb66 will be able to tell you.

Thanks again, @Robert - and yes I had transposed H3 & H4 :cold_face:

Once again I seem to be making life far too complicated, and I have probably been recording data that I really didn’t need. So I have come up with a slightly revised plan which, hopefully, will record the following …

Total Imported power H1-House_IN_kWh
Total Exported power H1-House_OUT_kWh
Total power consumed **?????????**

Total power IN to Powerwall H2-Powerwall_IN_kWh
Total power OUT of Powerwall H2-Powerwall_OUT_kWh [NB: Over time these will almost cancel each other out.]
Total power provided by the Powerwall **???????????**

Total PV Generation G3-Panels_kWh
.
.
In preparing this I had drafted the following Feeds, but am now getting a bit lost, and I am not quite sure what the two nett feeds will give me. Thoughts?

For CT H1
Log to Feed … H1-House_nett
Power to kWh … H1-House_nett_kWh
Reset to ZERO
Allow Positive …
Log to Feed … H1-House_IN
Power to kWh … H1-House_IN_kWh
Reset to ZERO …
Allow Negative …
x … -1
Log to Feed … H1-House_OUT
Power to kWh … H1-House_OUT_kWh

For CT H2
Log to Feed … H2-Powerwall_nett
Power to kWh … H2-Powerwall_nett_kWh
Reset to ZERO
Allow Positive …
Log to Feed … H2-Powerwall_IN
Power to kWh … H2-Powerwall_IN_kWh
Reset to ZERO …
Allow Negative …
x … -1
Log to Feed … H2-Powerwall_OUT
Power to kWh … H2-Powerwall_OUT_kWh

For CT G3
Log to Feed … G3-Panels
Power to kWh … G3-Panels_kWh

What does “consumed” mean here - used by the house and garage, excluding the Powerwall?

Assuming:
H1 +ve is import
H2 +ve is discharging
G3 +ve is generating

Total power consumed = H1 +H2 + G3
There’s a tiny error there because it’ll count the standby power to the PV when it’s dark.

Almost - you’ve got the charging efficiency that you must take into account - plus the control system losses - that 1% or so appears as heat during both charging and discharging.

is H2 +ve

“H1-House_nett” gives you the same as a meter without a ratchet to prevent it going backwards would give you, i.e. the actual instantaneous power flow, signed to indicate the direction.
“H2-Powerwall_nett” likewise gives you the instantaneous power flow, signed to indicate the direction - charge or discharge.
You still need them to be able to do the maths.

Indeed you are (have?)
Rather than trying to tell you what to change, I’ve edited it:

For CT H1
Log to Feed … H1-House_nett
Power to kWh … H1-House_nett_kWh
Reset to ZERO [WRONG - nothing will get through]
Allow Positive …
Log to Feed … H1-House_IN
Power to kWh … H1-House_IN_kWh
Reset to ZERO …
[Needs a +feed here]
+feed H1-House_nett
Allow Negative …
x … -1
Log to Feed … H1-House_OUT
Power to kWh … H1-House_OUT_kWh

For CT H2
Log to Feed … H2-Powerwall_nett
Power to kWh … H2-Powerwall_nett_kWh
Reset to ZERO [WRONG - nothing will get through]
Allow Positive …
Log to Feed … H2-Powerwall_IN
Power to kWh … H2-Powerwall_IN_kWh
Reset to ZERO …
[Needs a +feed here]
+feed H2-Powerwall_nett
Allow Negative …
x … -1
Log to Feed … H2-Powerwall_OUT
Power to kWh … H2-Powerwall_OUT_kWh

For CT G3
Log to Feed … G3-Panels
Power to kWh … G3-Panels_kWh

@Robert – that is amazing, Thank You! A fresh pair of eyes (& the additional knowledge!!) was just what I needed. I have created the feeds as you suggested, and my understanding is therefore…

H1-House_nett_kWh … gives me real time Grid power - whether imported or exported
H1-House_IN_kWh … gives me imported power - so should be approx what my supply meter shows
H1-House_OUT_kWh … gives me what I exported to the grid

H2-Powerwall_nett_kWh … gives me real time power in or out of the Powerwall
H2-Powerwall_IN_kWh … gives me power put in to the Powerwall
H2-Powerwall_OUT_kWh … gives me power taken out of the Powerwall – these last two will cancel each other out over time other than for losses caused by charging / discharging and some heat.
H2-Powerwall_nett_kWh will over time reveal / record the losses caused by charging / discharging & heat

G3-Panels_kWh … gives me solar production

:grinning: Happy :grinning:

Now to work out a way of showing kWh stored in the battery via the API. I’ve not yet experimented with Node-red or MQTT, but will try to do that shortly.

Erm…
Everything that’s gone through the “Power to kWh” integration process is ENERGY, not power.

1 Like

I had a gateway, powerwall and solar installed this week. The gateway is doing enough monitoring, so I shouldn’t need to duplicate sensors. However, I’d like to use my emonpi to capture the gateway data (solar, IO battery, consumption).

I’ve had a go with node-red, but am bashing my head against certificate errors (see GitHub - vloschiavo/powerwall2: Tesla Powerwall 2 - Local Gateway API documentation). Has anyone found a work around for getting data from a tesla gateway/powerwall?

To me using the gateway data solves the problem of how to setup your own sensors as all of that should already have happened.

Might I have a second opinion on where I am going wrong with these two sets of Feeds?

As far as I can see, the Feeds for House In / Out / Nett are structured in the same way as for Powerwall In / Out / Nett, and yet they are displayed differently in the graphs. In the House graph, the In & Nett are always the same (the blue line is behind the red), but in the Powerwall graph the In and Nett are mirror images.

TIA

I don’t know. Hopefully I’ll have enough energy this evening to look at getting this info direct from the gateway!

1 Like