Newan / ioBroker.evcc

ioBroker Adapter to control your evcc instance
MIT License
10 stars 6 forks source link

Optimization of setState required #21

Closed obodeldog closed 8 months ago

obodeldog commented 1 year ago

If the poll interval rather small, so many setState requests and sometimes setObject requests are produced. E.g.:

> stateChange evcc.0.loadpoint.1.status.chargeConfigured
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeCurrent
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeCurrents
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeDuration
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargePower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeRemainingDuration
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeRemainingEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeTotalImport
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargedEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargerFeatureIntegratedDevice
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargerIcon
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.charging
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.connected
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.connectedDuration
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.enabled
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.guardAction
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.guardRemaining
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.hasVehicle
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.maxCurrent
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.minCurrent
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.minSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.mode
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phaseAction
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phaseRemaining
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phasesActive
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phasesConfigured
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phasesEnabled
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.planActive
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.priority
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.pvAction
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.pvRemaining
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionCo2PerKWh
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionPrice
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionPricePerKWh
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionSolarPercentage
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.targetEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.targetSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.targetTime
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.timerActive
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.timerProjectedEnd
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.timerSet
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.title
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleCapacity
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleDetectionActive
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleFeatureOffline
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleIcon
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleIdentity
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleOdometer
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehiclePresent
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleRange
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleTargetSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleTitle
instrument.ts:130 > stateChange evcc.0.status.auth
instrument.ts:130 > stateChange evcc.0.status.availableVersion
instrument.ts:130 > stateChange evcc.0.status.battery
instrument.ts:130 > stateChange evcc.0.status.batteryCapacity
instrument.ts:130 > stateChange evcc.0.status.batteryConfigured
instrument.ts:130 > stateChange evcc.0.status.batteryEnergy
instrument.ts:130 > stateChange evcc.0.status.batteryPower
instrument.ts:130 > stateChange evcc.0.status.batterySoc
instrument.ts:130 > stateChange evcc.0.status.bufferSoc
instrument.ts:130 > stateChange evcc.0.status.bufferStartSoc
instrument.ts:130 > stateChange evcc.0.status.currency
instrument.ts:130 > stateChange evcc.0.status.greenShare
instrument.ts:130 > stateChange evcc.0.status.gridConfigured
instrument.ts:130 > stateChange evcc.0.status.gridCurrents
instrument.ts:130 > stateChange evcc.0.status.gridPower
instrument.ts:130 > stateChange evcc.0.status.homePower
instrument.ts:130 > stateChange evcc.0.status.loadpoints
instrument.ts:130 > stateChange evcc.0.status.prioritySoc
instrument.ts:130 > stateChange evcc.0.status.pv
instrument.ts:130 > stateChange evcc.0.status.pvConfigured
instrument.ts:130 > stateChange evcc.0.status.pvEnergy
instrument.ts:130 > stateChange evcc.0.status.pvPower
instrument.ts:130 > stateChange evcc.0.status.residualPower
instrument.ts:130 > stateChange evcc.0.status.savingsAmount
instrument.ts:130 > stateChange evcc.0.status.savingsEffectivePrice
instrument.ts:130 > stateChange evcc.0.status.savingsGridCharged
instrument.ts:130 > stateChange evcc.0.status.savingsSelfConsumptionCharged
instrument.ts:130 > stateChange evcc.0.status.savingsSelfConsumptionPercent
instrument.ts:130 > stateChange evcc.0.status.savingsSince
instrument.ts:130 > stateChange evcc.0.status.savingsTotalCharged
instrument.ts:130 > stateChange evcc.0.status.siteTitle
instrument.ts:130 > stateChange evcc.0.status.smartCostLimit
instrument.ts:130 > stateChange evcc.0.status.smartCostType
instrument.ts:130 > stateChange evcc.0.status.sponsor
instrument.ts:130 > stateChange evcc.0.status.sponsorTokenExpires
instrument.ts:130 > stateChange evcc.0.status.tariffEffectivePrice
instrument.ts:130 > stateChange evcc.0.status.tariffFeedIn
instrument.ts:130 > stateChange evcc.0.status.tariffGrid
instrument.ts:130 > stateChange evcc.0.status.vehicles
instrument.ts:130 > stateChange evcc.0.status.version
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_nicht_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Einspeisung_Bezug_number
instrument.ts:130 > stateChange javascript.0.Energie.Hausverbrauch
instrument.ts:130 > stateChange javascript.0.Energie.Ins_Netz
instrument.ts:130 > stateChange javascript.0.Energie.Klima_freigabe
instrument.ts:130 > stateChange javascript.0.Energie.Wasserzaehlerstand
instrument.ts:130 > stateChange javascript.0.Energie.insNetz
instrument.ts:130 > stateChange javascript.0.Energie.nurBezug
instrument.ts:130 > stateChange javascript.0.Energie_insNetz
instrument.ts:130 > stateChange javascript.0.jsState
instrument.ts:130 > objectChange mielecloudservice.0.000712102353.ACTIONS.targetTemperatureZone-1
instrument.ts:130 > objectChange evcc.0.status.auth
instrument.ts:130 > stateChange evcc.0.status.auth
instrument.ts:130 > objectChange evcc.0.status.battery
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargeCurrent
instrument.ts:130 > stateChange evcc.0.status.battery
instrument.ts:130 > objectChange evcc.0.status.batteryCapacity
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeCurrent
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargeCurrents
instrument.ts:130 > stateChange evcc.0.status.batteryCapacity
instrument.ts:130 > objectChange evcc.0.status.batteryConfigured
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeCurrents
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargeDuration
instrument.ts:130 > stateChange evcc.0.status.batteryConfigured
instrument.ts:130 > objectChange evcc.0.status.batteryEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeDuration
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargePower
instrument.ts:130 > stateChange evcc.0.status.batteryEnergy
instrument.ts:130 > objectChange evcc.0.status.batteryPower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargePower
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargeTotalImport
instrument.ts:130 > stateChange evcc.0.status.batteryPower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargeTotalImport
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_nicht_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_nicht_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_invertiert
instrument.ts:130 > stateChange javascript.0.Energie.Batteriepower_nicht_invertiert
instrument.ts:130 > objectChange evcc.0.status.batterySoc
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargedEnergy
instrument.ts:130 > stateChange evcc.0.status.batterySoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargedEnergy
instrument.ts:130 > objectChange evcc.0.status.bufferSoc
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargerFeatureIntegratedDevice
instrument.ts:130 > stateChange evcc.0.status.bufferSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargerFeatureIntegratedDevice
instrument.ts:130 > objectChange evcc.0.status.bufferStartSoc
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.chargerIcon
instrument.ts:130 > stateChange evcc.0.status.bufferStartSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.chargerIcon
instrument.ts:130 > objectChange evcc.0.status.currency
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.charging
instrument.ts:130 > stateChange evcc.0.status.currency
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.charging
instrument.ts:130 > objectChange evcc.0.status.greenShare
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.connected
instrument.ts:130 > stateChange evcc.0.status.greenShare
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.connected
instrument.ts:130 > objectChange evcc.0.status.gridConfigured
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.connectedDuration
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.connectedDuration
instrument.ts:130 > stateChange evcc.0.status.gridConfigured
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.enabled
instrument.ts:130 > objectChange evcc.0.status.gridPower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.enabled
instrument.ts:130 > stateChange evcc.0.status.gridPower
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.guardAction
instrument.ts:130 > objectChange evcc.0.status.homePower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.guardAction
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.guardRemaining
instrument.ts:130 > stateChange evcc.0.status.homePower
instrument.ts:130 > objectChange evcc.0.status.loadpoints
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.guardRemaining
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.maxCurrent
instrument.ts:130 > stateChange evcc.0.status.loadpoints
instrument.ts:130 > objectChange evcc.0.status.prioritySoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.maxCurrent
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.minCurrent
instrument.ts:130 > stateChange evcc.0.status.prioritySoc
instrument.ts:130 > objectChange evcc.0.status.pv
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.minCurrent
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.minSoc
instrument.ts:130 > stateChange evcc.0.status.pv
instrument.ts:130 > objectChange evcc.0.status.pvConfigured
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.minSoc
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.mode
instrument.ts:130 > stateChange evcc.0.status.pvConfigured
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.mode
instrument.ts:130 > objectChange evcc.0.status.pvEnergy
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.phaseAction
instrument.ts:130 > stateChange evcc.0.status.pvEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phaseAction
instrument.ts:130 > objectChange evcc.0.status.pvPower
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.phaseRemaining
instrument.ts:130 > stateChange evcc.0.status.pvPower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phaseRemaining
instrument.ts:130 > stateChange javascript.0.Energie.Klima_freigabe
instrument.ts:130 > objectChange evcc.0.status.residualPower
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.phasesActive
instrument.ts:130 > stateChange evcc.0.status.residualPower
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phasesActive
instrument.ts:130 > objectChange evcc.0.status.savingsAmount
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.phasesConfigured
instrument.ts:130 > stateChange evcc.0.status.savingsAmount
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phasesConfigured
instrument.ts:130 > objectChange evcc.0.status.savingsEffectivePrice
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.phasesEnabled
instrument.ts:130 > stateChange evcc.0.status.savingsEffectivePrice
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.phasesEnabled
instrument.ts:130 > objectChange evcc.0.status.savingsGridCharged
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.planActive
instrument.ts:130 > stateChange evcc.0.status.savingsGridCharged
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.planActive
instrument.ts:130 > objectChange evcc.0.status.savingsSelfConsumptionCharged
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.priority
instrument.ts:130 > stateChange evcc.0.status.savingsSelfConsumptionCharged
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.priority
instrument.ts:130 > objectChange evcc.0.status.savingsSelfConsumptionPercent
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.pvAction
instrument.ts:130 > stateChange evcc.0.status.savingsSelfConsumptionPercent
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.pvAction
instrument.ts:130 > objectChange evcc.0.status.savingsSince
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.pvRemaining
instrument.ts:130 > stateChange evcc.0.status.savingsSince
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.pvRemaining
instrument.ts:130 > objectChange evcc.0.status.savingsTotalCharged
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.sessionCo2PerKWh
instrument.ts:130 > stateChange evcc.0.status.savingsTotalCharged
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionCo2PerKWh
instrument.ts:130 > objectChange evcc.0.status.siteTitle
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.sessionEnergy
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionEnergy
instrument.ts:130 > stateChange evcc.0.status.siteTitle
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.sessionPrice
instrument.ts:130 > objectChange evcc.0.status.smartCostLimit
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionPrice
instrument.ts:130 > stateChange evcc.0.status.smartCostLimit
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.sessionPricePerKWh
instrument.ts:130 > objectChange evcc.0.status.smartCostType
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionPricePerKWh
instrument.ts:130 > stateChange evcc.0.status.smartCostType
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.sessionSolarPercentage
instrument.ts:130 > objectChange evcc.0.status.sponsor
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.sessionSolarPercentage
instrument.ts:130 > stateChange evcc.0.status.sponsor
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.targetEnergy
instrument.ts:130 > objectChange evcc.0.status.sponsorTokenExpires
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.targetEnergy
instrument.ts:130 > stateChange evcc.0.status.sponsorTokenExpires
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.targetSoc
instrument.ts:130 > objectChange evcc.0.status.tariffEffectivePrice
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.targetSoc
instrument.ts:130 > stateChange evcc.0.status.tariffEffectivePrice
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.targetTime
instrument.ts:130 > objectChange evcc.0.status.tariffFeedIn
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.targetTime
instrument.ts:130 > stateChange evcc.0.status.tariffFeedIn
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.title
instrument.ts:130 > objectChange evcc.0.status.tariffGrid
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.title
instrument.ts:130 > stateChange evcc.0.status.tariffGrid
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleCapacity
instrument.ts:130 > objectChange evcc.0.status.vehicles
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleCapacity
instrument.ts:130 > stateChange evcc.0.status.vehicles
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleDetectionActive
instrument.ts:130 > objectChange evcc.0.status.version
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleDetectionActive
instrument.ts:130 > stateChange evcc.0.status.version
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleFeatureOffline
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleFeatureOffline
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleIcon
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleIcon
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleOdometer
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleOdometer
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehiclePresent
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehiclePresent
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleRange
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleRange
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleSoc
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleTargetSoc
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleTargetSoc
instrument.ts:130 > objectChange evcc.0.loadpoint.1.status.vehicleTitle
instrument.ts:130 > stateChange evcc.0.loadpoint.1.status.vehicleTitle

@GermanBluefox you should cache the last values and write only if the value changed

Newan commented 8 months ago

I dont see here the problem, you can set the pool time in the config?

Newan commented 8 months ago

pls testen der neuesten Version, dafür bitte einmal den Objektbaum komplett löschen