fl4p / batmon-ha

Add-on for Home Assistant to connect JK, JBD, Daly, ANT, SOK and Supervolt BMS via Bluetooth
MIT License
314 stars 60 forks source link

esphome bluetooth proxy? #34

Open the-butterfry opened 2 years ago

the-butterfry commented 2 years ago

Been trying to get a remote daly to show up to a working HA batmon. I can see and pull data just fine when the HA computer is close, but when they're separated and have an esphome proxy attempting to forward connections - no device found. Am I being stupid here? or should this setup work?

I can see the device in the proxy logs, just fine

tangmonster911 commented 2 years ago

My understanding is that batmon is not working with bluetooth proxy. I am checking in on this project twice weekly in anticipation for that to work. Untill then I cannot use it.

on the main page:

TODO use the new Bluetooth integration since HA 2022.8 https://www.home-assistant.io/integrations/bluetooth/

fl4p commented 2 years ago

batmon uses standard BLE connection protocol, so it might work. Your bluetooth proxy must be discoverable with a Bluetooth Low-Energy scan. No compatibility to esphome though, as it uses WiFi for communication.

fl4p commented 1 year ago

Actually, this is would require a custom integration (through HACS), as batmon just communicates through mqtt with HA and establishes bluetooth connections through DBus with the bluez stack.

MityaDVG commented 1 year ago

What custom integration (through HACS)?

fl4p commented 1 year ago

This needs to be implemented, porting batmon from add-on to an Integration. I have no experience with that though

fl4p commented 1 year ago

Planned to port batmon to MicroPython, which supports ESP32

7wells commented 11 months ago

@fl4p @snipah

Understanding that this is rather an issue tracker, sorry about my note here.

I asked at micropython discussions if they knew about a way to port bleak from Python to MicroPython, and here's their answer:

There's no direct support for bleak or its exact API as such. Micropython has aioble for asyncio Bluetooth: https://github.com/micropython/micropython-lib/tree/master/micropython/bluetooth/aioble

For the higher-level bluetooth aioble library, please refer to this: https://github.com/micropython/micropython-lib/tree/master/micropython/bluetooth/aioble

As I am no programmer and know little of Python/MicroPython, my question there and here, too, might not be helpful. In that case, I kindly ask you to accept my apologies. 😊

If, however, you see a way that the provided information might be helpful, please let me know. Thank you so much. ❤️

dowermyr commented 10 months ago

Hi! It says you planned to port batmon so it supports esp32 Bluetooth proxy. Is that done?

goldriver2 commented 7 months ago

I see that all discussion around this request to add ESPHome Proxy seems to be closed ( #179, #187 and 34) any one knows if this resquest is still an Open one or is this been rejected ?

Mikrofarad commented 3 months ago

For me it was easier to use an ESP32 and follow this Beginner's guide. Runs perfect with Bluetooth Proxies 👍