Patrick762 / hassio-bluetti-bt

Bluetti Integration for Home Assistant
MIT License
52 stars 14 forks source link

[Bug]: Device AC70P not supported yet - Onboarding fails #111

Open tianbr opened 5 months ago

tianbr commented 5 months ago

What happened?

After selecting the Bluetooth name of the unit, the device cannot be set up. "Fehler beim Einrichten" (Error during setup) appears.

What version of our software are you running?

0.1.1

What device are you seeing the problem on?

Bluetti AC70P

What bluetooth connection are you using?

ESPHome bluetooth proxy

Have you changed the integration settings?

false

Integration settings (if you changed them)

No response

Relevant log output

[homeassistant.config_entries] Error setting up entry AC70PSNUMBER for bluetti_bt
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 584, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/__init__.py", line 59, in async_setup_entry
    coordinator = PollingCoordinator(hass, address, device_name, polling_interval, persistent_conn, polling_timeout, max_retries)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/coordinator.py", line 54, in __init__
    bluetti_device = build_device(address, device_name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/utils/device_builder.py", line 26, in build_device
    if match[1] == "AC60":
       ~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
tianbr commented 5 months ago

I would be super happy to get any kind of functionality working. In case that I can contribute with any data, I'd be happy to do so.

I appreciate all efforts :)

tianbr commented 5 months ago

I can see that the AC70P seems to work with the generic ProtocolV2 settings. Adding a config file based on that works fine and gives battery percentage as well as total power generation. Maybe this can be added in a future release?

alexey6600 commented 4 months ago

I can see that the AC70P seems to work with the generic ProtocolV2 settings. Adding a config file based on that works fine and gives battery percentage as well as total power generation. Maybe this can be added in a future release?

I tried to add it and it worked. From the useful side, it shows the battery charge. Have you tried getting information from other sensors?

Patrick762 commented 4 months ago

Pull request merged and available in 0.1.2

matthewpucc commented 3 months ago

@alexey6600 see #124 for additional data points that are getting added for AC70 and AC70P