Replies: 1 comment 3 replies
-
Das geht wenn das Measurement stimmt und alle Geräte den Wert haben 👍🏻 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
in diesem Post habe ich mal eine Frage formuliert:
#16647
Eine Lösung könnte sein, dass der sma evcharger seine "Zählerenergie" veröffentlicht. Ich habe leider (noch) keine Idee, wie ich das testen kann, auch die Sprache ist mir noch fremd.
Wenn ich das aber richtig interpretiere, muss der charger eine Zusatz Schnittstelle bieten, nämlich MeterEnergy
Auf Basis der Vorlage für CurrentPower und der Definition von SMA müsste der Code so aussehen:
var _ api.MeterEnergy = (*Smaevcharger)(nil)
// TotalEnergy implements the api.MeterEnergy interface
func (wb *Smaevcharger) TotalEnergy() (float64, error) {
val, err := wb.getMeasurement("Measurement.Metering.GridMs.TotWhIn")
return val / 1e3, err
}
Ich könnte das natürlich auch als PR stellen, würde aber vorher gerne abstimmen, ob das so gehen könnte, oder ich hier total auf dem Holzweg bin.
Beta Was this translation helpful? Give feedback.
All reactions