home-assistant-nespressoble icon indicating copy to clipboard operation
home-assistant-nespressoble copied to clipboard

Possibility to make the custom_component cross-platform

Open bubez81 opened this issue 3 years ago • 5 comments

Hello tiki smoke how are you? I'm thinking of the possibility to use the custom_component with macOS too... do you think it would be possible to use some alternative to scan BLE devices? I have seen some use @abandonware/bluetooth-hci-socket

bubez81 avatar Oct 23 '20 08:10 bubez81

Hi, really not known.

I had never used macos. If you find a working lib it might work. You only have to adapt the code.

tikismoke avatar Oct 24 '20 09:10 tikismoke

ok I'll start looking for it!

bubez81 avatar Oct 25 '20 17:10 bubez81

found! https://github.com/hbldh/bleak

python3 scan.py 607B449E-50FA-4F28-969C-B0EF6840D20E: Prodigio_C385818C9BD7

it's a start...

bubez81 avatar Oct 25 '20 19:10 bubez81

Nice, as the doc said it seems indeed multiOS.

If you made it all work, make a PR I'll have a look.

tikismoke avatar Oct 25 '20 20:10 tikismoke

sorry..I'm not a programmer and sadly I haven't time to learn how to do it by myself ;(

I'm pretty sure this is the correct library CoreBluetooth but i am not able to substitute it for your custom_component even though I tried

https://stackoverflow.com/questions/48958267/how-can-i-use-corebluetooth-for-python-without-giving-up-the-main-thread

here I think they talk just about what I need but I don't understand much

bubez81 avatar Nov 05 '20 21:11 bubez81