Append Logfile
No TeslaLogger runtime logfile attached yet. The issue can be reproduced with the SmartEVSE3 status JSON response from firmware v3.10.0.
Describe the bug
SmartEVSE3 firmware v3.10.0 reports import_active_energy values in Wh instead of kWh.
See also https://github.com/dingo35/SmartEVSE-3.5/releases/tag/v3.10.0
Expected behavior
For SmartEVSE3 firmware v3.10.0 and newer, TeslaLogger should convert import_active_energy from Wh to kWh.
Older SmartEVSE3 firmware versions should keep the existing behavior, because they already report the value in kWh.
Screenshots
Not applicable.
Teslalogger Type
Not specific to one installation type. This affects SmartEVSE3 users with firmware v3.10.0+.
Do you use FleetAPI or old OwnersAPI
Not related to Tesla API usage. This affects wallbox meter parsing.
Additional context
I already prepared a possible fix in my fork/branch:
https://github.com/Kruftl/TeslaLogger/tree/fix/smartevse3-energy-conversion
The fix detects SmartEVSE3 firmware versions >= v3.10.0 and converts import_active_energy from Wh to kWh for both:
ev_meter.import_active_energy
mains_meter.import_active_energy
I also added a unit test fixture for SmartEVSE3 v3.10.0 to verify the conversion.
I was not able to get the existing GitHub Actions build chain running successfully in my fork yet. The workflow currently fails before the actual build/test execution.
Happy to adjust the PR if there is a preferred way to run the build/test pipeline for external forks.
JSON Output of Version 3.11.0
{
"version": "v3.11.0",
"serialnr": 0,
"mode": "OFF",
"mode_id": 0,
"car_connected": false,
"wifi": {
"status": "WL_CONNECTED",
"ssid": "xxx",
"rssi": -20,
"bssid": "xxxx"
},
"eth": {
"present": false,
"connected": false,
"has_ip": false
},
"evse": {
"temp": 40,
"temp_max": 70,
"connected": false,
"access": 0,
"mode": 2,
"loadbl": 0,
"pwm": 1024,
"custombutton": false,
"solar_stop_timer": 0,
"state": "Ready to Charge",
"state_id": 0,
"error": "None",
"error_id": 0,
"rfidreader": "Disabled",
"nrofphases": 1,
"rfid": "Not Installed"
},
"settings": {
"charge_current": 60,
"override_current": 0,
"current_min": 6,
"current_max": 16,
"current_main": 25,
"current_max_circuit": 16,
"current_max_sum_mains": 0,
"max_sum_mains_time": 0,
"solar_max_import": 0,
"solar_start_current": 12,
"solar_stop_time": 30,
"enable_C2": "Solar Off",
"mains_meter": "API",
"starttime": 0,
"stoptime": 0,
"repeat": 0,
"lcdlock": 0,
"lock": 0,
"cablelock": 0,
"ledmode": 0,
"capacity_mode": 0,
"intervals": []
},
"mqtt": {
"host": "0.0.0.0",
"port": 1,
"topic_prefix": "privat",
"username": "",
"password_set": false,
"tls": false,
"status": "Connected",
"smartevse_server": false
},
"ocpp": {
"mode": "Disabled",
"backend_url": "",
"cb_id": "",
"auth_key": "",
"auto_auth": "Disabled",
"auto_auth_idtag": "",
"status": "Disconnected"
},
"home_battery": {
"current": 0,
"last_update": 0
},
"ev_meter": {
"description": "Eastron3P",
"address": 20,
"import_active_power": 0,
"total_wh": 9757452,
"charged_wh": 5467,
"currents": {
"TOTAL": 0,
"L1": 0,
"L2": 0,
"L3": 0
},
"import_active_energy": 9757452
},
"phase_currents": {
"TOTAL": -39,
"L1": -22,
"L2": 30,
"L3": -47,
"last_data_update": 1786298480,
"original_data": {
"TOTAL": -39,
"L1": -22,
"L2": 30,
"L3": -47
}
},
"backlight": {
"timer": 0,
"status": "OFF"
},
"color": {
"off": {
"R": 0,
"G": 0,
"B": 0
},
"normal": {
"R": 0,
"G": 255,
"B": 0
},
"smart": {
"R": 0,
"G": 255,
"B": 0
},
"solar": {
"R": 255,
"G": 170,
"B": 0
},
"custom": {
"R": 0,
"G": 0,
"B": 255
}
}
}
Append Logfile
No TeslaLogger runtime logfile attached yet. The issue can be reproduced with the SmartEVSE3 status JSON response from firmware v3.10.0.
Describe the bug
SmartEVSE3 firmware v3.10.0 reports
import_active_energyvalues in Wh instead of kWh.See also https://github.com/dingo35/SmartEVSE-3.5/releases/tag/v3.10.0
Expected behavior
For SmartEVSE3 firmware v3.10.0 and newer, TeslaLogger should convert import_active_energy from Wh to kWh.
Older SmartEVSE3 firmware versions should keep the existing behavior, because they already report the value in kWh.
Screenshots
Not applicable.
Teslalogger Type
Not specific to one installation type. This affects SmartEVSE3 users with firmware v3.10.0+.
Do you use FleetAPI or old OwnersAPI
Not related to Tesla API usage. This affects wallbox meter parsing.
Additional context
I already prepared a possible fix in my fork/branch:
https://github.com/Kruftl/TeslaLogger/tree/fix/smartevse3-energy-conversion
The fix detects SmartEVSE3 firmware versions
>= v3.10.0and convertsimport_active_energyfrom Wh to kWh for both:ev_meter.import_active_energymains_meter.import_active_energyI also added a unit test fixture for SmartEVSE3 v3.10.0 to verify the conversion.
I was not able to get the existing GitHub Actions build chain running successfully in my fork yet. The workflow currently fails before the actual build/test execution.
Happy to adjust the PR if there is a preferred way to run the build/test pipeline for external forks.
JSON Output of Version 3.11.0
{ "version": "v3.11.0", "serialnr": 0, "mode": "OFF", "mode_id": 0, "car_connected": false, "wifi": { "status": "WL_CONNECTED", "ssid": "xxx", "rssi": -20, "bssid": "xxxx" }, "eth": { "present": false, "connected": false, "has_ip": false }, "evse": { "temp": 40, "temp_max": 70, "connected": false, "access": 0, "mode": 2, "loadbl": 0, "pwm": 1024, "custombutton": false, "solar_stop_timer": 0, "state": "Ready to Charge", "state_id": 0, "error": "None", "error_id": 0, "rfidreader": "Disabled", "nrofphases": 1, "rfid": "Not Installed" }, "settings": { "charge_current": 60, "override_current": 0, "current_min": 6, "current_max": 16, "current_main": 25, "current_max_circuit": 16, "current_max_sum_mains": 0, "max_sum_mains_time": 0, "solar_max_import": 0, "solar_start_current": 12, "solar_stop_time": 30, "enable_C2": "Solar Off", "mains_meter": "API", "starttime": 0, "stoptime": 0, "repeat": 0, "lcdlock": 0, "lock": 0, "cablelock": 0, "ledmode": 0, "capacity_mode": 0, "intervals": [] }, "mqtt": { "host": "0.0.0.0", "port": 1, "topic_prefix": "privat", "username": "", "password_set": false, "tls": false, "status": "Connected", "smartevse_server": false }, "ocpp": { "mode": "Disabled", "backend_url": "", "cb_id": "", "auth_key": "", "auto_auth": "Disabled", "auto_auth_idtag": "", "status": "Disconnected" }, "home_battery": { "current": 0, "last_update": 0 }, "ev_meter": { "description": "Eastron3P", "address": 20, "import_active_power": 0, "total_wh": 9757452, "charged_wh": 5467, "currents": { "TOTAL": 0, "L1": 0, "L2": 0, "L3": 0 }, "import_active_energy": 9757452 }, "phase_currents": { "TOTAL": -39, "L1": -22, "L2": 30, "L3": -47, "last_data_update": 1786298480, "original_data": { "TOTAL": -39, "L1": -22, "L2": 30, "L3": -47 } }, "backlight": { "timer": 0, "status": "OFF" }, "color": { "off": { "R": 0, "G": 0, "B": 0 }, "normal": { "R": 0, "G": 255, "B": 0 }, "smart": { "R": 0, "G": 255, "B": 0 }, "solar": { "R": 255, "G": 170, "B": 0 }, "custom": { "R": 0, "G": 0, "B": 255 } } }