evcc-io / evcc

Sonne tanken ☀️🚘
https://evcc.io
MIT License
3.6k stars 670 forks source link

Tesla Powerwall Data type crash #8164

Closed FlNDUS closed 1 year ago

FlNDUS commented 1 year ago

On startup evcc throws the following error.

cannot create meter 'my_battery'
cannot create meter 'template'
cannot create meter 'powerwall'
json: cannot unmarshal number 1.7976931348623157e+308 into Go struct field SystemStatusData.solar_real_power_limit of type float32

The config was unchanged, it seems like my powerwall was updated overnight to a newer Version.

/app # evcc meter --log trace
[main  ] INFO 2023/05/25 08:41:48 evcc 0.117.4 (f9311a10)
[main  ] INFO 2023/05/25 08:41:48 using config file: /etc/evcc.yaml
[db    ] INFO 2023/05/25 08:41:58 using sqlite database: /root/.evcc/evcc.db
[db    ] TRACE 2023/05/25 08:41:58 SELECT count(*) FROM sqlite_master WHERE type='table' AND name="settings" -1 <nil>
[db    ] TRACE 2023/05/25 08:41:58 SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "settings" AND sql IS NOT NULL order by type = "table" desc 1 <nil>
[db    ] TRACE 2023/05/25 08:41:58 SELECT * FROM `settings` LIMIT 1 -1 <nil>
[db    ] TRACE 2023/05/25 08:41:58 SELECT * FROM `settings` 10 <nil>
[mqtt  ] INFO 2023/05/25 08:41:58 connecting evcc-514582635 at tcp://192.168.188.64:1883
[mqtt  ] DEBUG 2023/05/25 08:41:58 tcp://192.168.188.64:1883 connected
[powerwall] TRACE 2023/05/25 08:41:58 GET https://192.168.188.43/api/status
[powerwall] TRACE 2023/05/25 08:41:59 {"din":"<...deleted...>","start_time":"2023-05-25 02:30:37 +0800","up_time_seconds":"6h11m21.921774929s","is_new":false,"version":"23.12.0 2f804982","git_hash":"<...deleted...>","commission_count":0,"device_type":"hec","teg_type":"unknown","sync_type":"v1","leader":"","followers":null,"cellular_disabled":false}
[powerwall] TRACE 2023/05/25 08:41:59 GET https://192.168.188.43/api/status
[powerwall] TRACE 2023/05/25 08:41:59 {"din":"<...deleted...>","start_time":"2023-05-25 02:30:37 +0800","up_time_seconds":"6h11m21.956497459s","is_new":false,"version":"23.12.0 2f804982","git_hash":"<...deleted...>","commission_count":0,"device_type":"hec","teg_type":"unknown","sync_type":"v1","leader":"","followers":null,"cellular_disabled":false}
[powerwall] TRACE 2023/05/25 08:41:59 GET https://192.168.188.43/api/status
[powerwall] TRACE 2023/05/25 08:41:59 {"din":"<...deleted...>","start_time":"2023-05-25 02:30:37 +0800","up_time_seconds":"6h11m21.984338017s","is_new":false,"version":"23.12.0 2f804982","git_hash":"<...deleted...>","commission_count":0,"device_type":"hec","teg_type":"unknown","sync_type":"v1","leader":"","followers":null,"cellular_disabled":false}
[powerwall] TRACE 2023/05/25 08:41:59 POST https://192.168.188.43/api/login/Basic
[powerwall] TRACE 2023/05/25 08:41:59 {"username":"***","email":"***","password":"***","force_sm_off":false}
--
{"email":"***","firstname":"Tesla","lastname":"Energy","roles":["Home_Owner"],"token":"<...deleted...>","provider":"Basic","loginTime":"2023-05-25T08:41:59.685376342+02:00"}
[powerwall] TRACE 2023/05/25 08:41:59 GET https://192.168.188.43/api/system_status
[powerwall] TRACE 2023/05/25 08:41:59 {"command_source":"Configuration","battery_target_power":-2059.83941934556,"battery_target_reactive_power":0,"nominal_full_pack_energy":13546,"nominal_energy_remaining":9100,"max_power_energy_remaining":0,"max_power_energy_to_be_charged":0,"max_charge_power":4600,"max_discharge_power":4600,"max_apparent_power":4600.000000000001,"instantaneous_max_discharge_power":7000,"instantaneous_max_charge_power":7000,"instantaneous_max_apparent_power":4600.000000000001,"hardware_capability_charge_power":0,"hardware_capability_discharge_power":0,"grid_services_power":-0,"system_island_state":"SystemGridConnected","available_blocks":1,"available_charger_blocks":0,"battery_blocks":[{"Type":"","PackagePartNumber":"<...deleted...>","PackageSerialNumber":"<...deleted...>","disabled_reasons":[],"pinv_state":"PINV_GridFollowing","pinv_grid_state":"Grid_Compliant","nominal_energy_remaining":9104,"nominal_full_pack_energy":13546,"p_out":-2100,"q_out":30,"v_out":231,"f_out":50.044,"i_out":43.2,"energy_charged":10096340,"energy_discharged":8762890,"off_grid":false,"vf_mode":false,"wobble_detected":false,"charge_power_clamped":false,"backup_ready":true,"OpSeqState":"Active","version":"2f804982d0efc8"}],"ffr_power_availability_high":4600,"ffr_power_availability_low":4600,"load_charge_constraint":0,"max_sustained_ramp_rate":1250000,"grid_faults":[],"can_reboot":"Power flow is too high","smart_inv_delta_p":0,"smart_inv_delta_q":0,"last_toggle_timestamp":"2023-05-25T02:34:21.604733+02:00","solar_real_power_limit":1.7976931348623157e+308,"score":10000,"blocks_controlled":1,"primary":true,"auxiliary_load":0,"all_enable_lines_high":true,"inverter_nominal_usable_power":4600,"expected_energy_remaining":0}
[main  ] FATAL 2023/05/25 08:41:59 cannot create meter 'my_battery': cannot create meter 'template': cannot create meter 'powerwall': json: cannot unmarshal number 1.7976931348623157e+308 into Go struct field SystemStatusData.solar_real_power_limit of type float32
andig commented 1 year ago

Fixed in 8dd58dc