-
Hi All, I have Vuegraf up and running and ran a import from the beginning of the year when I installed my Vue. I see the data in the database but for the life of me I am unable to create a query and show the same YTD usage as in the Emporia app. This is the query I'm working with: from(bucket: "vuegraf") Which results in 42000. The Emporia app shows 4808. I read the discussions about coversions but /3600 or /60000 doesnt get me anywhere close. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Is the app showing 4808 kWh or 4808 watts? I believe the "Day" metric needs to be divided by 1000 to convert from watts to kilowatts. For the discrepancy, it might be easier to diagnose if you look back 24 hours instead of the full year. Does the most recent "Day" record look reasonable? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick answer. When I take september or last week as the dataset, and /1000 it aligns with the data from the Vue app. Jan and Feb are off though where Vuegraf shows more than Emporia itself but the difference is not large enough to care about but enough to throw me off. For posterity, this query gives me an accurate kWh usage in the selected time range for the chosen device.
|
Beta Was this translation helpful? Give feedback.
-
Any chance you accidentally duplicated the data load for Jan and Feb by
running Vuegraf multiple times with the load history flag?
…On Tue, Oct 8, 2024 at 7:36 PM Erwin ***@***.***> wrote:
Thanks for the quick answer. When I take september or last week as the
dataset, and /1000 it aligns with the data from the Vue app. Jan and Feb
are off though where Vuegraf shows more than Emporia itself but the
difference is not large enough to care about but enough to throw me off.
For posterity, this query gives me an accurate kWh usage in the selected
time range for the chosen device.
from(bucket: "vuegraf")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "energy_usage")
|> filter(fn: (r) => r["device_name"] == v.Device)
|> filter(fn: (r) => (r["detailed"] == "Day"))
|> map(fn: (r) => ({ r with _value: (r._value / 1000.0)}))
|> group()
|> sum()
—
Reply to this email directly, view it on GitHub
<#165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD66M66RNMTDOBHYKMXFXYLZ2RT7RAVCNFSM6AAAAABPRDLWYSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBYGYYDMMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Not likely, I used the reset database flag when I did the history load a couple of days ago. January is 239 kWh in Emporia and 283 kWh in Vuegraf (installed the Emporia on Jan 20). If i query data from 1-20 Jan, vuegraf returns 42kWh that shouldn't be there. February is 583 kWh in Emporia and 553 kWh in Vuegraf |
Beta Was this translation helpful? Give feedback.
Thanks for the quick answer. When I take september or last week as the dataset, and /1000 it aligns with the data from the Vue app. Jan and Feb are off though where Vuegraf shows more than Emporia itself but the difference is not large enough to care about but enough to throw me off.
For posterity, this query gives me an accurate kWh usage in the selected time range for the chosen device.