Comments (10)
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.
Sind die Rückgabewerte unterschiedlich zu der cloud abfrage
from iobroker.tesla-motors.
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.
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.
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.
https://teslamotorsclub.com/tmc/threads/gateway-website-powerwall-reading-off-by-4.179904/
from iobroker.tesla-motors.
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.
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.
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.
wird mit feature request #64 weiterverfolgt.
from iobroker.tesla-motors.
Related Issues (20)
- Update stable version in repo from 1.3.2 to 1.3.3 HOT 1
- Option to disable some error logs HOT 3
- Update stable version in repo from 1.3.2 to 1.3.5 HOT 1
- Keine Positionsdaten nach dem letzten Tesla-Update HOT 10
- No automatic Update of States in 1.4.0 HOT 4
- vehicle_state.odometer_km funktioniert sei 1.35 nicht mehr HOT 4
- Verbrauchswerte kumulativ als Datenpunkte möglich? HOT 7
- Ladeverlust Batterie Auto HOT 5
- Adapter Fehlermeldung
- Feature request: Exclude devices and online changes of settings HOT 5
- charger_phases wrong value
- Token Refresh Intervall ist zu lang HOT 2
- id is invalid. Ids are not allowed to end in "." HOT 6
- periodically error messages after login change
- sending commands (remote commands) not working anymore? HOT 10
- Feature request: DP auswählbar mit checkbox HOT 6
- duplizierte Datenpunkte mit Erweiterung "_km" nicht sinnvoll ? HOT 2
- Powerwall status / error 410 HOT 3
- Feature Request: Official API Support HOT 10
- Adapter General Error in Log HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iobroker.tesla-motors.