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

Only 1 temperature sensor BMS Daly #44

Closed
4 tasks done
VitalyIak opened this issue Sep 12, 2024 · 24 comments · Fixed by #54
Closed
4 tasks done

Only 1 temperature sensor BMS Daly #44

VitalyIak opened this issue Sep 12, 2024 · 24 comments · Fixed by #54
Assignees
Labels
enhancement New feature or request

Comments

@VitalyIak
Copy link

Checklist

  • I have filled out the template to the best of my ability.
  • I have understood that this integration is only about battery management systems with Bluetooth Low Energy support.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate of any previous feature requests.

Is your feature request related to a problem? Please describe.

Bms Daly type K has many temperature sensors, but I can see only one. Most importan itemperature sensors are internal one and first external, but better to see all of them.

Describe the solution you'd like

Add sensors at integration for Daly

Additional context

No response

@VitalyIak VitalyIak added the enhancement New feature or request label Sep 12, 2024
@patman15
Copy link
Owner

patman15 commented Sep 12, 2024 via email

@patman15 patman15 self-assigned this Sep 14, 2024
@downset
Copy link

downset commented Sep 14, 2024

Would like to see this also for the JK BMS :)

@patman15
Copy link
Owner

@VitalyIak, @downset can you test the branch?

@VitalyIak
Copy link
Author

@VitalyIak, @downset can you test the branch?

Update on 1.6.3 - no changes concern BMS temperature...
Or may be I have to test manually change files from this branch?

@VitalyIak VitalyIak reopened this Sep 21, 2024
@downset
Copy link

downset commented Sep 21, 2024

Looks fine for the JK Thank you @patman15
do you need any logs to verify thinks?

@downset
Copy link

downset commented Sep 21, 2024

@VitalyIak yes you have to manual exchange the files from the Branch it is not in the final HACS Release until now

@downset
Copy link

downset commented Sep 21, 2024

@patman15 ok this was a little bit to early :)
I get often just zero values for all parameters, not only the new Temp value, so it is switching back and forth from zero to real values. Temp on pack "oben" sometimes shows 7,1°C wile all other Parameters are zero
home-assistant_bms_ble_2024-09-21T07-20-16.557Z.log

edit: getting less frequent after some time the zero values, seams like until now i got sometimes an "not available" if the bms communication was not stable for a few seconds, and now i am getting zero values instead witch are messing up the history graph

@VitalyIak
Copy link
Author

Oh, I can see 4 sensors of temperature at attributes. But only external sensors, but there is no internal bms temperature sensor, unfortunately... is it possible to add? Thank you!

@VitalyIak
Copy link
Author

Anyway, now it's much better! Adding of external bms will be excellent!

@patman15
Copy link
Owner

@VitalyIak

Oh, I can see 4 sensors of temperature at attributes. But only external sensors, but there is no internal bms temperature sensor, unfortunately... is it possible to add? Thank you!

I'm not aware that the daly BMS provides such information. If you have documentation about it, please let me know ...

Anyway, now it's much better! Adding of external bms will be excellent!

What do you mean by external bms ?

@patman15
Copy link
Owner

@downset

I get often just zero values for all parameters, not only the new Temp value,

Will check, probably I already messed up with v1.6.3, despite all tests passed. Thanks for the logs.

@patman15
Copy link
Owner

@downset had a look at the logs, but they look very weird. I can see all messages from the BMS 6 times at the exact same time, e.g.

2024-09-21 09:18:30.638 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00')
2024-09-21 09:18:30.638 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00')
2024-09-21 09:18:30.638 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00')
2024-09-21 09:18:30.638 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00')
2024-09-21 09:18:30.638 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00')
2024-09-21 09:18:30.638 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (BatteryOben-00) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x00\x00\x00\x00')

Also I miss connect messages of the integration after startup. It just looks like the system works without connecting. Did you restart HA? Or, do you probably have multiple ESPproxies that all catch the same, maybe some issue with them? It does not really look like an issue with the integration at first hand. But I'm totally confused at the moment, because the log looks like something that cannot happen.

@downset
Copy link

downset commented Sep 21, 2024

of cause i restarted after updating the files, but the activation of the debug log was after the restart so maybe this is the reason there is no connecting. i have just one bluetooth proxy until the last version 1.6.2 everything was fine.
Sometimes there were some connection problems with missing values but never zero values

did am other fresh restart, also rebooted the bluetooth proxy:
Still zeros and one pack isn`t connecting at all
home-assistant_bms_ble_2024-09-21T15-07-01.568Z.log

downgrade to 1.6.2. its working again will now test 1.6.3 main branche and will edit hier with feedback

edit also with 1.6.3 main i have the zero values for example my SOC since 9, were i updated
Bildschirmfoto 2024-09-21 um 17 20 44

@patman15
Copy link
Owner

@downset you are a pretty good tester! I think I found the issue (#51). I updated the branch, hope it works now!

@downset
Copy link

downset commented Sep 21, 2024

Perfekt seams to work again, no more zero values. Thank you!
I have now the main Temp Value and 3 additional Attributes.
in the App i have 4 Bat sensors and one MOS Sensor.
I think thease 4 are the Battery sensors right?
Can i also get the MOS Sensor? :)
IMG_2084

Greets
Downset

@patman15
Copy link
Owner

@downset

Perfekt seams to work again, no more zero values. Thank you!

Thank you for the testing!

in the App i have 4 Bat sensors and one MOS Sensor.
I think thease 4 are the Battery sensors right?

Unfortunately, I don't know which sensor is which I just found 3 temperature values. Probably you can find out by comparing? Documentation and references are pretty weak on that topic.

Can i also get the MOS Sensor? :)

I did a further update. I found 3 further temperature values, maybe you can tell what is what and check if it works?
Will need some cleanup for the release, but I think it works.

@downset
Copy link

downset commented Sep 22, 2024

Thanks again!
It is working

Now i have the main Value and 6 extra Attributes, two of them seams to be the same, but maybe It is the real data at the moment or is it a dublication? The 24,4 seams to be the MOSfet

Bildschirmfoto 2024-09-22 um 12 28 42

edit:
Verified, i switched on a big load and these both 25,5°C rise together quick so it seems to be both the mosfet
Bildschirmfoto 2024-09-22 um 12 47 09

@patman15 patman15 linked a pull request Sep 22, 2024 that will close this issue
@VitalyIak
Copy link
Author

VitalyIak commented Sep 23, 2024

I'm not aware that the daly BMS provides such information. If you have documentation about it, please let me know ...

@patman15 it's seems that at UART/RS-485 BMS send this info at message_id=92, where status of BMS:
Part 4_ Daly RS485+UART Protocol.pdf

I'm ready to test...

@VitalyIak
Copy link
Author

@patman15 Also please check https://github.com/dreadnought/python-daly-bms I suppose there is also about Daly BMS, may be there will be usefull smth...

@VitalyIak
Copy link
Author

from test_daly_bms.py:

    def _response(
        self, char_specifier: BleakGATTCharacteristic | int | str | UUID, data: Buffer
    ) -> bytearray:
        if char_specifier == normalize_uuid_str("fff2") and data == (
            self.HEAD_READ + self.CMD_INFO
        ):
            return bytearray(
                b"\xd2\x03|\x10\x1f\x10)\x103\x10=\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00<\x00=\x00>\x00?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8cuN\x03\x84\x10=\x10\x1f\x00\x00\x00\x00\x00\x00\r\x80\x00\x04\x00\x04\x009\x00\x01\x00\x00\x00\x01\x10.\x01\x41\x00*\x00\x00\x00\x00\x00\x00\x00\x00\xa0\xdf"
            ) # {'voltage': 14.0, 'current': 3.0, 'battery_level': 90.0, 'cycles': 57, 'cycle_charge': 345.6, 'numTemp': 4, 'temperature': 21.5, 'cycle_capacity': 4838.400000000001, 'power': 42.0, 'battery_charging': True, 'runtime': none!, 'delta_voltage': 0.321}

there is a temperature, i suppose this is temp of BMS, because external NTC are at different place. Please check...

@VitalyIak
Copy link
Author

What do you mean by external bms ?

@patman15 Forget please about it, ))

@patman15
Copy link
Owner

from test_daly_bms.py:
...
there is a temperature, i suppose this is temp of BMS, because external NTC are at different place. Please check...

No that is the average temperature calculated from the 4 that are now visible as attributes.

Also please check https://github.com/dreadnought/python-daly-bms I suppose there is also about Daly BMS, may be there will be usefull smth...

That could be interesting but is totally different to the current approach, so might take a while.

@VitalyIak can you please send me a debug log of the integration and a screenshot from your app? Does the app show the MOS temperature? If yes, I can probably infer from the debug log. Thanks!

@VitalyIak
Copy link
Author

VitalyIak commented Sep 23, 2024

@patman15
photo_5445196573828047538_y
MOS Temperature is needed
home-assistant_bms_ble_2024-09-23T14-31-07.391Z.log

@patman15
Copy link
Owner

@VitalyIak I had a look at the resources you provided, but they are all for the UART protocol not Bluetooth, so they unfortunately do not help. The temperature you are looking for is not present in the record that I can query and also the app does not show it from the record. I know the app requests more info from the BMS, but I can't find documentation on how to do so.
The only way would be to record the data transfer between the app and the BMS, e.g. on Android using the Bluetooth debug setting. If you know how to do that, please provide me such a file.
I will mark this issue as solved for the moment for a new release, but feel free to open a new feature request with the specific value for Daly BMS.
Sorry that I have no better news.

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

Successfully merging a pull request may close this issue.

3 participants