Sleeper85 / esphome-jk-bms-can

GNU General Public License v3.0
64 stars 18 forks source link

ability to connect via Bluetooth by using jk_bms_ble instead of jk_bms #9

Closed octane321 closed 5 months ago

octane321 commented 5 months ago

hi there, thanks to your comment on yt, i want to try this repo.

But i want to connect via BT to the JK - are you or anyone else interested in BLE connection too?

OselDusan7 commented 5 months ago

Hi Octane. There is already BLE version for JK BMS . Look at https://github.com/fl4p/batmon-ha My brother is using that version. He has 3pcs of JK BMS. Not super stable connection . It is not available ( not connected ) for around 5% during 24h period. But is is super easy and costs nothing .

octane321 commented 5 months ago

Hi Octane. There is already BLE version for JK BMS . Look at https://github.com/fl4p/batmon-ha My brother is using that version. He has 3pcs of JK BMS. Not super stable connection . It is not available ( not connected ) for around 5% during 24h period. But is is super easy and costs nothing .

Hi Osel. Your mentioned repo does not have any CAN communication or algorythm for Inverters. Thats a whole other story.

Sleeper85 commented 5 months ago

hi there, thanks to your comment on yt, i want to try this repo.

But i want to connect via BT to the JK - are you or anyone else interested in BLE connection too?

Hi octane321, The Bluetooth connection is already on my to do list. It will be soon.

OselDusan7 commented 5 months ago

hi there, thanks to your comment on yt, i want to try this repo. But i want to connect via BT to the JK - are you or anyone else interested in BLE connection too?

Hi octane321, The Bluetooth connection is already on my to do list. It will be soon.

That is awesome. I have 2 batteries , but 3 inverters. If there is BLE version , I hope I can use one BMS for two inverters ( one wired , one BLE ). Thanks.

octane321 commented 5 months ago

I successfully implemented BLE from syssi´s repo (https://github.com/syssi/esphome-jk-bms) for a single BMS now. The repos Version with multiple BLE devices is not working stable and BLE connection breaks down very often.

In addition i added MQTT to use another source feeding the ESP - in my case i want to use a victron smartShunt for SoC and Voltage.

One Idea could be, to add as many BMSs via MQTT and match them in the ESP to control the Inverter (or multiple inverters with multiple ESP-instances). But my programming skills are very low so i coult not do this.

@Sleeper85 I have to made some changes to your yaml to get BLE to compile and work. Never used github seriously for collaboration - what is your suggestion to merge?

Sleeper85 commented 5 months ago

To tell the truth, I already have a Bluetooth version under test at home. I think I'll post it tomorrow.

Concerning the shunt I have the same idea as you, use the SoC of my shunt instead of that of JK-BMS. Good idea ;-)

You are not the first to tell me about using MQTT to support multiple BMS connections. For the moment, I don't plan to do multi-BMS development, it would be a lot of work and I don't need it personally. The question I ask myself would be, why not use the new JK-BMS inverter? Will people continue to install old style JK-BMS in the future? Wouldn't it be a waste of time to do multi-BMS development?

octane321 commented 5 months ago

Thats fine - then i will do a fork of your repo okay? I personally don´t user HA but ioBroker instead - so my version is also tailored to be used with ioBroker wich needs a completely different mqtt topic structure.

I already have 3 classic style JKs and my energystorage is already build - so if i would switch to inverter-bms...man that would be lots of work to fit this in. I think the classic style BMSs will not been thrown away even if an owner upgrades to the newer ones, the old ones will be sold and futher used. So in my opinion, it makes sense to develope a multi BMS version.

btw: Have you switched over to esp-idf for the BLE Version? I could not get stable results with arduino framework.

Sleeper85 commented 5 months ago

Of course, you can fork ;-)

Yes, I set the framework to "ESP-IDF" to have a stable Bluetooth connection. This will therefore be the default framework from version 1.16.2.

Framework Arduino vs ESP-IDF ?

Sleeper85 commented 5 months ago

The Bluetooth version is now available.

Release V1.16.2