the addition to  extensions.py worked this time.

regarding the data produced by the SDR driver is in agreement with the 
display ( the display shows "kw") 

[image: consum.png]

in weewx database these numbers are stored there (parts of these data are 
below)

dateTime     usUnits interval   electricity
1662544500    1    5    11.1180575
1662545100    1    5    3.4304875
1662545700    1    5    18.377194
1662546000    1    5    6.157195
1662546300    1    5    14.887015
1662546600    1    5    15.50398667
1662546900    1    5    11.88355667
1662547200    1    5    11.76374833
1662547500    1    5    11.74191333
1662547800    1    5    11.86812
1662548100    1    5    4.113761667
1662548400    1    5    20.969465
1662548700    1    5    0.551613333
1662549000    1    5    13.065745
1662549300    1    5    14.59239833
1662549600    1    5    3.075086667
1662549900    1    5    18.3986
1662550200    1    5    9.164375
1662550500    1    5    12.008095
1662550800    1    5    10.84667833
1662551100    1    5    14.874585
1662551400    1    5    0.549743333
1662551700    1    5    14.52300667
1662552000    1    5    0.55561
1662552300    1    5    7.805838333
1662552600    1    5    21.9475575
1662552900    1    5    8.644086
1662553200    1    5    13.64986333
1662553500    1    5    10.8020275
1662553800    1    5    13.393798
1662554100    1    5    11.498542

we need to calculate the monthly kw used and regarding the cost issue , 
excel with some future calibration to data should make it close enough for 
our like

thank you


On Wednesday, September 7, 2022 at 3:22:46 PM UTC+3 gjr80 wrote:

> My mistake, I forgot an import. Try adding the following line before the 
> extensions.py code I listed previously:
>
> import weewx.units
>
> As for what is being stored in WeeWX field electricity it's not clear to 
> me whether it is kW or kWh. The former is a measure of power and the latter 
> a measure of energy (or power used over a period of time) - quite different 
> things. Your first post was not clear, your second post seemed to confirm 
> it was kWh and the last post seems to indicate it is kW. You need a value 
> in kWh otherwise you Efergy display and WeeWX may agree, but your cost 
> calculation will be nonsense.
>
> Gary
>
> On Wednesday, 7 September 2022 at 21:45:00 UTC+10 [email protected] wrote:
>
>> The sensor signal contain Amps reading which is analyzed by *rtl_433* 
>> but we adjusted the *SDR driver* to convert and send *KW* instead, which 
>> is what the lcd display is showing and the *SDR driver* is sending KW 
>> reading to weewx every 20 seconds, we should have mentioned this earlier 
>> (our apology).
>>
>> the 1st part of Gary suggestion was added to current.inc but the 2nd part 
>> crashed weewx when we added the code to extensions.py
>> we stopped weewx and run it again but failed to start with following 
>> error:
>>
>> Sep  7 13:00:02 Mks systemd[1]: Starting LSB: weewx weather system...
>> Sep  7 13:00:02 Mks weewx[28024]: Starting weewx weather system: weewx
>> Sep  7 13:00:02 Mks weewx[28034]: Traceback (most recent call last):
>> Sep  7 13:00:02 Mks weewx[28034]:   File "/usr/share/weewx/weewxd", line 
>> 29, in <module>
>> Sep  7 13:00:02 Mks weewx[28034]:     import user.extensions
>> Sep  7 13:00:02 Mks weewx[28034]:   File 
>> "/usr/share/weewx/user/extensions.py", line 20, in <module>
>> Sep  7 13:00:02 Mks weewx[28034]:     weewx.units.USUnits['group_energy'] 
>> = 'kilo_watt_hour'
>> Sep  7 13:00:02 Mks weewx[28034]: NameError: name 'weewx' is not defined
>> Sep  7 13:00:02 Mks weewx[28035]:  failed!
>> Sep  7 13:00:02 Mks systemd[1]: weewx.service: Control process exited, 
>> code=exited, status=1/FAILURE
>> Sep  7 13:00:02 Mks systemd[1]: weewx.service: Failed with result 
>> 'exit-code'.
>>
>> we appreciate you all for your usual help and support.
>> On Wednesday, September 7, 2022 at 1:46:32 PM UTC+3 [email protected] 
>> wrote:
>>
>>> [email protected] schrieb am Mittwoch, 7. September 2022 um 05:01:53 
>>> UTC+2:
>>>
>>>> yes it is kilowatt-hours (kw) the kit is made by efergy
>>>
>>>
>>> kilowatt-hours and kw is not the same.
>>>
>>> power: kilowatt kW 
>>> energy: kilowatt-hours kWh 
>>>
>>> It is essential to know what of them the device supplies, because the 
>>> calculation is quite different if you have one or the other. In case it is 
>>> *energy* (in kilowatt-hours kWh) you need to sum up the values as said 
>>> by Tom and Gary. In case it is *accumulated energy* (in kilowatt-hours 
>>> kWh, too) you need to calculate the difference as described by Tom and 
>>> Gary, too. In case it is *power* you need to *integrate* the readings 
>>> over time to get the total energy. The latter can be done by 
>>> energy_integral aggregation type provided by the weewx-GTS extension.
>>>
>>>

-- 
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/ba51f61e-785e-4e2a-ac61-9c7dfa7f166en%40googlegroups.com.

Reply via email to