GithubHelp home page GithubHelp logo

Comments (10)

marlan99 avatar marlan99 commented on June 7, 2024

Cookie Abfrage des PW2 Gateway (gültig 24h):

/usr/bin/curl -k -c /tmp/pw2.cookie -X POST -H "Content-Type: application/json" -d '{"username":"customer","password":"PASSWORT", "email":"LOGINNAME","force_sm_off":false}' https://192.168.1.152/api/login/Basic

response Beispiel:

{"email":"LOGINNAME","firstname":"Tesla","lastname":"Energy","roles":["Home_Owner"],"token":"6TONv6BzBxnm05PDpmKI9UlHoXJDiPDm6w7msyjJX1LbQzpv3q2rtrJ3-Mim9yeOS6lsg2zRItFQpKr-AaniPg==","provider":"Basic","loginTime":"2022-01-09T19:40:06.062763396+02:00"}
———————————
API Abfragebeispiel mit obigem generierten cookie:

/usr/bin/curl -k -b /tmp/pw2.cookie https://192.168.1.152/api/meters/aggregates

response Beispiel:

{"site":{"last_communication_time":"2022-01-09T19:40:48.200931502+02:00","instant_power":782,"instant_reactive_power":-148,"instant_apparent_power":795.8819007867938,"frequency":0,"energy_exported":3049096.0000873767,"energy_imported":3927124.873656871,"instant_average_voltage":406.2467434125882,"instant_average_current":0,"i_a_current":0,"i_b_current":0,"i_c_current":0,"last_phase_voltage_communication_time":"0001-01-01T00:00:00Z","last_phase_power_communication_time":"0001-01-01T00:00:00Z","last_phase_energy_communication_time":"0001-01-01T00:00:00Z","timeout":1500000000,"num_meters_aggregated":1,"instant_total_current":0},"battery":{"last_communication_time":"2022-01-09T19:40:48.124810721+02:00","instant_power":40,"instant_reactive_power":-30,"instant_apparent_power":50,"frequency":49.997,"energy_exported":1325750,"energy_imported":1895040,"instant_average_voltage":233.8,"instant_average_current":0,"i_a_current":0,"i_b_current":0,"i_c_current":0,"last_phase_voltage_communication_time":"0001-01-01T00:00:00Z","last_phase_power_communication_time":"0001-01-01T00:00:00Z","last_phase_energy_communication_time":"0001-01-01T00:00:00Z","timeout":1500000000,"num_meters_aggregated":2,"instant_total_current":0},"load":{"last_communication_time":"2022-01-09T19:40:48.124810721+02:00","instant_power":773.25,"instant_reactive_power":-177.75,"instant_apparent_power":793.4170561564706,"frequency":0,"energy_exported":0,"energy_imported":8609427.484656662,"instant_average_voltage":406.2467434125882,"instant_average_current":1.9033998734475506,"i_a_current":0,"i_b_current":0,"i_c_current":0,"last_phase_voltage_communication_time":"0001-01-01T00:00:00Z","last_phase_power_communication_time":"0001-01-01T00:00:00Z","last_phase_energy_communication_time":"0001-01-01T00:00:00Z","timeout":1500000000,"instant_total_current":1.9033998734475506},"solar":{"last_communication_time":"2022-01-09T19:40:48.201374477+02:00","instant_power":-17,"instant_reactive_power":2,"instant_apparent_power":17.11724276862369,"frequency":0,"energy_exported":8475852.912015501,"energy_imported":175164.30092833366,"instant_average_voltage":406.22942290451255,"instant_average_current":0,"i_a_current":0,"i_b_current":0,"i_c_current":0,"last_phase_voltage_communication_time":"0001-01-01T00:00:00Z","last_phase_power_communication_time":"0001-01-01T00:00:00Z","last_phase_energy_communication_time":"0001-01-01T00:00:00Z","timeout":1500000000,"num_meters_aggregated":1,"instant_total_current":0}}

————
API Abfragebeispiel 2:

/usr/bin/curl -k -b /tmp/pw2.cookie https://192.168.1.152/api/system_status/soe

response:
{"percentage":22.851315234210155}

——————
API Abfragebeispiel 3:

/usr/bin/curl -k -b /tmp/pw2.cookie https://192.168.1.152/api/operation

response:
{"real_mode":"self_consumption","backup_reserve_percent":24,"freq_shift_load_shed_soe":75,"freq_shift_load_shed_delta_f":-0.32}

from iobroker.tesla-motors.

TA2k avatar TA2k commented on June 7, 2024

Sind die Rückgabewerte unterschiedlich zu der cloud abfrage

from iobroker.tesla-motors.

marlan99 avatar marlan99 commented on June 7, 2024

Bei der ersten oben angegebenen API ja, aber jeweils unterschiedlich zwischen 10 Wh u d 17 kWh .
Ich habe bisher nicht nachvollziehen können weshalb

from iobroker.tesla-motors.

marlan99 avatar marlan99 commented on June 7, 2024

Anbei die aktuelle Differenz der Messdaten (10.01.2022 17:46) wenn über die Tesla API oder direkt vom Gateway abgefragt wird.
Besteht interesse dies über die API zu fixen (falls möglich) ?

Quelle via Web API via Adapter Differenz
Energie exportiert 3049096 Wh 3049077 Wh 45 Wh
Energie importiert 3943216 Wh 3734070 Wh 37465 Wh

from iobroker.tesla-motors.

marlan99 avatar marlan99 commented on June 7, 2024

Abweichungen von heute (11.01.2022 08:06)

Quelle via Web API via Adapter Differenz
Energie exportiert 3049096 Wh 3049067 Wh -29 Wh
Energie importiert 3953224 Wh 3725129 Wh 228090 Wh

from iobroker.tesla-motors.

TA2k avatar TA2k commented on June 7, 2024

https://teslamotorsclub.com/tmc/threads/gateway-website-powerwall-reading-off-by-4.179904/

from iobroker.tesla-motors.

marlan99 avatar marlan99 commented on June 7, 2024

Das ist korrekt, was den SoC der PW betrifft.
Aber nicht was die importierte oder exportierte Energie angeht.

Über den Adapter muss ich aktuell die exp/imp. Energie pro Jahr zusammenzählen.
Direkt über das Gateway habe ich die Gesamtzahl direkt verfügbar.

Eventuell gibt es deshalb eine Differenz?
Vielleicht kann man den Adapter mit dem Objekt erweitern, dass die gesammte exp./imp. Energie anzeigt?

from iobroker.tesla-motors.

d-berk avatar d-berk commented on June 7, 2024

Hi,
ich würde auch gern meine PW über die lokale API anbinden (momentan gehe ich noch den Umweg über FHEM). Gibt es hierzu schon Neuigkeiten, ob es der issue in den Adapter schafft?

VG

from iobroker.tesla-motors.

marlan99 avatar marlan99 commented on June 7, 2024

Wie sieht es aus, mit einer Variante, um einzelne Geräte aus den updates der Datenobjekte zu deaktivieren?

Ich habe aktuell PW2 und 2 Fahrzeuge und würde gerne eines der Fahrzeuge aus den Updates deaktivieren (Probleme mit grossen Vampirverlust) ohne dass die updates der PW2 betroffen sind.

from iobroker.tesla-motors.

marlan99 avatar marlan99 commented on June 7, 2024

wird mit feature request #64 weiterverfolgt.

from iobroker.tesla-motors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.