Not trying to be a troll here, but the first question is elementary. Not sure how you've gone this far without knowing about variables and date grabbing functions. It is even discussed at the top of page 5.
As for your second, the answer was provided by Rob above in his code itself:
if ($msg == 140) { # this is a net metering message, and $value is net metering value in (IIRC) W averaged over the 5-minute interval
# consumption = (corresponding production) + net
}
else { # this is a production message, and $value is a production valuein (IIRC) W averaged over the 5-minute interval
}
the hardest part is in what he wrote next
>>> (One of) the (many) trick(s) involved herein is how you deal with calculating consumption from net and production... They do not necessarily arrive in the same packet (although they often do) nor does production (130) always arrive before net (140).
and the following paragraph about handling the kwh value provided in the dump about net, production, and corresponding production row dump.
good luck, there is a lot of critical technical discussion in the last couple pages I order to make this script your own.
As for your second, the answer was provided by Rob above in his code itself:
if ($msg == 140) { # this is a net metering message, and $value is net metering value in (IIRC) W averaged over the 5-minute interval
# consumption = (corresponding production) + net
}
else { # this is a production message, and $value is a production valuein (IIRC) W averaged over the 5-minute interval
}
the hardest part is in what he wrote next
>>> (One of) the (many) trick(s) involved herein is how you deal with calculating consumption from net and production... They do not necessarily arrive in the same packet (although they often do) nor does production (130) always arrive before net (140).
and the following paragraph about handling the kwh value provided in the dump about net, production, and corresponding production row dump.
good luck, there is a lot of critical technical discussion in the last couple pages I order to make this script your own.
Comment