Hi Gary it all started here https://groups.google.com/g/weewx-user/c/ltOVkcY1fKc/m/7sQSVGN_AQAJ
we were using fixed value for the incoming grid line to calculate the consumption but it was not accurate enough so we added new sensor to read the grid incoming line voltage. earlier this formula worked consumption = ampere * 117 / 1000 * 0.88 but consumption = ampere * linevoltage / 1000 * 0.88 did not work the linevoltage input comes from different sensor than ampere, these two reading are generated in different loops, so based on Tom advice the weewx correction will not work thank you On Wednesday, October 18, 2023 at 1:28:55 AM UTC+3 gjr80 wrote: > So what does > > consumption = ((ampere * linevoltage) /1000) * 0.88 > > do? > > Gary > On Wednesday, 18 October 2023 at 08:26:25 UTC+10 [email protected] wrote: > >> Hi Tom >> >> we run weewx directly and found that 'ampere' & 'linevoltage' are in >> different loop because the data are coming from two different sensors by >> sdr.py driver. >> how we can combine these loops into one so weewx can process this >> formula, or what can we do to get this calculation done.? >> >> Thank you for your support >> >> On Tuesday, October 17, 2023 at 9:26:38 PM UTC+3 Tom Keffer wrote: >> >>> The only symbols that can be used in the [[Corrections]] formula are >>> other types in the archive record. So unless 'ampere', 'linevoltage', and >>> 'pf' all appear in the record, the correction will not work. >>> >>> On Tue, Oct 17, 2023 at 9:48 AM Mks Mk <[email protected]> wrote: >>> >>>> we want to improve the accuracy of our home energy monitor and we added >>>> new sensor to read the main line voltage so we got two sensors and the >>>> data >>>> is logged in weewx database. >>>> >>>> [[sensor_map]] >>>> >>>> ampere = current.***.EfPacket >>>> linevoltage = payload5.*****.RadioHeadASKPacket >>>> >>>> the database have these columns which we created >>>> >>>> consumption >>>> ampere >>>> linevoltage >>>> pf >>>> >>>> we want to calculate the energy consumption so we added this correction >>>> >>>> [StdCalibrate] >>>> >>>> [[Corrections]] >>>> # For each type, an arbitrary calibration expression can be >>>> given. >>>> # It should be in the units defined in the StdConvert section. >>>> # Example: >>>> foo = foo + 0.2 >>>> pf = 0.88 >>>> consumption = ((ampere * linevoltage) /1000) * pf >>>> >>>> unfortunately weewx did nothing nor it complained about it. can weewx >>>> process such formula? >>>> >>>> thanks >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "weewx-user" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/weewx-user/26effb7c-ad33-4de8-a9a0-f1390012ec5an%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/26effb7c-ad33-4de8-a9a0-f1390012ec5an%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a61c9c6e-fc72-4c29-a100-4d73c886a25cn%40googlegroups.com.
