Patrick762 / hassio-bluetti-bt

Bluetti Integration for Home Assistant
MIT License
30 stars 9 forks source link

[Bug]: AC500 + 2xB300S: all Battery Infos are "unknown", "DC Input 1" missing #70

Closed ItsMe00007 closed 3 months ago

ItsMe00007 commented 3 months ago

What happened?

I just moved from Bluetti_MQTT Integration on a Raspberry PI to your integration. Thanks for all the effort.

I got all the infos from my AC500 except:

  1. all battery infos are missing except "Total Battery Percent".
  2. "DC Input 1" is missing

With the Bluetti_MQTT 0.11 I got the battery percent infos for both batteries and also for "DC Input 1" (for PV Input 1, additional to "DC Input" for complete PV Input).

Battery Info1 Battery Info2

Version

0.0.11

What device are you seeing the problem on?

AC500

What bluetooth connection are you using?

USB dongle

Have you changed the integration settings?

Yes (Please write down the changed settings in the next step)

Integration settings (if you changed them)

Use Controls changed to "Enabled" and Debug changed to "Enabled"

Relevant log output

This error originated from a custom integration.

Logger: custom_components.bluetti_bt.sensor
Source: custom_components/bluetti_bt/sensor.py:163
Integration: Bluetti BT (documentation, issues)
First occurred: 15:33:21 (6230 occurrences)
Last logged: 21:14:18

No data for available for (pack_voltage1)
No data for available for (pack_battery_percent1)
No data for available for (pack_status2)
No data for available for (pack_voltage2)
No data for available for (pack_battery_percent2)
ItsMe00007 commented 3 months ago

To compare it I installed the Bluetti_MQTT 0.15 Version on my Raspberry PI and I get the Battery1+2 Percent+Voltage and the "DC Input 1 Power/Current/Voltage"

Battery Info MQTT Integration1
ItsMe00007 commented 3 months ago

Update: I installed Beta 0.0.16 and I now get the Battery information for Pack 1+2. Thakyou very much !!!

The only infos which are still missing completely for the AC500 PV Input 1 which I had with Bluetti_mqtt (See above screenshot": "DC Input Power 1" "DC Input Voltage 1" "DC Input Current 1"

ItsMe00007 commented 3 months ago

The main info about the missing battery information has been solved. Therefore i close the bug. But it would be great if you can add these 3 sensors which are available in the implementation of warhammerkid: "DC Input Power 1" "DC Input Voltage 1" "DC Input Current 1

Thanks

Patrick762 commented 3 months ago

@ItsMe00007 I looked at the bluetti_mqtt code but couldn't find "DC Input Power 1" in the AC500 config. Did you mean another powerstation? Or did you rename them?

ItsMe00007 commented 3 months ago

@ItsMe00007 I looked at the bluetti_mqtt code but couldn't find "DC Input Power 1" in the AC500 config. Did you mean another powerstation? Or did you rename them?

No, I didn't rename it. All the Sensor names are original from the implementation.

But I also haven't found it in the origin AC500 config file, I guess that the ACxx Files only show what is different to others and the "DC Input Power 1" and "DC Input Voltage 1" and "DC Input Current 1"are in a file which is common to more devices.

This is how it looks with bluetti_MQTT:

Result1 AC500 and 2xB300S Bluetti_MQTT 0 0 15 Result2 AC500 and 2xB300S Bluetti_MQTT 0 0 15 Result3 AC500 and 2xB300S Bluetti_MQTT 0 0 15
Patrick762 commented 3 months ago

If I understand it correctly, it should be available as entity, but as "Internal DC Input Power"

Patrick762 commented 3 months ago

I don't understand why this is renamed in the mqtt_client file, but it should already be there

ItsMe00007 commented 3 months ago

BTW: I just discovered that "Internal Current Sensor 3" and "Internal Power Sensor 3" are also missing in your integration compared to the Bluetti_MQTT.

Patrick762 commented 3 months ago

Those are already defined here: https://github.com/Patrick762/hassio-bluetti-bt/blob/dc3aaf92e142302ca87a4c7c08184406b9992c55/custom_components/bluetti_bt/bluetti_bt_lib/devices/ac500.py#L24

If I have some time tomorrow I'll test the latest version on an AC300 (very similar)

ItsMe00007 commented 3 months ago

If I understand it correctly, it should be available as entity, but as "Internal DC Input Power"

Ah ok, I'll check it tomorrow when the PV starts. The AC500 has got 2 PV Inputs and up to now only the PV1 DC Input was found by warrhammerkid. But in the current Bluetti App it is now possible to click on the PV icon and it shows PV1 Power+Voltage as well PV2 Power+Voltage. So I guess somebody will find the modbus register for the second PV Input.

Then it makes sense to add a 1 to the current "Internal DC Input Power" to be prepared for a "Internal DC Input .... 2"

ItsMe00007 commented 3 months ago

Scaling Factor is still wrong for internal dc input:

Voltage: should be 90,1 instead of 901 Power: should be 303 instead of 30,3 Current: should be 3,3 instead of 0,33

Then it would match PV Input 1

I think we should inform warhammerkid to add the scale info as a comment…