dirkjanfaber / victron-vrm-api

Interface with the Victron Energy VRM API
MIT License
11 stars 5 forks source link

[BUG] Consumption results generated by API Call do not match results from VRM Portal #25

Open Bucket1616 opened 2 months ago

Bucket1616 commented 2 months ago

Description: When using the Node Red VRM API Node, to pull consumption data, the data received does not match the data seen in the VRM Portal.

To Reproduce: Create a Node Red Flow that pulls consumption data for a 24 hour period, with interval set to hour and dumps the data to a debug node. Compare the data received to that found on the VRM portal of the same installation. There is no correlation between the values on the interval basis nor the daily total.

Node Config: image

Expected Behavior: It is expected that the values would coincide, possible with some slight variation due to exact reporting minute used for each interval.

ScreenShots/Data: Attached are the reported data via Node Red and that from the VRM Portal: Consumption Message: {"_msgid":"51c0ea40d0c8bc83","payload":{"success":true,"records":[{"instance":0,"stats":{"consumption":[[1726232400000,2340.0627146176203,451.48500382741,3695.79197177776],[1726236000000,633.6783185120647,200.53703563658,1556.30866949656],[1726246800000,621.5253134838861,521.93499347846,733.65768744612],[1726250400000,548.02971855667,449.98365865676,669.8383395457299],[1726254000000,541.1812281283009,452.74266362294,621.32199379492],[1726257600000,550.0601352092624,484.8136607314,600.66165539781],[1726261200000,521.3295299424075,386.07800493436,600.8796688236],[1726264800000,449.58033829035,424.2216714301,467.74666887318],[1726200000000,354.97222222222246,275,438],[1726203600000,301.19444444444497,215,401],[1726207200000,362.72222222222246,288,406],[1726210800000,348.4722222222217,320,390],[1726214400000,368.11111111111086,283,406],[1726218000000,330.3846153846162,269,399.33333333333],[1726221600000,296.0335958888626,212.4959996359,325],[1726225200000,376.3990838408275,312.02632753623,438.75133549027],[1726228800000,403.9808630951141,326.04733296808,455.03934767469],[1726239600000,390.3878514469209,237.89335232099,477.20130997054],[1726243200000,386.54523236641086,320.19435554886,467.66433725897]]}}],"totals":[{"instance":0,"totals":{"consumption":10124.650760985538}}],"options":{}},"topic":"installations stats 241800"}

VRM Portal Data: image

There is no easy way to capture hourly data from the VRM Portal, however, the total listed at the bottom of the image is shown as 8.4kWh and is shown as 10,124 Wh in the Data (message). These were pulled at the same time.

Hardware: Cerbo GX

Software: victron-vrm-api version: 0.2.6 Venus OS Version: V3.40

Some additional datapoints: I re-tested for Solar Yield, Solar Yield Forecast and Consumption Forecast, and all of these were either the exact same or very close between the API reported data and the information displayed within the VRM Portal.

I also retested, with the following settings: image

and the results are even more wrong. The data reports back as: {"payload":{"success":true,"records":[{"instance":0,"stats":{"consumption":[[1726200000000,702.7907418259276,200.53703563658,3695.79197177776]]}}],"totals":[{"instance":0,"totals":{"consumption":702.7907418259276}}],"options":{}},"_msgid":"86ce4428aed8e7f6","topic":"installations stats 241800"}

702 total Wh (bolded)? Also, the 4 fields (that are not identified in the documentation), show as 1726200000000,702.7907418259276,200.53703563658,3695.79197177776.

I bring this up because it feels like a secondary bug to the first one identified.

Please let me know if any additional information is required. Mike

Head commented 4 days ago

Same here. Maybe the API is cached? I remember seeing the same data at the beginning or end of the day. The tomorrow data right now (at sunset) is on point. Today (past) data is completly off.