warhammerkid / bluetti_mqtt

MQTT interface for Bluetti power stations
MIT License
139 stars 53 forks source link

Scan Error #26

Closed RichieXX closed 1 year ago

RichieXX commented 1 year ago

I have installed bluetti_mqtt in ubuntu virtual machine on a Intel NUC in vmware ESXi. After succesfull install the command --scan get an error: ` ~/.local/bin$ ./bluetti-mqtt --scan Scanning.... Traceback (most recent call last): File "/home/rico/.local/bin/./bluetti-mqtt", line 8, in sys.exit(main()) File "/home/rico/.local/lib/python3.10/site-packages/bluetti_mqtt/server_cli.py", line 123, in main cli.execute() File "/home/rico/.local/lib/python3.10/site-packages/bluetti_mqtt/server_cli.py", line 62, in execute asyncio.run(scan_devices()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/home/rico/.local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/init.py", line 17, in scan_devices devices = await BleakScanner.discover() File "/usr/local/lib/python3.10/dist-packages/bleak/backends/scanner.py", line 123, in discover async with cls(**kwargs) as scanner: File "/usr/local/lib/python3.10/dist-packages/bleak/backends/scanner.py", line 103, in aenter await self.start() File "/usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/scanner.py", line 133, in start manager = await get_global_bluez_manager() File "/usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/manager.py", line 856, in get_global_bluez_manager await instance.async_init() File "/usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/manager.py", line 231, in async_init assert_reply(reply) File "/usr/local/lib/python3.10/dist-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply raise BleakDBusError(reply.error_name, reply.body) bleak.exc.BleakDBusError: [org.freedesktop.DBus.Error.ServiceUnknown] The name org.bluez was not provided by any .service files

` Is there any solution?

warhammerkid commented 1 year ago

For bluetti-mqtt to work, you must have a working BlueZ install. It looks like that might not be installed, and you may also need to make sure that your VM has access to whatever Bluetooth hardware exists in your NUC once you've done that.