Tesla Powerwall 2 AC

Begonnen von Gigafix, 30 September 2017, 14:21:54

Vorheriges Thema - Nächstes Thema

lacleman

#345
Guten Abend,

Habe das Powerwall2AC-Modul mit meiner neuen Powerwall-Anlage im Einsatz und es hat auch auf Anhieb funktioniert. Leider sehe ich in unregelmässigen Abständen Timeouts und die Readings werden nicht mehr aktualisiert. Ich habe bereits den Timeout-Parameter im Aufruf von HttpUtils_NonblockingGet erhöht, das hat aber leider nicht geholfen.

Wie kann ich das debuggen? Im Log sehe ich nur das hier, was wenig weiterhilft.

2020.06.20 17:46:09 3: TeslaPowerwall2AC (teg) - RequestERROR: read from https://10.21.2.175:443 timed out

Update: Inzwischen habe ich herausgefunden, dass diese Fehler im Zusammenhang mit dem API-ENdpoint /api/login/Basic auftreten. Nachdem ich diesen Endpoint aus %paths entfernt habe, kommen keine Timeouts, es sind aber trotzdem alle Readings da. Wozu wird der Endpoint /api/login/Basic überhaupt abgefragt?

CoolTux

Du kannst global verbose auf 5 stellen. Achtung das Log läuft dann schnell voll.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

slawekking

Hallo,

seit 3 Tagen, ich denke nach einem Update des Powerwall Gateways, ist die Abfrage der Parameter der Powerwall nicht mehr möglich.
Mir ist auch aufgefallen, dass über das Webinterface nur mit User und Passwort Daten angezeigt werden. Das passt auch zur Fehlermeldung in FHEM.

Was könnte man hier machen um das Modul wieder zum laufen zu bringen?

Fhem Modul:
lastRequestError
Path: statussoe 403 - Error: Unable to GET to resource Messages: User does not have adequate access rights


Fhem Log:

2021.02.19 11:38:11 4: TeslaPowerwall2AC (myPowerWall) - Send with URI: https://192.168.1.58/api/meters/aggregates
2021.02.19 11:38:11 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 6987) line 1.
2021.02.19 11:38:11 4: TeslaPowerwall2AC (myPowerWall) - Send with URI: https://192.168.1.58/api/system_status/soe
2021.02.19 11:38:11 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 6994) line 1.
2021.02.19 11:38:11 4: TeslaPowerwall2AC (myPowerWall) - Recieve JSON data: {"code":403,"error":"Unable to GET to resource","message":"User does not have adequate access rights"}
2021.02.19 11:38:11 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 6995) line 1.
2021.02.19 11:38:11 4: TeslaPowerwall2AC (myPowerWall) - Recieve JSON data: {"code":403,"error":"Unable to GET to resource","message":"User does not have adequate access rights"}
2021.02.19 11:38:17 1: XiaomiSmartHome: Read> GW not defined {"cmd":"heartbeat","model":"gateway","sid":"7811dcb791e6","short_id":"0","token":"16mqBYdxnBfcE7px","data":"{\"ip\":\"192.168.1.33\"}"}
2021.02.19 11:38:27 1: XiaomiSmartHome: Read> GW not defined {"cmd":"heartbeat","model":"gateway","sid":"7811dcb791e6","short_id":"0","token":"j63R2hV82mcS9xLe","data":"{\"ip\":\"192.168.1.33\"}"}
2021.02.19 11:38:31 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 7133) line 1.
2021.02.19 11:38:31 4: TeslaPowerwall2AC (myPowerWall) - Send with URI: https://192.168.1.58/api/meters/aggregates
2021.02.19 11:38:31 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 7135) line 1.
2021.02.19 11:38:31 4: TeslaPowerwall2AC (myPowerWall) - Send with URI: https://192.168.1.58/api/system_status/soe
2021.02.19 11:38:31 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 7140) line 1.
2021.02.19 11:38:31 4: TeslaPowerwall2AC (myPowerWall) - Recieve JSON data: {"code":403,"error":"Unable to GET to resource","message":"User does not have adequate access rights"}
2021.02.19 11:38:31 1: PERL WARNING: Invalid conversion in sprintf: "% <" at (eval 7141) line 1.
2021.02.19 11:38:31 4: TeslaPowerwall2AC (myPowerWall) - Recieve JSON data: {"code":403,"error":"Unable to GET to resource","message":"User does not have adequate access rights"}


Bitte um Rueckmeldung.

Danke im Voraus.

GruS

Christoph


CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

lacleman

Hierzu gibt es auch was in diesem Thread: https://forum.fhem.de/index.php/topic,118636.0/topicseen.html

Das Tesla Energy Gateway rückt seit einiger Zeit die Daten nur noch raus, wenn der Client sich authentisiert hat.

twiederh

#350
Hi,
ich sehe seit gestern in den FHEM-logs die folgende Meldung:
Can't use string ("updating synchrometer") as a HASH ref while "strict refs" in use at lib/FHEM/Devices/Tesla/Powerwall.pm line 721.

Außerdem startet FHEM nicht mehr, allerdings ohne dass ich eine sonstige Fehlermeldung bekomme.

Ich stehe komplett auf dem Schlauch, da trotz mehrerer Neustarts von FHEM der letzte Log-Eintrag von gestern Nachmittag ist. Gestern morgen lief FHEM noch, nachmittags plötzlich nicht mehr.

Auch ein Update von Raspian hat nicht geholfen. FHEM startet kurz, wenn ich den service starte, die Webseite ist dann sichtbar aber dann schmiert es wieder ab mit der obigen Fehlermeldung.

das finde ich im Modul:

Error JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) at lib/FHEM/Devices/Tesla/Powerwall.pm line 595.


drdr6

Hi
Is anyone able to use this module any more?
It seems to work for a few days but then reports lastRequestError
   
Path: powerwalls 401 - Error: User session not found from EdgwdAIBnRDkB5s8FQ2FMsXB1XEOtP58PmvuwJ18nd70NDbhAoM8-ZyspxF8Vj_OvOiHvozPau833IGbew7m7A== Messages: Invalid bearer token

Removing the password and resetting doesn't work.

This problem seems to be with Oauth2 login, but where is this described for Fhem? There are no clues in the powerwall.pm code as to how authorization is supposed to work or how a refresh token might be generated or used.

ioT4db

hello drdr6,

the module still works for me.

From time to time I also get the message with the token, e.g. when Tesla has installed a new update.

Then I have to restart Fhem after the "set removePassword" and then enter the password again.

This has always worked until now. It hasn't worked for me for a while without a restart.

I hope this helps...
FHEM auf Synology mittels Docker,  Jeelink-Clone 1x für PCA301 und 1x für Lacrosse, THZ304SOL, Homematic: CUL_HM / M-MOD-RPI-PCB, Pushover, Xiaomi s50