Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing battery_blocks data on PW3 with Multiple Powerwalls in Local Mode #131

Open
JohnJ9ml opened this issue Jan 13, 2025 · 3 comments
Open

Comments

@JohnJ9ml
Copy link

Version 0.12.1:

My local API calls for system_status and anything else that should show battery_blocks returns a count of zero and an empty array.

My installation has three PW3 units.

The information was missing previously when I was running in cloud mode as well.

"rawData" : { "all_enable_lines_high" : true, "auxiliary_load" : 0, "available_blocks" : 0, "available_charger_blocks" : 0, "battery_blocks" : [ ], "battery_target_power" : 0, "battery_target_reactive_power" : 0, "blocks_controlled" : 0, "can_reboot" : "Yes", "command_source" : "Configuration", "expected_energy_remaining" : 0, "ffr_power_availability_high" : 0, "ffr_power_availability_low" : 0, "grid_faults" : [ ], "grid_services_power" : null, "hardware_capability_charge_power" : 0, "hardware_capability_discharge_power" : 0, "instantaneous_max_apparent_power" : 0, "instantaneous_max_charge_power" : 0, "instantaneous_max_discharge_power" : 0, "inverter_nominal_usable_power" : 0, "last_toggle_timestamp" : "2023-10-13T04:08:05.957195-07:00", "load_charge_constraint" : 0, "max_apparent_power" : null, "max_charge_power" : null, "max_discharge_power" : null, "max_power_energy_remaining" : 0, "max_power_energy_to_be_charged" : 0, "max_sustained_ramp_rate" : 0, "nominal_energy_remaining" : 13150, "nominal_full_pack_energy" : 42450, "primary" : true, "score" : 10000, "smart_inv_delta_p" : 0, "smart_inv_delta_q" : 0, "solar_real_power_limit" : null, "system_island_state" : "SystemGridConnected" }

@JohnJ9ml
Copy link
Author

The raw output to the pw.tedapi.get_battery_blocks() call actually returns the battery block data.

converted to an object:
"battery_blocks": [ { "battery_power_status": "on", "can_connection": "can1", "enable_inverter_battery_meter": true, "enable_inverter_solar_meter": true, "max_soe": 100, "min_soe": 0, "pvi_power_status": "on", "type": "Powerwall3", "vin": "1707000-21-K--TGXXXXXXXX3JZH" }, { "battery_power_status": "on", "enable_inverter_battery_meter": true, "enable_inverter_solar_meter": true, "max_soe": 100, "min_soe": 0, "pvi_power_status": "on", "type": "Powerwall3Follower", "vin": "1707000-21-K--TGXXXXXXXX3DZE" }, { "battery_power_status": "on", "enable_inverter_battery_meter": true, "enable_inverter_solar_meter": true, "max_soe": 100, "min_soe": 0, "pvi_power_status": "on", "type": "Powerwall3Follower", "vin": "1707000-21-K--TGXXXXXXXX309Y" } ] }

@jasonacox
Copy link
Owner

Hi @JohnJ9ml - I suspect we need to add some logic to detect PW3 installs and pull the relevant data from tedapi. Can you help by running a few things for me? I don't have a PW3 to test.

# TEDAPI (full)
#
import pypowerwall
PW_GW_PWD="XXXXXXXXX"
PW_HOST="192.168.91.1"
pw = pypowerwall.Powerwall(PW_HOST, gw_pwd=PW_GW_PWD)

# Flags
print(f"mode: {pw.mode} - tedapi: {pw.tedapi_mode} - pw3: {pw.tedapi.pw3} - vitals: {pw.vitals_api}")

# Battery Blocks
print("pw.battery_blocks():")
print(pw.battery_blocks())
print()

# I believe this is what you posted above - please confirm

# System Status
print("system_status():")
print(pw.system_status()) # Is this the one missing?
print()

# TEDAPI Reported Battery blocks
print("pw.tedapi.get_battery_blocks():")
print(pw.tedapi.get_battery_blocks())

@JohnJ9ml
Copy link
Author

I'll confirm all of your items above:

Yes, pw.battery_blocks() is empty.

Yes, pw.system_status() says I have zero battery blocks.

Yes, pw.tedapi.get_battery_blocks() sees them:

`python batteryBlockDebug.py
mode: local - tedapi: full - pw3: True - vitals: True
pw.battery_blocks():
{}

system_status():
{'command_source': 'Configuration', 'battery_target_power': 0, 'battery_target_reactive_power': 0, 'nominal_full_pack_energy': 42450, 'nominal_energy_remaining': 10700, 'max_power_energy_remaining': 0, 'max_power_energy_to_be_charged': 0, 'max_charge_power': None, 'max_discharge_power': None, 'max_apparent_power': None, 'instantaneous_max_discharge_power': 0, 'instantaneous_max_charge_power': 0, 'instantaneous_max_apparent_power': 0, 'hardware_capability_charge_power': 0, 'hardware_capability_discharge_power': 0, 'grid_services_power': None, 'system_island_state': 'SystemGridConnected', 'available_blocks': 0, 'available_charger_blocks': 0, 'battery_blocks': [], 'ffr_power_availability_high': 0, 'ffr_power_availability_low': 0, 'load_charge_constraint': 0, 'max_sustained_ramp_rate': 0, 'grid_faults': [], 'can_reboot': 'Yes', 'smart_inv_delta_p': 0, 'smart_inv_delta_q': 0, 'last_toggle_timestamp': '2023-10-13T04:08:05.957195-07:00', 'solar_real_power_limit': None, 'score': 10000, 'blocks_controlled': 0, 'primary': True, 'auxiliary_load': 0, 'all_enable_lines_high': True, 'inverter_nominal_usable_power': 0, 'expected_energy_remaining': 0}

pw.tedapi.get_battery_blocks():
[{'vin': '1707000-21-K--TG124300003JZH', 'min_soe': 0, 'max_soe': 100, 'type': 'Powerwall3', 'can_connection': 'can1', 'pvi_power_status': 'on', 'battery_power_status': 'on', 'enable_inverter_battery_meter': True, 'enable_inverter_solar_meter': True}, {'vin': '1707000-21-K--TG124300003DZE', 'min_soe': 0, 'max_soe': 100, 'type': 'Powerwall3Follower', 'pvi_power_status': 'on', 'battery_power_status': 'on', 'enable_inverter_battery_meter': True, 'enable_inverter_solar_meter': True}, {'vin': '1707000-21-K--TG12430000309Y', 'min_soe': 0, 'max_soe': 100, 'type': 'Powerwall3Follower', 'pvi_power_status': 'on', 'battery_power_status': 'on', 'enable_inverter_battery_meter': True, 'enable_inverter_solar_meter': True}]
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants