Fabian-Schmidt / esphome-victron_ble

Use official Victron BLE endpoint for fetching data from Victron devices via Bluetooth LE via ESPHome.
GNU General Public License v3.0
152 stars 15 forks source link

Request: isolate the Victron BLE access lib from the ESPHOME biding #23

Open bmedici opened 11 months ago

bmedici commented 11 months ago

As this implementation of Victron BLE access seems to be the first one really working, it would be really great if we could use it even outside of the ESPHome project. For example, being able to use the lib by itself in any ESP32 project would be nice. The binding to ESPHome could abstract the lib in this way.

Thank you for considering this idea and for this nice work !

Bruno

Fabian-Schmidt commented 11 months ago

This issue is that i use the Bluetooth infra provided by ESP Home. So as a lib it would require a bring your own Bluetooth stack.

Are you aware of a good library example / pattern for ESP32 which needs Bluetooth?

Wummeke commented 11 months ago

I am actually looking for this too. My usecase is that I want to get a readout every hour or so from the smartshunt in my campervan and send it home over LoRa/The Things Network. Now I am trying to write something similar to your library and I only got as far as receiving the manufacturer data from the smartshunt (pretty basic stuff, probably), but struggle (due to lack of time and knowledge) with the decryption part and probalby after that with translating the decrypted data to something usefull I can use (but I am hoping I can borrow that part from your library, when I can get that far ).

bmedici commented 11 months ago

This issue is that i use the Bluetooth infra provided by ESP Home. So as a lib it would require a bring your own Bluetooth stack.

Are you aware of a good library example / pattern for ESP32 which needs Bluetooth?

Thank you for your message. I'm not a Bluetooth expert on ESP32 at all, unfortunately. But from what I've read, it seems to be pretty easy and straightforward.

I think a big part of the value lies in the parsing / decrypting logic of the frames.

aviatorhh commented 3 months ago

Some devices can be accessed via VE.direct which is a serial line. I would prefer to use such method because I trust in wired connections more than in wireless (life lessons). So yes, I too would like to see a spin off. Thank you.

Fabian-Schmidt commented 3 months ago

Some devices can be accessed via VE.direct which is a serial line. I would prefer to use such method because I trust in wired connections more than in wireless (life lessons). So yes, I too would like to see a spin off. Thank you.

For the VE.Direct to ESPHome connection is already an existing project - https://github.com/KinDR007/VictronMPPT-ESPHOME. The VE.Direct and the Bluetooth announcement protocol are completely different and share no logic. This library / component is specific for the Bluetooth wireless protocol.

aviatorhh commented 3 months ago

Oh, great. Thanks for that and keep up your good work.