Patrick762 / hassio-bluetti-bt

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

[Bug]: AC200L support #80

Open filippo5589 opened 6 months ago

filippo5589 commented 6 months ago

What happened?

Hi, is it possible to add support also on AC200L??? the integration can recognize it but it doesn't show any entities, do I have to change something on the yaml file?? Thanks in advance

Version

0.0.17

What device are you seeing the problem on?

AC200M

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

No response

Patrick762 commented 6 months ago

Is your bluetooth name starting with PBOX?

filippo5589 commented 6 months ago

Hi, thanks for your reply, I'm attaching the integration screen, it finds me AC200L..... and the rest of the serial but it remains like this with the error. IMG_0011

Patrick762 commented 6 months ago

Can you check the bluetooth name on your smartphone? The Integration always replaces the PBOX part if it finds this in the name.

Before adding the powerstation, I'll need the information if it is protocol version 1 or 2 (depending on the bluetooth name). After that, I can add a basic config for the AC200L (SoC and power_generation in kWh)

filippo5589 commented 6 months ago

hi, the bluetooth name is this: AC200L24xxxxxxxxxxxx. there is no word PBOX it's the same one read from my smartphone too. If you need other information, just ask me to solve the problem. thanks in advance for your answers

Patrick762 commented 6 months ago

Did you add the Powerstation manually or did the integration detect it?

filippo5589 commented 6 months ago

the integration found AC200L by itself with ID I sent you

filippo5589 commented 6 months ago

I attach the screenshot of when it detects the device @Patrick762 IMG_0012

Patrick762 commented 6 months ago

I'll add a basic config to the next release

filippo5589 commented 6 months ago

perfect, thank you very much, can I ask you when it will be available?

Patrick762 commented 6 months ago

now

Patrick762 commented 6 months ago

https://github.com/Patrick762/hassio-bluetti-bt/releases/tag/0.0.22

Patrick762 commented 6 months ago

PR on bluetti_mqtt which might help if the current version doesn't work: https://github.com/warhammerkid/bluetti_mqtt/pull/106

filippo5589 commented 6 months ago

I managed to integrate bluetti ac200L but it remains blocked 3 hours ago and no status is updated. IMG_0013

Patrick762 commented 6 months ago

Can you look into the HA logs? Do you see some errors or warnings from the bluetti_bt integration?

filippo5589 commented 6 months ago

2024-04-01 12:52:18.314 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration bluetti_bt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

This is the last log I found

filippo5589 commented 6 months ago

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: custom_components.bluetti_bt.bluetti_bt_lib.bluetooth.device_reader Fonte: custom_components/bluetti_bt/bluetti_bt_lib/bluetooth/device_reader.py:143 integration: Bluetti BT (documentazione, problemi) Prima occorrenza: 12:55:45 (4 occorrenze) Ultima registrazione: 12:58:04

Polling timed out

this is another log error.

Patrick762 commented 6 months ago

2024-04-01 12:52:18.314 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration bluetti_bt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

This is the last log I found

this is normal

Patrick762 commented 6 months ago

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: custom_components.bluetti_bt.bluetti_bt_lib.bluetooth.device_reader Fonte: custom_components/bluetti_bt/bluetti_bt_lib/bluetooth/device_reader.py:143 integration: Bluetti BT (documentazione, problemi) Prima occorrenza: 12:55:45 (4 occorrenze) Ultima registrazione: 12:58:04

Polling timed out

this is another log error.

Do you use other BT devices on HA?

Patrick762 commented 6 months ago

You can try restarting the BT Proxy

filippo5589 commented 6 months ago

I don't use any other BT device, I use the mini PC's Bluetooth, I don't know if I have to do any particular configuration

Patrick762 commented 6 months ago

The internal Bluetooth sometimes cuts the connection sometimes. I'd recommend an ESPHome Bluetooth Proxy or one of the supported BT Dongles

Patrick762 commented 6 months ago

Other question: Did some entities not load or are in unknown state? Just to verify if the Registers are working as expected

filippo5589 commented 6 months ago

I restarted HA, deleting the bluetooth voice from the yaml configuration, now I find the switches but it's all in an unknown state, maybe it's better if I take a bluetooth dogle and configure it

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: custom_components.bluetti_bt.switch Fonte: custom_components/bluetti_bt/switch.py:120 integration: Bluetti BT (documentazione, problemi) Prima occorrenza: 17:23:39 (3 occorrenze) Ultima registrazione: 17:23:39

Invalid data from coordinator (switch.ac200lXXXXXXXXXXac_output) Invalid data from coordinator (switch.ac200lXXXXXXXXXXdc_output) Invalid data from coordinator (switch.ac200lXXXXXXXXXXpower_off)

Patrick762 commented 6 months ago

Invalid data from coordinator is normal and can happen a few times. The switches should work if you enable them under "Configuration"

filippo5589 commented 6 months ago

Do you intend to enable in yaml configuration? Because after I restarted HA gives me all a stranger , maybe I should try to turn off the mini pc to see if it restarts the built-in bluetooth module .

How do I find a guide to best configure the yaml?

Patrick762 commented 6 months ago

Do you mean the Bluetooth Proxy yaml? You should use the Ready Made Firmware for this: https://esphome.io/projects/?type=bluetooth

filippo5589 commented 6 months ago

Invalid data from coordinator is normal and can happen a few times. The switches should work if you enable them under "Configuration"

How do I activate switches on configuration?

filippo5589 commented 6 months ago

@Patrick762 Are the entities I see in integration just those? Because through the official app you can manage many more things. If you want I'll help you discover the other switches that can be there besides the output.

I'm waiting for your answer, in the meantime thank you and I'll support you for the work you do 💪

dpb03 commented 5 months ago

Hi, @Patrick762, @filippo5589 I'm running into the same issues as filippo. (I actually have an AC200PL. I added an extra device file, basically the same as the AC200L, but with P added. I modified other files to accept it. It would be good AC200PL was also added to the next update.)

Like Filippo, I can add the device, but it updates rarely. Using a bluetooth dongle, I get the same Invalid data from coordinator errors as filippo. Using a bluetooth ESP32 proxy only (default Ready Made Firmware from https://esphome.io/projects/?type=bluetooth), I get:

"ERROR (MainThread) [custom_components.bluetti_bt.bluetti_bt_lib.bluetooth.device_reader] Bleak error: Error ESP_GATT_CONN_FAIL_ESTABLISH while connecting: Connection failed to establish" followed by "WARNING (MainThread) [custom_components.bluetti_bt.sensor] Data from coordinator is None. Skipping update for ac200pXXXXXXXXXXdc_input_power"...

My bluetooth proxy works fine with other bluetooth devices, but cannot get anything from the bluetti device. It is powered from and sitting on top of the bluetti device, so distance shouldn't be an issue, and the wifi is working as it works with other devices at this location.

Would appreciate any advice/ideas to try.

filippo5589 commented 5 months ago

@Patrick762 Hello let me know if you need Log to integrate more and more AC200L there are many functions on the app that we could use on HA. Thank you so much for the support

dpb03 commented 5 months ago

Just thought I'd say...after a few days, it seems to be working?

I'm not really sure what changed. Does the bluetooth proxy take some time to work?

Patrick762 commented 5 months ago

The proxies are strange. I now have the problem that it doesn't reconnect anymore. I'll look into this if I find some time

filippo5589 commented 4 months ago

@Patrick762 How do I also get this information about AC200L? If we can see them on ac300 surely we can on ac200L what do you say? IMG_0428

Acalanum commented 1 month ago

@Patrick762 How do I also get this information about AC200L? If we can see them on ac300 surely we can on ac200L what do you say? IMG_0428

+1 to this for AC200L.

@Patrick762 -- I don't have much ito offer in the way of coding experience, but am happy to gather any details you might need from an AC200L as best I can. Happy to run tcpdump/pcap as necessary. Please let me know if there is anything I can do to contribute.