ich würde gerne die Leistung meiner Solaranlage als Desktopwidget anzeigen, damit ich nicht immer eine Webseite öffnen muss um mit einem Auge nebenbei zu sehen was Sache ist.
Ich bin hocherfreut, dass die OpenWB alle möglichen Daten einfach per MQTT rausgibt. Das sollte es ja eigentlich ganz einfach machen und bestimmt gibt es ja auch schon zu Hauf fertige Programme um MQTT-Daten zu visualisieren... Dachte ich.
Es gibt aber immerhin mit Rainmeter eine OpenSource-Software zur Erstellung von Widgets in Windows und auch ein MQTT-Plugin. Damit habe ich dann auch mal etwas rumgebastelt. Die 1990er-Jahre haben angerufen, sie wollen ihre ini-Dateien wieder haben

Vielleicht gibt es ja hier Leute die das besser verstehen als ich und Lust haben daran mitzuwirken? Hier die Konfig:
Code: Alles auswählen
; General
; =======
[Rainmeter]
Update=10000
BackgroundMode=2
SolidColor=000000
[Metadata]
Name=OpenWB-PV visualization
Author=yankee
Information=PV Consumption & Production with data from OpenWB
License=MIT License
Version=0.0.1
[Variables]
colorExport=0,128,0
colorImport=255,0,0
colorSelfConsumption=255,255,0
barWidth=120
; Maximum possible power production in Watt. Typically this should be set to sum of the capacity of all inverters.
; E.g. if there are two inverters, one with 5kVA and one with 8kVA set this number to 13000.
; The value is used as a reference value for the production bar
maxProduction=MAX_PRODUCTION
; Value for power consumption in Watt, that is typically not exceeded.
; E.g. for typical households values between 2000 and 6000 should be sane
; The value is used as a reference value for the consumption bar
maxConsumption=4000
[mqttServer]
Measure=Plugin
Plugin=MqttClient
Server=OPEN_WB_IP_OR_HOSTNAME
OnMessage=[!Update][!Redraw]
; Measures
; ========
[powerImport]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttServer
Topic=openWB/evu/W
[pvConsumption]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttServer
Topic=openWB/pv/W
[powerProduction]
Measure=Calc
Formula=pvConsumption * -1
MinValue=0
MaxValue=#maxProduction#
[powerConsumption]
Measure=Calc
Formula=powerImport + powerProduction
MinValue=0
MaxValue=#maxConsumption#
[isImport]
Measure=Calc
Formula=powerConsumption < powerProduction ? 0 : 1
IfBelowValue=1
IfBelowAction=[!SetOption consumptionBar BarColor #colorExport#][!Redraw]
IfAboveValue=0
IfAboveAction=[!SetOption consumptionBar BarColor #colorImport#][!Redraw]
; Meters
; ======
[background]
Meter=Shape
Shape=Rectangle 0,0,130,200 | Fill Color 0,0,0
[graph]
Meter=Histogram
AutoScale=1
MeasureName=powerProduction
MeasureName2=powerConsumption
PrimaryColor=#colorExport#
SecondaryColor=#colorImport#
BothColor=#colorSelfConsumption#
X=5
Y=0
W=#barWidth#
H=100
[productionLabel]
Meter=STRING
MeasureName=powerProduction
X=5
Y=110
H=10
W=#barWidth#
FontColor=FFFFFF
Text="Produktion: %1 W"
[productionBar]
Meter=BAR
MeasureName=powerProduction
X=5
Y=130
W=#barWidth#
H=10
BarOrientation=Horizontal
BarColor=#colorExport#
SolidColor=150,150,150,255
[consumptionLabel]
Meter=STRING
MeasureName=powerConsumption
X=5
Y=150
H=10
W=#barWidth#
FontColor=FFFFFF
Text="Verbrauch: %1 W"
[consumptionBar]
Meter=BAR
MeasureName=powerConsumption
X=5
Y=170
H=10
W=#barWidth#
BarOrientation=Horizontal
BarColor=#colorImport#
SolidColor=150,150,150,255