tikismoke / home-assistant-nespressoble

#deprecated see Readme to migrate to a better one. NESPRESSO ble Home Assistant custom componenets and also a 2MQTT script
GNU General Public License v3.0
38 stars 6 forks source link

Possibility to make the custom_component cross-platform #6

Closed bubez81 closed 11 months ago

bubez81 commented 3 years ago

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

tikismoke commented 3 years ago

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.

bubez81 commented 3 years ago

ok I'll start looking for it!

bubez81 commented 3 years ago

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

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

it's a start...

tikismoke commented 3 years ago

Nice, as the doc said it seems indeed multiOS.

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

bubez81 commented 3 years ago

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

tikismoke commented 11 months ago

@bubez81 try this repo it's better :

https://github.com/bulldog5046/ha_nespresso_ingetration