Tesla Powerwall und Gateway: Unterschied zwischen den Versionen

Aus FHEMWiki
K (web api Ergänzungen)
KKeine Bearbeitungszusammenfassung
 
(9 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== Einführung ==
== Einführung ==
Der Tesla Powerwall 2 wird als Batterie in eine Solaranlage integriert. Hier dient er als Energiespeicher. Es gibt eine App "Tesla" um den aktuelle Status als Benutzer auszulesen. Dazu gibt es noch eine lokale Webseite, die ebenfalls Zugriff auf den Status gibt.
Der [[Tesla Powerwall]] 2 wird als Batterie in eine Solaranlage integriert. Hier dient er als Energiespeicher. Es gibt eine App "Tesla" um den aktuellen Status als Benutzer auszulesen. Dazu gibt es noch eine lokale Webseite, die ebenfalls Zugriff auf den Status gibt.


Zusätzlich hat die Tesla Powerwall auch ein Web Api um Informationen auszulesen. Diese kann genutzt werden um die Powerwall auch in FHEM zu nutzen.<syntaxhighlight>
Zusätzlich hat die Tesla Powerwall auch ein Web Api um Informationen auszulesen. Das kann genutzt werden, um die Powerwall auch in FHEM zu nutzen.
http://ip-adresse/api/meters/aggregates
<syntaxhighlight lang="html">
http://ip-adresse/api/site_info
https://<ip-address powerwall>/api/system_status/soe
http://ip-adresse/api/operation
https://<ip-address powerwall>/api/meters/aggregates
http://ip-adresse/api/sitemaster
https://<ip-address powerwall>/api/site_info
http://ip-adresse/api/powerwalls
https://<ip-address powerwall>/api/sitemaster
</syntaxhighlight>Es gibt aktuell mehrere Forumeinträge dazu:
https://<ip-address powerwall>/api/powerwalls
* [https://forum.fhem.de/index.php?topic=77294.0 Tesla Powerwall 2 AC]
https://<ip-address powerwall>/api/networks
 
https://<ip-address powerwall>/api/system/networks
* [https://forum.fhem.de/index.php?topic=78145.0 <nowiki>[46_TeslaPowerwall2AC] neues Modul für Tesla Stromspeicher</nowiki>]
https://<ip-address powerwall>/api/operation
https://<ip-address powerwall>/api/status
https://<ip-address powerwall>/api/customer/registration
</syntaxhighlight>
Es gibt aktuell mehrere Forumseinträge dazu:
* {{Link2Forum|Topic=77294|LinkText=Tesla Powerwall 2 AC}}
* {{Link2Forum|Topic=78145|LinkText=<nowiki>[46_TeslaPowerwall2AC] neues Modul für Tesla Stromspeicher</nowiki>}}
* ...


== Installation ==
== Installation ==
Benötigt wird das FHEM Modul {{Link2CmdRef|Anker=TeslaPowerwall2AC|Label=TeslaPowerwall2AC}}


Benötigt wird das FHEM Modul [https://fhem.de/commandref_DE.html#TeslaPowerwall2AC TeslaPowerwall2AC.pm]
Zur Installation definiere in FHEM die Powerwall:
 
<syntaxhighlight lang="perl">
Zur Installation definiere in fhem.cfg die Powerwall:<syntaxhighlight lang="perl">
define myPowerWall TeslaPowerwall2AC 192.168.x.y
define myPowerWall TeslaPowerwall2AC 192.168.x.y
attr myPowerWall emailaddr <your mail address used with gateway>
attr myPowerWall emailaddr <your mail address used with Tesla gateway>
</syntaxhighlight>


</syntaxhighlight>Danach muss noch das Passwort vom tesla gateway gesetzt werden<syntaxhighlight>
Danach muss noch das Passwort vom tesla Gateway gesetzt werden:
<syntaxhighlight lang="perl">
set myPowerwall setPassword pass=<your password>
set myPowerwall setPassword pass=<your password>
</syntaxhighlight>Nach einem Shutdown Restart sollte der Tesla Speicher im Status "ready" angezeigt werden.
</syntaxhighlight>
Nach einem Shutdown/Restart sollte der Tesla Speicher im Status "ready" angezeigt werden.
 
Mit dem Attribut "interval" kann noch das Aktualisierungsintervall gesetzt werden (in Sekunden)<syntaxhighlight lang="perl">
attr myPowerWall interval 300
</syntaxhighlight>
 
== Diagramme ==
Zur Anzeige der Werte hier zwei beispielhafte Diagramme:
 
==== Powerwall Kapazität ====
Anzeige der Kapazität des Akkus in Prozent und KWh.
 
[[Datei:PowerwallCapacity.jpg]]
 
gplot Datei:
 
<syntaxhighlight lang="perl">
# Created by FHEM/98_SVG.pm, 2023-03-31 09:05:52
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<L1>'
set ytics
set y2tics
set grid ytics
set ylabel "Battery (%)"
set y2label "Battery (KW)"
 
#FileLog_myPowerwall 4:myPowerWall.batteryLevel\x3a::
#FileLog_myPowerwall 4:myPowerWall.batteryPower\x3a::
 
plot "<IN>" using 1:2 axes x1y1 title 'Level' ls l2 lw 1 with lines,\
    "<IN>" using 1:2 axes x1y2 title 'Power' ls l0 lw 1 with lines
</syntaxhighlight>
 
==== Powerwall Leistungen ====
Anzeige der Leistungen für Akku, Haus, Netz und Solar in Watt.
 
[[Datei:PowerwallLoads.jpg]]
 
gplot Datei:<syntaxhighlight lang="perl">
# Created by FHEM/98_SVG.pm, 2023-03-31 10:01:26
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<L1>'
set ytics
set y2tics
set grid ytics
set ylabel "Haus, Netz, Solar"
set y2label "Batterie"
 
#FileLog_myPowerwall 4:myPowerWall.aggregates-battery-instant_power\x3a::
#FileLog_myPowerwall 4:myPowerWall.aggregates-load-instant_power\x3a::
#FileLog_myPowerwall 4:myPowerWall.aggregates-site-instant_power\x3a::
#FileLog_myPowerwall 4:myPowerWall.aggregates-solar-instant_power\x3a::
 
plot "<IN>" using 1:2 axes x1y2 title 'Battery' ls l1 lw 1 with lines,\
    "<IN>" using 1:2 axes x1y1 title 'Haus' ls l2 lw 1 with lines,\
    "<IN>" using 1:2 axes x1y1 title 'Netz' ls l7 lw 1 with lines,\
    "<IN>" using 1:2 axes x1y1 title 'Solar' ls l8fill lw 1 with lines
</syntaxhighlight>


== Verschiedenes ==
== Verschiedenes ==
Zeile 29: Zeile 104:


== Links ==
== Links ==
* FHEM commandref: [https://fhem.de/commandref_DE.html#TeslaPowerwall2AC TeslaPowerwall2AC.pm]
* FHEM commandref: [https://fhem.de/commandref.html#TeslaPowerwall2AC TeslaPowerwall2AC.pm]
* FHEM forum: [https://forum.fhem.de/index.php?topic=77294.0 Tesla Powerwall 2 AC]
* FHEM forum: [https://forum.fhem.de/index.php?topic=77294.0 Tesla Powerwall 2 AC]


Zeile 38: Zeile 113:
[[Kategorie:IP Components]]
[[Kategorie:IP Components]]
[[Kategorie:Baustelle]]
[[Kategorie:Baustelle]]
[[Kategorie:Energieerzeugungsmessung]]
[[Kategorie:Solar]]

Aktuelle Version vom 31. März 2023, 10:59 Uhr

Einführung

Der Tesla Powerwall 2 wird als Batterie in eine Solaranlage integriert. Hier dient er als Energiespeicher. Es gibt eine App "Tesla" um den aktuellen Status als Benutzer auszulesen. Dazu gibt es noch eine lokale Webseite, die ebenfalls Zugriff auf den Status gibt.

Zusätzlich hat die Tesla Powerwall auch ein Web Api um Informationen auszulesen. Das kann genutzt werden, um die Powerwall auch in FHEM zu nutzen.

https://<ip-address powerwall>/api/system_status/soe
https://<ip-address powerwall>/api/meters/aggregates
https://<ip-address powerwall>/api/site_info
https://<ip-address powerwall>/api/sitemaster
https://<ip-address powerwall>/api/powerwalls
https://<ip-address powerwall>/api/networks
https://<ip-address powerwall>/api/system/networks
https://<ip-address powerwall>/api/operation
https://<ip-address powerwall>/api/status
https://<ip-address powerwall>/api/customer/registration

Es gibt aktuell mehrere Forumseinträge dazu:

Installation

Benötigt wird das FHEM Modul TeslaPowerwall2AC

Zur Installation definiere in FHEM die Powerwall:

define myPowerWall TeslaPowerwall2AC 192.168.x.y
attr myPowerWall emailaddr <your mail address used with Tesla gateway>

Danach muss noch das Passwort vom tesla Gateway gesetzt werden:

set myPowerwall setPassword pass=<your password>

Nach einem Shutdown/Restart sollte der Tesla Speicher im Status "ready" angezeigt werden.

Mit dem Attribut "interval" kann noch das Aktualisierungsintervall gesetzt werden (in Sekunden)

attr myPowerWall interval 300

Diagramme

Zur Anzeige der Werte hier zwei beispielhafte Diagramme:

Powerwall Kapazität

Anzeige der Kapazität des Akkus in Prozent und KWh.

PowerwallCapacity.jpg

gplot Datei:

# Created by FHEM/98_SVG.pm, 2023-03-31 09:05:52
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<L1>'
set ytics
set y2tics
set grid ytics
set ylabel "Battery (%)"
set y2label "Battery (KW)"

#FileLog_myPowerwall 4:myPowerWall.batteryLevel\x3a::
#FileLog_myPowerwall 4:myPowerWall.batteryPower\x3a::

plot "<IN>" using 1:2 axes x1y1 title 'Level' ls l2 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Power' ls l0 lw 1 with lines

Powerwall Leistungen

Anzeige der Leistungen für Akku, Haus, Netz und Solar in Watt.

PowerwallLoads.jpg

gplot Datei:

# Created by FHEM/98_SVG.pm, 2023-03-31 10:01:26
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<L1>'
set ytics
set y2tics
set grid ytics
set ylabel "Haus, Netz, Solar"
set y2label "Batterie"

#FileLog_myPowerwall 4:myPowerWall.aggregates-battery-instant_power\x3a::
#FileLog_myPowerwall 4:myPowerWall.aggregates-load-instant_power\x3a::
#FileLog_myPowerwall 4:myPowerWall.aggregates-site-instant_power\x3a::
#FileLog_myPowerwall 4:myPowerWall.aggregates-solar-instant_power\x3a::

plot "<IN>" using 1:2 axes x1y2 title 'Battery' ls l1 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Haus' ls l2 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Netz' ls l7 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Solar' ls l8fill lw 1 with lines

Verschiedenes

  • ...

Links

Hinweise

  • ...