Sonnenspeicher: Unterschied zwischen den Versionen
C2j2 (Diskussion | Beiträge) |
C2j2 (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
Zeile 5: | Zeile 5: | ||
define sonnenbatterie HTTPMOD http://x.x.x.x:8080/api/v1/status 60 | define sonnenbatterie HTTPMOD http://x.x.x.x:8080/api/v1/status 60 | ||
attr sonnenbatterie extractAllJSON 1 | attr sonnenbatterie extractAllJSON 1 | ||
attr sonnenbatterie stateFormat {sprintf(" | attr sonnenbatterie stateFormat {sprintf("Verbrauch %d W: %d W aus PV + %d W %s Speicher + %d W %s Grid, SOC %d%%", | ||
ReadingsVal($name," | ReadingsVal($name,"Consumption_W",0), | ||
ReadingsVal($name," | ReadingsVal($name,"Production_W",0), | ||
abs(ReadingsVal($name,"Pac_total_W",0)), | abs(ReadingsVal($name,"Pac_total_W",0)), | ||
ReadingsVal($name," | ReadingsVal($name,"FlowConsumptionBattery",1) !=0 ? "aus" : "in", | ||
ReadingsVal($name,"GridFeedIn_W",0), | abs(ReadingsVal($name,"GridFeedIn_W",0)), | ||
ReadingsVal($name," | ReadingsVal($name,"FlowConsumptionGrid",1) !=0 ? "aus" : "in", | ||
ReadingsVal($name,"RSOC","-1") | ReadingsVal($name,"RSOC","-1") | ||
)} | )} | ||
</pre> | </pre> |
Version vom 15. September 2018, 11:53 Uhr
Hinweise zur Einbindung des Speichersystems von sonnen (https://sonnen.de/stromspeicher/) per HTTPMOD
Im Kürze:
define sonnenbatterie HTTPMOD http://x.x.x.x:8080/api/v1/status 60 attr sonnenbatterie extractAllJSON 1 attr sonnenbatterie stateFormat {sprintf("Verbrauch %d W: %d W aus PV + %d W %s Speicher + %d W %s Grid, SOC %d%%", ReadingsVal($name,"Consumption_W",0), ReadingsVal($name,"Production_W",0), abs(ReadingsVal($name,"Pac_total_W",0)), ReadingsVal($name,"FlowConsumptionBattery",1) !=0 ? "aus" : "in", abs(ReadingsVal($name,"GridFeedIn_W",0)), ReadingsVal($name,"FlowConsumptionGrid",1) !=0 ? "aus" : "in", ReadingsVal($name,"RSOC","-1") )}