ha-puzzles / evcc-grafana-dashboards

Grafana Dashboards for EVCC
17 stars 2 forks source link

Fehlednde Datenpunkte #34

Closed Michel83 closed 1 month ago

Michel83 commented 1 month ago

Hi,

ich muss schon wieder nerven.

Ich habe grade festgestellt das mir ein Datenpunkte fehlt:

image

image

gibt es eine Möglichkeit diese zu überprüfen oder neu anlegen zu lassen.

Hier auch meine Meter:

pv1
---
Power:  597W
Energy: 4205.5kWh

WallboxGarage
-------------
Power:  1W
Energy: 1025.9kWh

pv3
---
Power:  0W
Energy: 589.7kWh

grid
----
Power:          -21W
Energy:         1866.4kWh
Current L1..L3: 2.67A 0.42A 0.3A
Voltage L1..L3: 227V 227V 227V
Power L1..L3:   -83W 42W 20W

BatterieBerechnet
-----------------
Power: 0W

PvBatterie
----------
Power:    -88W
Energy:   589.7kWh
Soc:      43%
Capacity: 5.0kWh

pv2
---
Power:  122W
Energy: 521.5kWh

Heizstab
--------
Power:  142W
Energy: 976.6kWh

Hier auch nochmal der Script:

aggregateDay() {
    ayear=$1
    amonth=$2
    aday=$3

    logInfo "`printf "%04d" $ayear`-`printf "%02d" $amonth`-`printf "%02d" $aday`: Aggregating daily metrics."

    writeDailyEnergies "all" "value" "pvPower" "pvDailyEnergy" $ayear $amonth $aday "AND value < 20000"
    writeDailyEnergies "all" "value" "homePower" "homeDailyEnergy" $ayear $amonth $aday "AND value < 20000"
    writeDailyEnergies "all" "value" "chargePower" "carDailyEnergy" $ayear $amonth $aday "AND value < 20000"
    writeDailyEnergies "all" "value" "chargePower" "loadpoint1DailyEnergy" $ayear $amonth $aday "AND ("loadpoint"::tag = '${LOADPOINT_1_TITLE}') AND value < 20000"

    if [ "$LOADPOINT_2_ENABLED" == "true" ]; then
        writeDailyEnergies "all" "value" "chargePower" "loadpoint2DailyEnergy" $ayear $amonth $aday "AND ("loadpoint"::tag = '${LOADPOINT_2_TITLE}') AND value < 20000"

    else
        logDebug "Loadpoint 2 is disabled."
    fi

    if [ "$LOADPOINT_3_ENABLED" == "true" ]; then
        writeDailyEnergies "all" "value" "chargePower" "loadpoint3DailyEnergy" $ayear $amonth $aday "AND ("loadpoint"::tag = '${LOADPOINT_3_TITLE}') AND value < 20000"
    else
        logDebug "Loadpoint 3 is disabled."
    fi
        writeDailyEnergies "positives" "value" "gridPower" "gridDailyEnergy" $ayear $amonth $aday "AND value < 20000"
        writeDailyEnergies "negatives" "value" "gridPower" "feedInDailyEnergy" $ayear $amonth $aday "AND value < 20000"

    if [ "$HOME_BATTERY" == "true" ]; then
        writeDailyEnergies "positives" "value" "batteryPower" "dischargeDailyEnergy" $ayear $amonth $aday "AND value < 20000"
        writeDailyEnergies "negatives" "value" "batteryPower" "chargeDailyEnergy" $ayear $amonth $aday "AND value < 20000"
    else
        logDebug "Home battery aggregation is disabled."
    fi
}

Grüße

cschlipf commented 1 month ago

Sieht so aus, als würde es ein Problem in Deinem angepassten Script in der Funktion aggregateMonth() geben. Alle Aggregationen, die nach den Loadpoints kommen, fehlen hier. Also alles ab dieser Zeile:

https://github.com/ha-puzzles/evcc-grafana-dashboards/blob/b01adf2ca45a4d6a44a9d2f28d9fa42f3131f6b6/scripts/evcc-influx-aggregate.sh#L252

Kannst Du mal Deine angepasste aggregateMonth() Funktion hier posten? Bitte als Code formatiert.

Michel83 commented 1 month ago

Dein Support ist echt der Hammer !

aggregateMonth() {
    ayear=$1
    amonth=$2

    logInfo "`printf "%04d" $ayear`-`printf "%02d" $amonth`: Aggregating monthly metrics."

    writeMonthlyEnergies "value" "pvDailyEnergy" "pvMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "homeDailyEnergy" "homeMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "carDailyEnergy" "carMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "loadpoint1DailyEnergy" "loadpoint1MonthlyEnergy" $ayear $amonth 
        if [ "$LOADPOINT_2_ENABLED" == "true" ]; then
    writeMonthlyEnergies "value" "loadpoint2DailyEnergy" "loadpoint2MonthlyEnergy" $ayear $amonth
    else
        logDebug "Loadpoint 2 is disabled."
    fi

    if [ "$LOADPOINT_3_ENABLED" == "true" ]; then
        writeMonthlyEnergies "value" "loadpoint3DailyEnergy" "loadpoint3MonthlyEnergy" $ayear $amonth
    else
        logDebug "Loadpoint 3 is disabled."
    fi
}

###############################################################################
### MAIN
###############################################################################
parseArguments $@
cschlipf commented 1 month ago

Joah... das ist dann klar. Du hast hier den Rest der Funktion entfernt ;-).

Füge mal wieder die Zeilen 252-260 ein: https://github.com/ha-puzzles/evcc-grafana-dashboards/blob/b01adf2ca45a4d6a44a9d2f28d9fa42f3131f6b6/scripts/evcc-influx-aggregate.sh#L252-L260

Danach bitte die Aggregation der Jahre nochmal neu starten - dann sollten die Datenpunkte wieder da sein.

Michel83 commented 1 month ago

wie auch immer das passieren konnte.......

aggregateMonth() {
    ayear=$1
    amonth=$2

    logInfo "`printf "%04d" $ayear`-`printf "%02d" $amonth`: Aggregating monthly metrics."

    writeMonthlyEnergies "value" "pvDailyEnergy" "pvMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "homeDailyEnergy" "homeMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "carDailyEnergy" "carMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "loadpoint1DailyEnergy" "loadpoint1MonthlyEnergy" $ayear $amonth
        if [ "$LOADPOINT_2_ENABLED" == "true" ]; then
    writeMonthlyEnergies "value" "loadpoint2DailyEnergy" "loadpoint2MonthlyEnergy" $ayear $amonth
    else
        logDebug "Loadpoint 2 is disabled."
    fi

    if [ "$LOADPOINT_3_ENABLED" == "true" ]; then
        writeMonthlyEnergies "value" "loadpoint3DailyEnergy" "loadpoint3MonthlyEnergy" $ayear $amonth
    else
        logDebug "Loadpoint 3 is disabled."

    fi

        writeMonthlyEnergies "value" "gridDailyEnergy" "gridMonthlyEnergy" $ayear $amonth
        writeMonthlyEnergies "value" "feedInDailyEnergy" "feedInMonthlyEnergy" $ayear $amonth

    if [ "$HOME_BATTERY" == "true" ]; then
        writeMonthlyEnergies "value" "dischargeDailyEnergy" "dischargeMonthlyEnergy" $ayear $amonth
        writeMonthlyEnergies "value" "chargeDailyEnergy" "chargeMonthlyEnergy" $ayear $amonth
    else
        logDebug "Home battery aggregation is disabled"
    fi
}
cschlipf commented 1 month ago

Hab mir mal erlaubt die Einrückungen zu korrigieren. Mir rollen sich sonst die Fußnägel auf ;-)

aggregateMonth() {
    ayear=$1
    amonth=$2

    logInfo "`printf "%04d" $ayear`-`printf "%02d" $amonth`: Aggregating monthly metrics."

    writeMonthlyEnergies "value" "pvDailyEnergy" "pvMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "homeDailyEnergy" "homeMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "carDailyEnergy" "carMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "loadpoint1DailyEnergy" "loadpoint1MonthlyEnergy" $ayear $amonth

    if [ "$LOADPOINT_2_ENABLED" == "true" ]; then
        writeMonthlyEnergies "value" "loadpoint2DailyEnergy" "loadpoint2MonthlyEnergy" $ayear $amonth
    else
        logDebug "Loadpoint 2 is disabled."
    fi
    if [ "$LOADPOINT_3_ENABLED" == "true" ]; then
        writeMonthlyEnergies "value" "loadpoint3DailyEnergy" "loadpoint3MonthlyEnergy" $ayear $amonth
    else
        logDebug "Loadpoint 3 is disabled."
    fi

    writeMonthlyEnergies "value" "gridDailyEnergy" "gridMonthlyEnergy" $ayear $amonth
    writeMonthlyEnergies "value" "feedInDailyEnergy" "feedInMonthlyEnergy" $ayear $amonth

    if [ "$HOME_BATTERY" == "true" ]; then
        writeMonthlyEnergies "value" "dischargeDailyEnergy" "dischargeMonthlyEnergy" $ayear $amonth
        writeMonthlyEnergies "value" "chargeDailyEnergy" "chargeMonthlyEnergy" $ayear $amonth
    else
        logDebug "Home battery aggregation is disabled"
    fi
}
Michel83 commented 1 month ago

Kein Problem, läuft grade durch dauert gefühlt zumindest schon mal länger.

Michel83 commented 1 month ago

Alles Funktioniert, Danke.